I am using a Django CreateView and I wanted to set the success_url
to the same view so that when the form is posted, it displays the same page and I can display the created object in addition to the form in case you want to add a new one. However, self.object
is None because of this in BaseCreateView
:
def post(self, request, *args, **kwargs):
self.object = None
return super(BaseCreateView, self).post(request, *args, **kwargs)
I am concluding that a CreateView is not made to be redisplayed after success?