admin has no css

1 view
Skip to first unread message

Tony Guo

unread,
Nov 21, 2008, 2:05:25 AM11/21/08
to Pinax Users
Hi, all, i just have a problem in deploy pinax.

When i run pinax's complete_project from manage.py runserver, i can
visit admin with css styles,

but when i deploy pinax in the server with mod_python mode, i cannot
see the css styles.


Tajid Yakub

unread,
Nov 21, 2008, 2:24:51 AM11/21/08
to Pinax Users
Make sure you adjust the
ADMIN_MEDIA_PREFIX =
in settings.py, most probably it is the cause..

Tony Guo

unread,
Nov 21, 2008, 2:30:17 AM11/21/08
to Pinax Users
i didn't modify the ADMIN_MEDIA_PREFIX

it is set to media.

Brian Rosner

unread,
Nov 21, 2008, 2:30:32 AM11/21/08
to pinax...@googlegroups.com
On Fri, Nov 21, 2008 at 12:05 AM, Tony Guo <guot...@gmail.com> wrote:
[..]

> but when i deploy pinax in the server with mod_python mode, i cannot
> see the css styles.

Sounds like you didn't map your web server to the media. runserver
maps admin media automagically and Pinax does the same for site_media
when SERVE_MEDIA = True. Take a look at this
http://docs.djangoproject.com/en/dev/howto/deployment/modpython/#id1
to get some more information.

--
Brian Rosner
http://oebfare.com

Tajid Yakub

unread,
Nov 21, 2008, 2:42:47 AM11/21/08
to Pinax Users
What I did to get it right under mod python,

1. Make an Apache Virtual Host (subdomain) for media files (include
the project's site-media), document root to your main media dir.
2. Inside media folder I have site_media dir and admin media dir = a
symbolic link from /path/to/django/admin/media/
3. Adjust my settings.py into something like;

ADMIN_MEDIA_PREFIX = 'http://media.domain.com/media/admin/'
MEDIA_ROOT = "/my/media/dir/"
MEDIA_URL = 'http://media.domain.com/site_media/'

Tony Guo

unread,
Nov 21, 2008, 3:12:00 AM11/21/08
to Pinax Users
I cannot use this method.

Are there some easy way for share-host ?

Adam Nelson

unread,
Nov 21, 2008, 9:18:57 AM11/21/08
to pinax...@googlegroups.com
I had a similar problem. I did a bunch of things including moving to
WSGI from mod_python. I think that is the move that helped out but I
can't be sure.

Sorry I can't be of more assistance.

Dougn

unread,
Nov 21, 2008, 12:38:13 PM11/21/08
to Pinax Users
Tony,
Does your shared hosting supply a means of serving up static
files?
You just need to serve up the media directory somehow on th shared
host and have your settings point to that URL.

-Doug
Reply all
Reply to author
Forward
0 new messages