Wednesday, July 29, 2015

Re: About models validators location

El 29/07/15 10:54, durirompepc@gmail.com escribió:
I've searched for where to put the validators for my models, but I only found that they fit in models.py, outside the model class.
Is that correct or I should create a specific file for them?

I think that you can put validators in another file if you have several of them or want to reuse them somewhere else. Just import them in models.py.

No comments:

Post a Comment