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