neapolitan icon indicating copy to clipboard operation
neapolitan copied to clipboard

List/Detail/Form Field Lists

Open djpeacher opened this issue 1 year ago • 10 comments

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 ✌🏼

djpeacher avatar Jun 12 '23 20:06 djpeacher