Re: Function-based Views vs Class-based Views

2023-03-06 Thread Carsten Fuchs
I would like to recommend this excellent guide by Luke Plant: https://spookylukey.github.io/django-views-the-right-way/ Best regards, Carsten Am 06.03.23 um 21:19 schrieb Michael Starr: > What are the pros and cons of either method of rendering HTTP request > responses? > > https://ww

Re: Function-based Views vs Class-based Views

2023-03-06 Thread Prosper Lekia
Using classes is always a good way of promoting code usability, and inheritance. With class base views you don't need to reinvent the wheel. You can access other Django classes and methods and reduce code complexity. Although most codes are encapsulated, but you can always go back to the Djang

Function-based Views vs Class-based Views

2023-03-06 Thread Michael Starr
What are the pros and cons of either method of rendering HTTP request responses? https://www.geeksforgeeks.org/class-based-vs-function-based-views-which-one-is-better-to-use-in-django/ In the article above it states that CBVs are DRYer, but I don't understand why. The article doesn't explain, i