Django Admin site display problem, djangosite
Django Admin site display problems
I configured the Django admin site today, but there are some problems with the admin site display. When I open the source code and access the admin css file, http: // localhost: 8000/static/admin/css/base.css, but an Error 404 is returned.
Here are several solutions:
1. Add django. contrib. staticfiles to INSTALLED_APPS in the settings. py file.
Restart the server and try again to check whether the server is normal.
If any problem occurs.
2. Copy admin from the \ django \ contrib \ admin \ static \ folder in django to the static folder. (This is a bit simple and violent)
Why can't I execute django-adminpy startproject mysite? In the command window, the system prompts: it is not an internal or external command.
Python is not included in the path environment variable. Add the python installation directory such as python32 to the path. In this way, you can enter the django-admin.py startproject mysite in the command line.
Django executes django-adminpy startproject mysite and reports SyntaxError: invalid syntax. How can this problem be solved?
If you remember correctly, the list comprehension (list derivation) is supported only when Python2.7 is used)
Commands = {name: 'django. core' for name in find_commands (_ path _ [0])}