1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

Fixed #26919 -- Added the action form's media in the changelist view.

This commit is contained in:
Stanislav Karpov
2016-07-20 15:38:07 +04:00
committed by Tim Graham
parent b785927b44
commit b387189d86
4 changed files with 21 additions and 0 deletions

View File

@@ -1,5 +1,6 @@
from django import forms
from django.contrib.admin.forms import AdminAuthenticationForm
from django.contrib.admin.helpers import ActionForm
class CustomAdminAuthenticationForm(AdminAuthenticationForm):
@@ -12,3 +13,8 @@ class CustomAdminAuthenticationForm(AdminAuthenticationForm):
if username == 'customform':
raise forms.ValidationError('custom form error')
return username
class MediaActionForm(ActionForm):
class Media:
js = ['path/to/media.js']