Add description field to TrainingItems (#523)

* Add 'description' field to TrainingItems

Renamed existing field to name, removed the dummy property.

* Initial version of training item export view

* Fix line length issue and better spacing on exported PDF

* Added export button to item list

* pep8

* Implement code doctor tweaks

* Attempt to fix odd deployment issue

* Pad headers slightly

* Fix page numbering
This commit is contained in:
2023-02-22 21:07:43 +00:00
committed by GitHub
parent 6550ed2318
commit 8863d86ed0
16 changed files with 144 additions and 41 deletions

View File

@@ -168,7 +168,7 @@ class DuplicateMixin:
class AssetDuplicate(DuplicateMixin, AssetIDUrlMixin, AssetCreate):
def get_initial(self, *args, **kwargs):
initial = super().get_initial(*args, **kwargs)
initial["asset_id"] = models.get_available_asset_id(wanted_prefix=self.get_object().asset_id_prefix)
initial["asset_id"] = models.get_available_asset_id()
return initial
def get_context_data(self, **kwargs):