On 21/05/2013 11:07am, djingo django wrote:
>
> I'm starting to learn Django and have been reading through the
> djangobook.com. I am able to get the code running when I come to
> Chapter 6: The Django Admin Site, but it looks nothing like the
> well-formed and well-styled screenshots in the documentation. The text
> appears ragged and unstyled.
>
> Am I missing a CSS stylesheet to make the admin interface line up and
> get styled properly? How can I fix this?
Yes. If you "View page source" in your browser you should see something
like this ...
<link rel="stylesheet" type="text/css" href="/static/admin/css/base.css" />
<link rel="stylesheet" type="text/css"
href="/static/admin/css/dashboard.css" />
So if the stylesheets cannot be found, which web server are you using?
If you are not using the Django dev server, you need to configure your
web server to look for such static files in a particular location
(defined in settings.py as STATIC_ROOT) then run "manage.py
collectstatic" to put them there.
https://docs.djangoproject.com/en/1.5/howto/static-files/
>
> --
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to django-users+unsubscribe@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment