Skip to content

Commit

Permalink
Bugfix for Django 1.5 / Python 3.
Browse files Browse the repository at this point in the history
reverse_lazy doesn't work passed to HttpResponseRedirect with Django 1.5
as https://code.djangoproject.com/ticket/10491 was only fixed in 1.6. We
don't need to use reverse_lazy in these places so just remove it.
  • Loading branch information
dracos committed Jul 4, 2014
1 parent 4f27b87 commit 0f43e73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions speeches/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def get_form(self, form_class):
class SpeechDelete(SpeechMixin, DeleteView):

def get_success_url(self):
return self.reverse_lazy('speeches:section-list')
return self.reverse('speeches:section-list')

class SpeechCreate(SpeechMixin, CreateView):
def get_context_data(self, **kwargs):
Expand Down Expand Up @@ -318,7 +318,7 @@ class SectionUpdate(SectionMixin, UpdateView):

class SectionDelete(SectionMixin, DeleteView):
def get_success_url(self):
return self.reverse_lazy('speeches:section-list')
return self.reverse('speeches:section-list')

class SectionView(NamespaceMixin, InstanceViewMixin, DetailView):
model = Section
Expand Down

0 comments on commit 0f43e73

Please sign in to comment.