I agree with Jani that you should think about trying to make the proposal 
accommodate different JavaScript frameworks. You might look at 
https://github.com/jrief/django-angular, for example, for inspiration.

Just thinking about what problems Django should be trying to solve, I'm 
wondering if client-side JavaScript validation might be obsoleted to some 
extent as browsers improve support for HTML5 validation?

On Tuesday, March 22, 2016 at 8:23:39 AM UTC-4, Jani Tiainen wrote:
>
>
>
> On 20.03.2016 14:59, Lover Di wrote:
>
> Hi,
>
> I have been working for preparing a proposal about a new feature for 
> Django. I'm posting my draft proposal to Gist and want to know my idea is 
> OK or not. So I can proceed with the right approach. Any suggestions or 
> advice are welcome.
>
> Abstract of my proposal:
>
>    - Automatically generate some simple javascript code to check the 
>    validity for forms
>    - Many dynamic forms use similar logic, they can be abstracted into a 
>    framework to help generated view code and javascript code, users only need 
>    to fill out the logic of "how to change". Thus, the workload of write 
>    dynamic form greatly reduced. 
>
>
> Proposal URL: https://gist.github.com/7sDream/46de98da073b9021c5d0
>
> Hi, 
>
> Your proposal does have few points that I would like to address so you 
> could make your proposal more solid:
>
>  - What changes are required in Django core/forms to make this work? By 
> looking your current proposal it looks like something that can be done 
> without any changes to Django core/forms. This is actually your "homework" 
> that you have to do for proposal. 
>
>  - You propose that this could be "django.contrib" package.That gives a 
> hint that this could be a 3rd party package. So it would be beneficial that 
> you actually do some reference implementation for example for few fields to 
> backup your proposal. If this requires some changes to core, you can point 
> them out in your proposal much easier.
>
>  - Django has a tradition to be agnostic from client side JS frameworks. 
> Your proposition states that validation would use jQuery. What if I want to 
> use something else like Dojotoolkit or ExtJS (which I do use, I don't use 
> jQuery at all).
>
>  - In your proposal Javascript is generated in a Python. It's generally 
> considered already a bad thing that forms makes certain rendering designs 
> HTML. Your proposal is to move more representation parts into Python side. 
> Could some of it be moved to presentation layer (templates)?
>
> -- 
>
> Jani Tiainen
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/15a70825-5f60-47ec-b53d-1bca5b7952d4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to