1. Install Python3.6 add to workon_home system variable
2.pip Install Virtualenvwrapper
3.mkvirtualenv Project1
4.pip install-i https://pypi.douban.com/simple django==1.11 django-filter markdown Pillow
5. Create a new project and select a virtual environment
6.pip install-i https://pypi.douban.com/simple Pyodbc django-pyodbc-azure
7. Configuring a connected Database
DATABASES = { 'default': { 'ENGINE':'Sql_server.pyodbc', 'NAME':'Lele8hao', 'USER':'SA', 'PASSWORD':'sa123', 'HOST':"', 'OPTIONS': { 'Driver':'SQL Server Native Client 11.0', }, }}
Culture in 8.django projects
' Zh-hans ' 'UTC'== = False
9. New apps, Extra_apps package Media db_tools Directory
10.mark as SourceRoot join to root search path
mport Sys # Build paths inside the project like This:os.path.join (Base_dir, ...) Base_dir = Os.path.dirname (Os.path.dirname (Os.path.abspath (__file__'apps ' Extra_apps '))
11. Drag into Xadmin, djangoueditor to Extra_apps
Pip install-i https://pypi.douban.com/simple django-crispy-forms django-import-export django-reversion Django-formtools Future HTTPLIB2 six XLWT Xlsxwriter
In 13.installed_apps
' django_filters ' , ' crispy_forms ' , ' Xadmin ',
In urls.py.
Import= [ # url (r ' ^admin/', admin.site.urls), url (r' ) ^xadmin/ ' , Xadmin.site.urls),]
15.
1. Export the current project PIP installed package table PIP freeze > project directory/requirements.txt2, install PIP package pip Install-r project directory based on exported PIP installation package table/requirements.txt
DRF with SQL Server to build a background management system