L
L
ladozverxdd2017-08-31 01:41:21
Django
ladozverxdd, 2017-08-31 01:41:21

Logic in models or view in Django?

Hello. Where in Django is it customary to implement password validation / hashing and various other methods for model fields - in the model itself (as in Rails, for example) or in the view?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DennyD314, 2017-08-31
@ladozverxdd

Better in models, such code is easier to maintain and supplement, if multiple.
In more detail, here are a couple of good articles:
https://habrahabr.ru/post/213875/
https://habrahabr.ru/company/mailru/blog/328352/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question