我的 Django 应用程序的管理员如下所示。
显然,一些样式表已经丢失和/或损坏。
问题:
- 哪些样式表用于以默认方式呈现 Django 管理员?
- 我在哪里可以找到它们?
更新 1 (10.06.2013 00:18 MSK):执行manage.py collectstatic
会产生以下输出,并且不会改变管理员的外观。
D:\dev\history-site>C:\Python25\python manage.py collectstatic
You have requested to collect static files at the destination
location as specified in your settings.
This will overwrite existing files!
Are you sure you want to do this?
Type 'yes' to continue, or 'no' to cancel: yes
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\css\bas
e.css'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\css\cha
ngelists.css'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\css\das
hboard.css'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\css\for
ms.css'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\css\ie.
css'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\css\log
in.css'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\css\rtl
.css'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\css\wid
gets.css'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\img\cha
ngelist-bg.gif'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\img\cha
ngelist-bg_rtl.gif'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\img\cho
oser-bg.gif'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\img\cho
oser_stacked-bg.gif'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\img\def
ault-bg-reverse.gif'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\img\def
ault-bg.gif'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\img\del
eted-overlay.gif'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\img\ico
n-no.gif'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\img\ico
n-unknown.gif'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\img\ico
n-yes.gif'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\img\ico
n_addlink.gif'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\img\ico
n_alert.gif'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\img\ico
n_calendar.gif'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\img\ico
n_changelink.gif'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\img\ico
n_clock.gif'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\img\ico
n_deletelink.gif'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\img\ico
n_error.gif'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\img\ico
n_searchbox.png'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\img\ico
n_success.gif'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\img\inl
ine-delete-8bit.png'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\img\inl
ine-delete.png'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\img\inl
ine-restore-8bit.png'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\img\inl
ine-restore.png'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\img\inl
ine-splitter-bg.gif'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\img\nav
-bg-grabber.gif'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\img\nav
-bg-reverse.gif'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\img\nav
-bg-selected.gif'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\img\nav
-bg.gif'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\img\sel
ector-icons.gif'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\img\sel
ector-search.gif'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\img\sor
ting-icons.gif'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\img\too
l-left.gif'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\img\too
l-left_over.gif'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\img\too
l-right.gif'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\img\too
l-right_over.gif'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\img\too
ltag-add.gif'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\img\too
ltag-add_over.gif'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\img\too
ltag-arrowright.gif'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\img\too
ltag-arrowright_over.gif'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\img\gis
\move_vertex_off.png'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\img\gis
\move_vertex_on.png'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\js\acti
ons.js'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\js\acti
ons.min.js'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\js\cale
ndar.js'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\js\coll
apse.js'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\js\coll
apse.min.js'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\js\comp
ress.py'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\js\core
.js'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\js\getE
lementsBySelector.js'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\js\inli
nes.js'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\js\inli
nes.min.js'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\js\jque
ry.init.js'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\js\jque
ry.js'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\js\jque
ry.min.js'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\js\LICE
NSE-JQUERY.txt'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\js\prep
opulate.js'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\js\prep
opulate.min.js'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\js\Sele
ctBox.js'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\js\Sele
ctFilter2.js'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\js\time
parse.js'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\js\urli
fy.js'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\js\admi
n\DateTimeShortcuts.js'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\js\admi
n\ordering.js'
Copying 'C:\Python25\lib\site-packages\django\contrib\admin\static\admin\js\admi
n\RelatedObjectLookups.js'
72 static files copied.
D:\dev\history-site>
更新 2(10.06.2013 00:28):这是我的urls.py
文件:
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.conf.urls import patterns, include, url
from django.contrib import admin
from django.conf import settings
admin.autodiscover()
urlpatterns = patterns('',
(r'^$', 'history_site.views.home'),
(r'^opinion/(\d+)$', 'history_site.views.opinion_details'),
(r'^admin/', include(admin.site.urls)),
(r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
)
urlpatterns += staticfiles_urlpatterns()