Browse Source

[django 1.7] explicitly add __all__ fields to the admin forms

Natenom/support-murmur-13-1446181288462
Michael Ziegler 10 years ago
parent
commit
1a92969dd3
  1. 5
      pyweb/mumble/forms.py

5
pyweb/mumble/forms.py

@ -189,8 +189,7 @@ class MumbleAdminForm( MumbleForm ):
class Meta: class Meta:
fields = None
exclude = None
fields = "__all__"
def clean_port( self ): def clean_port( self ):
""" Check if the port number is valid. """ """ Check if the port number is valid. """
@ -227,6 +226,7 @@ class MumbleServerForm( ModelForm ):
self.fields["defaultconf"].initial = _("This server is currently offline.") self.fields["defaultconf"].initial = _("This server is currently offline.")
class Meta: class Meta:
fields = "__all__"
model = MumbleServer model = MumbleServer
class MumbleUserForm( ModelForm ): class MumbleUserForm( ModelForm ):
@ -425,6 +425,7 @@ class MumbleUserAdminForm( PropertyModelForm ):
class Meta: class Meta:
model = MumbleUser model = MumbleUser
fields = "__all__"
class MumbleKickForm( Form ): class MumbleKickForm( Form ):

Loading…
Cancel
Save