Hello,

I'm not exactly sure about your other problems, but the problem with not
getting any styles seem to me like you didn't set your ADMIN_MEDIA_PREFIX
correctly in your settings file and/or your web server configuration file.
You must let it know how to access all the javascript, css and image files
to display your admin pages correctly.

I'm not sure what type web server mediatemple uses, but I am using nginx
(under Debian stable) and I had to put this in my server configuration file:

server {
...
location ^~ /static/admin/ {
  alias /usr/lib/python2.5/sites-packages/django/contrib/admin/media/;
}
location ^~ /static/ {
  root /var/www;
}
...

For apache, I believe an equivalent setting would be something like this in
your virtualhost file:
...
Alias /static/admin/
"/usr/lib/python2.5/sites-packages/django/contrib/admin/media"
...

And in the settings.py file of my project, I set the following:
...
STATIC_URL = '/var/www/static/'
ADMIN_MEDIA_PREFIX = '/static/admin/'

This tells Django to issue the '/static/admin/' prefix whenever it needs
something to display the admin pages, and then the webserver will follow up
by retrieving them from the correct place
(/path/to/python/site-packages/django/contrib/admin/media).

I hope this works. Good luck!

Eiji

P.S. What erratic behaviors are you seeing? Please explain more.

On Thu, Jun 23, 2011 at 1:25 PM, Rishi <rish...@gmail.com> wrote:

> Hi everyone,
> I've just started using Django, and everything has been smooth sailing
> up until this part. I added 'django.contrib.admin' in settings.py for
> installed apps, and changed urls.py to allow for the admin page to
> work. However, the admin page works erratically. That is, at some
> points no matter whether I'm at my root project page or at the admin
> page, I'll always see that light blue django launch page. At other
> times, I get the admin login page to work, but NEVER with any styles
> associated with it. It's always just html plaintext. What's going on,
> and how do I fix it?
>
> A few specifics about my setup. I'm running django completely remotely
> (mediatemple (ve) server), and am using cyberduck/vim concurrently to
> edit the files on the server. I'm working on a mac on my side, and I
> have doublechecked each configuration file to make sure everything is
> saved correctly. I've also installed phpmyadmin and have checked the
> database to make sure that's set up correctly. To the best of my
> knowledge it is.
>
> Thanks for any and all help!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to