django createview how to get the object that is created
maybe you could use get_success_url() method (see reference) In this case, it’d be something like: def get_success_url(self): return reverse(‘offerta_create’,args=(self.object.id,)) Please see the accepted answer on Why doesn’t self.object in a CreateView have an id after saving to the database? – once I removed the “id” fields from my models, and let Django default to its … Read more