mirror of
https://github.com/django/django.git
synced 2025-11-19 03:08:59 +00:00
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
This commit is contained in:
parent
89e0e8b6bc
commit
38a2444277
118 changed files with 485 additions and 418 deletions
|
|
@ -1,5 +1,4 @@
|
|||
from django import forms
|
||||
from django.conf import settings
|
||||
from django.contrib.admin.util import (flatten_fieldsets, lookup_field,
|
||||
display_for_field, label_for_field, help_text_for_field)
|
||||
from django.contrib.contenttypes.models import ContentType
|
||||
|
|
@ -75,8 +74,8 @@ class Fieldset(object):
|
|||
|
||||
def _media(self):
|
||||
if 'collapse' in self.classes:
|
||||
js = ['js/jquery.min.js', 'js/jquery.init.js', 'js/collapse.min.js']
|
||||
return forms.Media(js=['%s%s' % (settings.ADMIN_MEDIA_PREFIX, url) for url in js])
|
||||
js = ['jquery.min.js', 'jquery.init.js', 'collapse.min.js']
|
||||
return forms.Media(js=['admin/js/%s' % url for url in js])
|
||||
return forms.Media()
|
||||
media = property(_media)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue