#14961 closed (fixed)
Cannot load admin interface static files when doing tutorial
Reported by: | Owned by: | Jannis Leidel | |
---|---|---|---|
Component: | Contrib apps | Version: | 1.3-alpha |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Version is actually 1.3 beta 1
I started to explore Django by going thru the tutorial ( http://docs.djangoproject.com/en/dev/intro/tutorial01/ ).
However when I activated the admin interface (tutorial part 2) and opened the admin interface in browser, it looks pretty ugly. I poked a little and found out that no css file cannot be loaded. Both css files referenced in the 127.0.0.1:8000/admin/ page give 404 error. Urls for css files:
/static/admin/css/base.css
/static/admin/css/dashboard.css
Attachments (2)
Change History (15)
comment:1 by , 14 years ago
comment:2 by , 14 years ago
django.contrib.staticfiles is there by default. I created the project following the steps in tutorial.
comment:3 by , 14 years ago
Component: | Uncategorized → django-admin.py runserver |
---|
More information:
- OS: Windows XP
- Python version 2.7
- Python installed in c:\python27\
- Tutorial project in d:\harriv\djangotest\mysite\
comment:5 by , 14 years ago
DEBUG is True.
I tried minimal test case and just enabled the admin interface, no difference in results. I'll attach settings.py and urls.py.
by , 14 years ago
by , 14 years ago
Attachment: | settings.py added |
---|
comment:6 by , 14 years ago
I am also experiencing this issue when running 1.3 beta1 on Windows 7. I am new to Django and have not diverged from the steps in the tutorial.
Confirming the specific questions asked earlier:
- django.contrib.staticfiles is enabled in INSTALLED_APPS
- DEBUG variable in setting.py is set to True
comment:7 by , 14 years ago
Component: | django-admin.py runserver → Contrib apps |
---|---|
milestone: | → 1.3 |
Owner: | changed from | to
Status: | new → assigned |
Triage Stage: | Unreviewed → Accepted |
comment:9 by , 14 years ago
Seems like https://gist.github.com/d2b873845d5a49627f8e fixes the issue for me. Going to add tests tomorrow.
comment:10 by , 14 years ago
I can confirm that patch by jezdez fixes the problem. However there's another similar case in the same file, class AppDirectoriesFinder, method find_in_app.
comment:11 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
1.3 adds the new staticfiles app to serve static app files. When creating a new project with
django-admin.py startproject mysite
it should contain the
django.contrib.staticfiles
in INSTALLED_APPS. Can you check if that works for you (it does for me)?