WebFaction
Community site: login faq

Is there any definitive documentation for setting up the Django 1.3 admin?

I tried following the Django setup video, which isn't updated for changes to the 1.3 settings.py file - it shows how to enter the MEDIAROOT and MEDIAURL, but doesn't show the STATICROOT and STATICURL lines. The written tutorial below the video has the opposite problem - STATIC options but not MEDIA.

I ended up able to access the admin, but it doesn't have any styling. I've found others on the forums here who have had the same problem and I've tried the offered solution, but nothing seems to work. Frankly, at this point I think I've tried so many permutations that I'm sure I've been within a leading or trailing slash of success. What I really want/need at this point is a step-by-step guide to show how my static apps are supposed to be set up and what needs to go into the settings.py file.

Does that exist somewhere that I'm missing?

asked 14 Mar '12, 16:14

bwareham
32259
accept rate: 100%

Thanks. I submitted a support ticket and got my answer. I was missing a /admin/ pointer in my symlink.

(16 Mar '12, 11:53) bwareham

Further in the docs this process is explained.

If you have any issues you may submit a support ticket and we will explain what is missing from your current setup and how to correct it.

permanent link

answered 14 Mar '12, 22:25

johns
5.3k312
accept rate: 23%

to get the admin styled correctly:

  1. create a symlink in your directory from where you serve your static files (images, css, js, etc.). The symlink points to /home/yourhome/webapps/yourapp/lib/python2.7/django/contrib/admin

  2. fire up your browser and make sure you can access the admin dir through the web.

  3. Copy the url (better only the relative portion of the path), open settings.py, look for ADMIN_MEDIA_PREFIX and paste your url there.

  4. restart apache

permanent link

answered 15 Mar '12, 02:28

markusbarth
1126
accept rate: 0%

edited 15 Mar '12, 02:29

That's actually the old way. The new way is to use the collectstatic management command to get all of your static assets into one location, and then serve them from there (as described in our current docs).

(15 Mar '12, 08:35) seanf

Thanks for the hint, I have just had a look at https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/

(15 Mar '12, 11:15) markusbarth
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×908
×40
×17

question asked: 14 Mar '12, 16:14

question was seen: 2,775 times

last updated: 16 Mar '12, 11:53

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM