I\'m learning Django and i have problem with redirecting back from CreateView I want to redirect to a BookDetail page which contains list of bookinstances which are created by C
You need to define the get_success_url method, rather than the static success_url attribute:
get_success_url
success_url
class BookInstanceCreate(PermissionRequiredMixin, CreateView): ... def get_success_url(self): return reverse('book-detail', kwargs={'pk': self.object.pk})