Uses a list of fields rather than exclusions for edit book form

This commit is contained in:
Mouse Reeve 2022-12-11 10:58:19 -08:00
parent 3b56c85a87
commit ca5676c287

View file

@ -18,19 +18,28 @@ class CoverForm(CustomForm):
class EditionForm(CustomForm): class EditionForm(CustomForm):
class Meta: class Meta:
model = models.Edition model = models.Edition
exclude = [ fields = [
"remote_id", "title",
"origin_id", "subtitle",
"created_date", "description",
"updated_date", "series",
"edition_rank", "series_number",
"authors", "languages",
"parent_work", "subjects",
"shelves", "publishers",
"connector", "first_published_date",
"search_vector", "published_date",
"links", "cover",
"file_links", "physical_format",
"physical_format_detail",
"pages",
"isbn_13",
"isbn_10",
"openlibrary_key",
"inventaire_id",
"goodreads_key",
"oclc_number",
"asin",
] ]
widgets = { widgets = {
"title": forms.TextInput(attrs={"aria-describedby": "desc_title"}), "title": forms.TextInput(attrs={"aria-describedby": "desc_title"}),