django - Should view logic be abstracted to other modules? -


i have handful of functions in of views abstracted away. looking through django docs, couldn't find info on best place keep them.

so should go:

1: in view, abstracted away function.

or

2: in new module within same django application.

it depend on views do, if verify form data, use django-forms handle form data, , can make code cleaner. you can take @ them here.

if lot of things models, create django modelmanager handle queries in views.

however, if think there lot of boiler-plate code not fit of these, why not use django cbvs rid of having write boiler-plate code on again.

it comes down want.


Comments

Popular posts from this blog

php - get table cell data from and place a copy in another table -

javascript - Mootools wait with Fx.Morph start -

php - Navigate throught databse rows -