python3.6 + Xadmin2.0 series (a) xadmin download and install

Environment Configuration: win7 + python3.6 + Django2.1 + xadmin2 + PyCharm

A, Xadmin download and installation:
1, Downloads:

Download: https: //github.com/sshwsfc/xadmin/tree/django2

2, installation

With pip install the downloaded package

D install PIP: \ xadmin-django2.zip
3, in the project we may need to do some xadmin customized development, it is recommended to add xadmin source code to the project

In a new project EXTRA_APPS directory, unzip previously downloaded xadmin-django2.zip, which copies the entire folder to EXTRA_APPS xadmin in the following figure:

Second, the configuration xadmin
1, add xadmin directory to search path python focus:

Modify project settings, add the following statement in which:

sys.path.insert(0,os.path.join(BASE_DIR,‘extra_apps’))

2, registration xadmin

3, modify the project file urls.py

4, run the following command to generate a data table xadmin

makemigrations xadmin

migrate xadmin

5, run the project, landing xadmin

If the page is displayed in English, the next settings.py configuration change, you can show the Chinese, as follows:

Published 23 original articles · won praise 0 · Views 567

Guess you like

Origin blog.csdn.net/cbiexi/article/details/104831502