Django Class Based View for both Create and Update
I ran into a situation where I wanted something like this. Here’s what I came up with (do note that if you’re trying to use it as an update view and it can’t find the requested object, it’ll behave as a create view rather than throwing a 404): from django.views.generic.detail import SingleObjectTemplateResponseMixin from django.views.generic.edit import … Read more