neapolitan
neapolitan copied to clipboard
List/Detail/Form Field Lists
Hi Carlton! 👋🏼 Playing around with Neapolitan 🍨 and I'm wanting to define specific fields lists for the list/detail/form templates. For example, something like:
class RecipeView(CRUDView):
list_fields = ["name"]
detail_fields = ["description"]
form_fields = ["name", "description"]
Played around with this locally, and seemed to work fine. These could also be optional, with fields
as the default/fallback. Could maybe add get_X_fields()
hooks in addition or instead.
Anyway, just something I noticed while tinkering with it today, and wanted to share! Let me know what you think ✌🏼