Hi all,
I just look 3811 revision... tha patch makes posible you can run
development server with:
./manage.py runserver --adminmedia /foo/path/
It is a good idea, but I think it can be done besides with a
ADMIN_MEDIA_DIR (or ADMIN_MEDIA_ROOT) setting, instead of have to
remember runserver with that option.
In this moment, the code, in basehttp.py is this:
class AdminMediaHandler(object):
def __init__(self, application, media_dir = None):
from django.conf import settings
self.application = application
if not media_dir:
import django
self.media_dir = django.__path__[0] + '/contrib/admin/media'
else:
self.media_dir = media_dir
self.media_url = settings.ADMIN_MEDIA_PREFIX
But I think is better, posibility of setting this directory on
settings.py. Code may look this:
class AdminMediaHandler(object):
def __init__(self, application, media_dir = None):
from django.conf import settings
self.application = application
if not media_dir:
# LOOK THIS!!!!
if hasattr(settings, 'ADMIN_MEDIA_DIR'):
self.media_dir = settings.ADMIN_MEDIA_DIR
else:
import django
self.media_dir = django.__path__[0] +
'/contrib/admin/media'
else:
self.media_dir = media_dir
self.media_url = settings.ADMIN_MEDIA_PREFIX
What do you think??
Cheers,
--
Manuel Saelices
[EMAIL PROTECTED]
ICS Yaco S.L.
http://www.yaco.es/
Tlfno. +34 954 50 00 57
Fax +34 954 50 09 29
C/ Sierpes, 48
Sevilla
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-developers
-~----------~----~----~----~------~----~------~--~---