mirror of
https://github.com/django/django.git
synced 2025-11-19 19:24:46 +00:00
Fixed #15252 -- Added static template tag and CachedStaticFilesStorage to staticfiles contrib app.
Many thanks to Florian Apolloner and Jacob Kaplan-Moss for reviewing and eagle eyeing. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16594 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
e9a909e30a
commit
1d32bdd3c9
33 changed files with 646 additions and 148 deletions
|
|
@ -1,6 +1,7 @@
|
|||
from django import forms
|
||||
from django.contrib.admin.util import (flatten_fieldsets, lookup_field,
|
||||
display_for_field, label_for_field, help_text_for_field)
|
||||
from django.contrib.admin.templatetags.admin_static import static
|
||||
from django.contrib.contenttypes.models import ContentType
|
||||
from django.core.exceptions import ObjectDoesNotExist
|
||||
from django.db.models.fields.related import ManyToManyRel
|
||||
|
|
@ -75,7 +76,7 @@ class Fieldset(object):
|
|||
def _media(self):
|
||||
if 'collapse' in self.classes:
|
||||
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(js=[static('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