mirror of https://github.com/django/django.git
Fixed media creation in the add_view. It was not pulling media from the correct place.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8384 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
415bf3efb3
commit
f586c0b039
|
@ -583,14 +583,13 @@ class ModelAdmin(BaseModelAdmin):
|
|||
|
||||
adminForm = AdminForm(form, list(self.get_fieldsets(request)), self.prepopulated_fields)
|
||||
media = self.media + adminForm.media
|
||||
for formset in formsets:
|
||||
media = media + formset.media
|
||||
|
||||
inline_admin_formsets = []
|
||||
for inline, formset in zip(self.inline_instances, formsets):
|
||||
fieldsets = list(inline.get_fieldsets(request))
|
||||
inline_admin_formset = InlineAdminFormSet(inline, formset, fieldsets)
|
||||
inline_admin_formsets.append(inline_admin_formset)
|
||||
media = media + inline_admin_formset.media
|
||||
|
||||
context = {
|
||||
'title': _('Add %s') % force_unicode(opts.verbose_name),
|
||||
|
|
Loading…
Reference in New Issue