[Answered ]-Should I use class based or function based views for this?

2πŸ‘

βœ…

  1. You can use what you want, the benefit of Class Based Views is inheritance. You can extend your base View class and use it throughout your project. Also, it’s quite fast to get operations working with Generic Class Based Views.

  2. Yes you should write a form for this model, to provide user input. Django provides shortcuts for forms, which save data based on a model. Model Forms automatically map all fields in your model with equivelent form fields.

  3. Django follows a pattern called Fat Models so it is completely fine to store operations for a model within its model definition.

Leave a comment