https://slides.com/ctrlweb/django-5/live/
http://invite.yuldev.ca/
CEO at ctrlweb
@danidou
dleblanc78
YulDev Organizer
Montréal-Django Organizer
daniel@ctrlweb.ca
CTO at Gaspard Media
TA at Maison Logiciel Libre
CTO at Joii
RignonNoel
noël-rignon-5b9172b9
rignon.noel@openmailbox.org
Montréal-Django Presenter
Implementing common web development tasks
Extensible
Decorating class-based views
Simple usage in your URLconf
Standardize the code
Many attributes
Many methods
Many heritage
A list of attributes: (including)
A list of methods / behaviors: (including)
View for creating a new object instance.
The HTTP GET method return a form.
The HTTP POST method create the object.
from django.views.generic import CreateView
View for updating an object.
The HTTP GET method return a form.
The HTTP POST method update the object.
from django.views.generic import UpdateView
View for deleting an object retrieved with `self.get_object()`.
The HTTP GET method return a template of validation.
The HTTP POST method delete the object.
from django.views.generic import DeleteView
Render some list of objects, set by :
- `self.model`
or
- `self.queryset`
Need to be any iterable of items, not just a queryset.
from django.views.generic import ListView
Render a "detail" view of an object.
By default this is a model instance looked up from `self.queryset`, but the
view will support display of any object by overriding `self.get_object()`.
from django.views.generic import DetailView
A view that provides a redirect on any GET request.
from django.views.generic import RedirectView
A view that renders a template.
This view will also pass into the context
any keyword arguments passed by the URLconf.
from django.views.generic import TemplateView