class EditBlog(UpdateView):
model = Entry
template_name = 'entry/edit.html'
success_url = "/"
fields = ['entry_title', 'entry_text']
def form_valid(self, form):
form.instance.entry_author = self.request.user
return super().form_valid(form)
i want to put in my success URL the name of the path because the URL of my detail page has a PK with it and it's not working the way i want
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…