Django adds admin background management:
[root@hz byrd]# python manage.py syncdb #建表, setting up administrators
[Root@hz byrd]# Cat byrd/urls.py
Urlpatterns = Patterns ("",
# Examples:
# URL (R ' ^$ ', ' {project_name}}.views.home ', name= ' home '),
# URL (r ' ^{{project_name}}/', include (' {{project_name}}.foo.urls ')),
# Uncomment the Admin/doc line below to enable admin documentation:
# URL (R ' ^admin/doc/', include (' Django.contrib.admindocs.urls ')),
# Uncomment the next line to enable the admin:
URL (r ' ^admin/', include (Admin.site.urls)), #将admin注释去掉
)
Access: Http://mydomain/admin found the style is incorrect,/static/admin/css/base.css such style newspaper 404 did not find the error!
Continue testing: Python manage.py runserver 0.0.0.0:8080 found that the style was loaded without nginx.
Workaround:
location/static/{
Alias/python directory/site-packages/django/contrib/admin/static/;
}