mirror of
https://github.com/django/django.git
synced 2025-08-01 17:42:56 +00:00
Fixed #26919 -- Added the action form's media in the changelist view.
This commit is contained in:
parent
b785927b44
commit
b387189d86
4 changed files with 21 additions and 0 deletions
|
@ -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']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue