Django: avoiding duplication of code on the server side and on the client side

How to avoid duplicate verification code on server side and client side using Django?

Given that Django follows the principle of Do not Repeat Yourself, it is logical that there would be a way to do this, but I have no idea how to do this.

+4
source share
1 answer

Here's an unfinished project (alpha class) that solves your problem: http://eikke.com/django-validation-an-introduction/ :

So, I was thinking for some time to create a Django template that allows you to create a client side Javascript form validation code without writing code (if you do not use custom widgets) .... The resulting project is called django-validation .

(And see also Django ticket # 19 )

+3
source

All Articles