Home > Mobile >  in Django, does class based view is enough for CRUD and can do anything a "noraml view" ca
in Django, does class based view is enough for CRUD and can do anything a "noraml view" ca

Time:10-03

I have found that class-based views can save time and effort and are more efficient than normal views however I have learned it In the scope of CRUD operation and I don't know if it can do more than this. my question is if class-based views can do anything so no need to create views in a regular way or if the regular way has some pros over class-based views?

CodePudding user response:

  • I can work with GCBV
  • With GCBV i can do all what i want.
  • I can inherit any view and do something more.

I don't understand, why you think, what Viev, TemplateView, FormView they are CRUD scope?

But:

  • I can work with func-based views.
  • I can do, all what i want.
  • I can decorate func-views and do something more.

By The way - Func-based Views is not "Regular".

What I want to say:

We don't have a dedicated solution in Django. It depends on your project or your knowledge.

I choose GCBV. I like it.

  • Related