Re: DEP Pre-posal: Re-Designing Django Forms

2018-02-05 Thread Dmitriy Sintsov
Hi. Client-side implementation of fields visual behavior and their validation should be hooked up via document.ready custom JS scripts via form ID or form class. There is no universal solution for that. When using pure client-side forms from npm, it is possible to map these to Django models

Re: DEP Pre-posal: Re-Designing Django Forms

2018-02-05 Thread Robert Roskam
Hey Tom, My main goal is to improve the Django Form API interface for writing Python code for what Django has historically done: server-side rendered web pages. So any client-validation hooks I might provide would not be fully implemented integrations rather a more convenient integration. (I'm

Re: DEP Pre-posal: Re-Designing Django Forms

2018-02-05 Thread Tom Forbes
> Perhaps we should just be able to swap Forms with WTForms or another python library and bake in ElementUI, There are a plethora of UI frameworks with different tradeoffs, I really don't think Django sound pick one. However a stronger integration with the JS-build tools of the day like Yarn,

RE: DEP Pre-posal: Re-Designing Django Forms

2018-02-05 Thread Matthew Pava
evelopers@googlegroups.com [mailto:django-developers@googlegroups.com] On Behalf Of Jamesie Pic Sent: Saturday, February 3, 2018 6:36 PM To: django-developers@googlegroups.com Subject: Re: DEP Pre-posal: Re-Designing Django Forms On Thu, Feb 1, 2018 at 12:46 PM, Marc Tamlyn <marc.tam.

Re: DEP Pre-posal: Re-Designing Django Forms

2018-02-03 Thread Jamesie Pic
On Thu, Feb 1, 2018 at 12:46 PM, Marc Tamlyn wrote: > This is a huge project to achieve everything you mentioned in your email, and it has implications across a large number of Django packages (not least the admin). I don't want to discourage you, but don't underestimate

Re: DEP Pre-posal: Re-Designing Django Forms

2018-02-01 Thread Marc Tamlyn
Hi Robert, I have a whole heap of ideas about this, some of which are captured in documentation here: http://django-adapters.readthedocs.io/en/latest/ The code generally doesn't exist yet, but the project is at https://github.com/ mjtamlyn/django-adapters. This is a *huge* project to achieve

Re: DEP Pre-posal: Re-Designing Django Forms

2018-01-31 Thread Collin Anderson
I personally use the (undocumented?) formfield() method, which takes the model defaults and lets you override things. I think it's pretty elegant, though maybe it could use some less verbose syntax (maybe have a forms.ModelDefault(label='Note') that does this for you). class