datamade / how-to

📚 Doing all sorts of things, the DataMade way
MIT License
80 stars 12 forks source link

Write guidance on best practices for forms #330

Closed smcalilly closed 8 months ago

smcalilly commented 1 year ago

Documentation request

We have a lot of CRUD apps that require us to use django forms. They're a bit of a mixed bag. They're a nice way to serialize and validate data, but they can get complicated once your form needs to accept data from model relationships, all within the same web page.

Documentation needs to consider these things (non-exhaustive):

We need some good guidance on the best practices for django forms that answers these questions:

I'm curious to hear everybody's answers to these questions so we can create some best practices that reflects our team's opinions.

hancush commented 1 year ago

PLUS ONE (THOUSAND).

Screenshot 2023-05-12 at 11 39 32 AM Screenshot 2023-05-12 at 11 38 48 AM

Funny to see what issues linger. :-) Welcome to the legacy, @smcalilly and @xmedr!

smcalilly commented 1 year ago

@smcalilly to narrow the scope to model relationship forms.

Admin dashboard -- inline formsets

what are good patterns within django? using django forms (ignore javascript forms)

what are good patterns for many to many forms?

smcalilly commented 8 months ago

i still haven't figured out how to use django forms the way i want, nor have i found any examples online that address my pain points. i think a more productive focus for me before addressing any sort of documentation is to come up with implementations that i like.