diff options
| author | Jannis Leidel <jannis@leidel.info> | 2011-06-30 09:06:19 +0000 |
|---|---|---|
| committer | Jannis Leidel <jannis@leidel.info> | 2011-06-30 09:06:19 +0000 |
| commit | 38a2444277a84eb6b74425f0e324d1dceb7d2ef1 (patch) | |
| tree | 1bfffc0cc808a57c1250c6e7e2986f8ba721fd9c /django/contrib/gis/admin/widgets.py | |
| parent | 89e0e8b6bc861bb95e55bd5e255e756fe3be1cf2 (diff) | |
Fixed #16050 -- BACKWARDS-INCOMPATIBLE CHANGE: Moved static files of the admin to conventional file system location.
This also removes the need for ADMIN_MEDIA_PREFIX and replaces it with the convention to find admin's static files at STATIC_URL + 'admin/'.
Thanks to Jacob for the review and general help.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16487 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/contrib/gis/admin/widgets.py')
| -rw-r--r-- | django/contrib/gis/admin/widgets.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/django/contrib/gis/admin/widgets.py b/django/contrib/gis/admin/widgets.py index be26261b54..49de09511d 100644 --- a/django/contrib/gis/admin/widgets.py +++ b/django/contrib/gis/admin/widgets.py @@ -1,15 +1,16 @@ from django.conf import settings -from django.contrib.gis.gdal import OGRException -from django.contrib.gis.geos import GEOSGeometry, GEOSException from django.forms.widgets import Textarea from django.template import loader, Context +from django.templatetags.static import static from django.utils import translation +from django.contrib.gis.gdal import OGRException +from django.contrib.gis.geos import GEOSGeometry, GEOSException + # Creating a template context that contains Django settings # values needed by admin map templates. -geo_context = Context({'ADMIN_MEDIA_PREFIX' : settings.ADMIN_MEDIA_PREFIX, - 'LANGUAGE_BIDI' : translation.get_language_bidi(), - }) +geo_context = Context({'ADMIN_MEDIA_PREFIX' : static('admin/'), + 'LANGUAGE_BIDI' : translation.get_language_bidi()}) class OpenLayersWidget(Textarea): """ |
