Design by CBV in Django

I am currently trying to enter "Class Based Views" with Django 1.5.

From a design point of view, I wonder where to put the logic for processing the data coming from the form into a simple FormView .

I know that all form validation code is included in the method form_valid(). But where to put things that process form data. I read that it is incorrect to inject too much logic into a method form_valid().

There are methods get(), post(), get_context_data(), head()and etc .... that I should use in this case?

+5
source share
2 answers
  • Form validation, data cleansing, etc. comes with form class in clean methods

  • form_valid

! , form_valid...

+1

. , - Python, , .

.

+1

All Articles