Search code examples
djangodjango-generic-views

What does 'generic' means in Django?


There are so many names with 'generic' in it , i.e.- generic view etc. What does it means and how different are these from 'regular' views or urls ?


Solution

  • From the django docs:

    https://docs.djangoproject.com/en/dev/topics/class-based-views/generic-display/

    Django’s generic views were developed to ease that pain. They take certain common idioms and patterns found in view development and abstract them so that you can quickly write common views of data without having to write too much code.

    They created for simplifying developing process, because many things are the same from the project to project and with them don't need write annoying stuff again and again.

    And "regular" are views which implements your business-logic, so it can not be generic.