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:
committed by
Tim Graham
parent
b785927b44
commit
b387189d86
@@ -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']
|
||||
|
||||
Reference in New Issue
Block a user