xglys 发表于 2018-11-9 11:15:52

nginx+uwsgi+django+python 应用架构部署

# mkdir www  
# cd www
  
# django-admin startproject mysite
  
# tree mysite
  
/mysite/
  
├── manage.py
  
└── mysite
  
├── __init__.py
  
├── settings.py
  
├── urls.py
  
└── wsgi.py1
  
directory, 5 files
  
# cd mysite/
  
# python manage.py runserver
  
Performing system checks...
  
System check identified no issues (0 silenced).
  
You have unapplied migrations; your app may not work properly until they are applied.Run 'python manage.py migrate' to apply them.
  
October 13, 2015 - 09:50:28
  
Django version 1.8.5, using settings 'mysite.settings'Starting development server at
  
Quit the server with CONTROL-C.
  
# python manage.py migrate
  
Operations to perform:Synchronize unmigrated apps: staticfiles, messages
  
Apply all migrations: admin, contenttypes, auth, sessionsSynchronizing apps without migrations:Creating tables...
  
Running deferred SQL...
  
Installing custom SQL...
  
Running migrations:Rendering model states... DONE
  
Applying contenttypes.0001_initial... OK
  
Applying auth.0001_initial... OK
  
Applying admin.0001_initial... OK
  
Applying contenttypes.0002_remove_content_type_name... OK
  
Applying auth.0002_alter_permission_name_max_length... OK
  
Applying auth.0003_alter_user_email_max_length... OK
  
Applying auth.0004_alter_user_username_opts... OK
  
Applying auth.0005_alter_user_last_login_null... OK
  
Applying auth.0006_require_contenttypes_0002... OK
  
Applying sessions.0001_initial... OK
  
# python manage.py runserver
  
Performing system checks...
  
System check identified no issues (0 silenced).
  
October 13, 2015 - 09:51:25Django version 1.8.5, using settings 'mysite.settings'Starting development server at
  
Quit the server with CONTROL-C.
  
# curl http://127.0.0.1:8000


页: [1]
查看完整版本: nginx+uwsgi+django+python 应用架构部署