Django Admin site display problem, djangosite

Source: Internet
Author: User

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])}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.