这很奇怪,因为我查看了我的公用文件夹并看到文件 admin 有内容
link /usr/local/lib/python2.7/dist-packages/django/contrib/admin/static/admin
当我转到服务器上的那个位置时,文件都在那里,但它似乎并没有真正链接到那里。身份验证文件也是如此。我可以复制文件,但我认为这不是正确的方法。奇怪的是,这在以前有效
我的url.py (相关行)
from django.conf.urls import patterns, include, url
from views import *
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.contrib.auth.views import login, logout
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
(r'^admin/',include(admin.site.urls)),
)
urlpatterns += staticfiles_urlpatterns()
# 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)),