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 Meta:
model = models.Edition
exclude = [
"remote_id",
"origin_id",
"created_date",
"updated_date",
"edition_rank",
"authors",
"parent_work",
"shelves",
"connector",
"search_vector",
"links",
"file_links",
fields = [
"title",
"subtitle",
"description",
"series",
"series_number",
"languages",
"subjects",
"publishers",
"first_published_date",
"published_date",
"cover",
"physical_format",
"physical_format_detail",
"pages",
"isbn_13",
"isbn_10",
"openlibrary_key",
"inventaire_id",
"goodreads_key",
"oclc_number",
"asin",
]
widgets = {
"title": forms.TextInput(attrs={"aria-describedby": "desc_title"}),