mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Further removal of static admin validation that can fail erroneously
This commit is contained in:
parent
1906cb9360
commit
1e37cb37ce
3 changed files with 0 additions and 40 deletions
|
@ -269,8 +269,6 @@ class ValidationTestCase(TestCase):
|
|||
"""
|
||||
class SongForm(forms.ModelForm):
|
||||
extra_data = forms.CharField()
|
||||
class Meta:
|
||||
model = Song
|
||||
|
||||
class FieldsOnFormOnlyAdmin(admin.ModelAdmin):
|
||||
form = SongForm
|
||||
|
|
|
@ -682,27 +682,6 @@ class ValidationTests(unittest.TestCase):
|
|||
|
||||
validate(BandAdmin, Band)
|
||||
|
||||
class AdminBandForm(forms.ModelForm):
|
||||
class Meta:
|
||||
model = Band
|
||||
|
||||
class BandAdmin(ModelAdmin):
|
||||
form = AdminBandForm
|
||||
|
||||
fieldsets = (
|
||||
('Band', {
|
||||
'fields': ('non_existent_field',)
|
||||
}),
|
||||
)
|
||||
|
||||
six.assertRaisesRegex(self,
|
||||
ImproperlyConfigured,
|
||||
"'BandAdmin.fieldsets\[0]\[1\]\['fields'\]' refers to field 'non_existent_field' that is missing from the form.",
|
||||
validate,
|
||||
BandAdmin,
|
||||
Band,
|
||||
)
|
||||
|
||||
class AdminBandForm(forms.ModelForm):
|
||||
delete = forms.BooleanField()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue