model forms need at least exclude
parent
d8eb4297d9
commit
05af9db11c
5
admin.py
5
admin.py
|
@ -67,6 +67,7 @@ class ClaimAdminForm(forms.ModelForm):
|
|||
)
|
||||
class Meta(object):
|
||||
model = models.Claim
|
||||
exclude = ()
|
||||
|
||||
class ClaimAdmin(ModelAdmin):
|
||||
list_display = ('work', 'rights_holder', 'status')
|
||||
|
@ -81,6 +82,7 @@ class RightsHolderAdminForm(forms.ModelForm):
|
|||
)
|
||||
class Meta(object):
|
||||
model = models.RightsHolder
|
||||
exclude = ()
|
||||
|
||||
class RightsHolderAdmin(ModelAdmin):
|
||||
date_hierarchy = 'created'
|
||||
|
@ -143,6 +145,7 @@ class EditionAdminForm(forms.ModelForm):
|
|||
)
|
||||
class Meta(object):
|
||||
model = models.Edition
|
||||
exclude = ()
|
||||
|
||||
class EditionAdmin(ModelAdmin):
|
||||
list_display = ('title', 'publisher_name', 'created')
|
||||
|
@ -160,6 +163,7 @@ class PublisherAdminForm(forms.ModelForm):
|
|||
|
||||
class Meta(object):
|
||||
model = models.Publisher
|
||||
exclude = ()
|
||||
|
||||
class PublisherAdmin(ModelAdmin):
|
||||
list_display = ('name', 'url', 'logo_url', 'description')
|
||||
|
@ -237,6 +241,7 @@ class MARCRecordAdminForm(forms.ModelForm):
|
|||
)
|
||||
class Meta(object):
|
||||
model = MARCRecord
|
||||
exclude = ()
|
||||
|
||||
class MARCRecordAdmin(ModelAdmin):
|
||||
list_display = ('edition', 'user')
|
||||
|
|
|
@ -323,6 +323,7 @@ class RightsHolderForm(forms.ModelForm):
|
|||
)
|
||||
class Meta:
|
||||
model = RightsHolder
|
||||
exclude = ()
|
||||
|
||||
def clean_rights_holder_name(self):
|
||||
rights_holder_name = self.data["rights_holder_name"]
|
||||
|
@ -853,6 +854,7 @@ class MsgForm(forms.Form):
|
|||
class PressForm(forms.ModelForm):
|
||||
class Meta:
|
||||
model = Press
|
||||
exclude = ()
|
||||
|
||||
widgets = {
|
||||
'date': SelectDateWidget(years=range(2010,2025)),
|
||||
|
|
|
@ -100,6 +100,7 @@ class cardnum:
|
|||
class Meta:
|
||||
model = LibraryUser
|
||||
widgets = { 'library': forms.HiddenInput, 'user': forms.HiddenInput }
|
||||
exclude = ()
|
||||
class email:
|
||||
def authenticate(self,request, library):
|
||||
if request.user.is_anonymous():
|
||||
|
|
Loading…
Reference in New Issue