Skip to content

Commit

Permalink
minor improvement for redirect test
Browse files Browse the repository at this point in the history
  • Loading branch information
vdboor committed Dec 15, 2016
1 parent b6cf2a4 commit 83e7c46
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fluent_contents/tests/testapp/content_plugins.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from django.http import HttpResponseRedirect
from django.utils.safestring import mark_safe
from fluent_contents.extensions import ContentPlugin, plugin_pool
from fluent_contents.tests.testapp.models import RawHtmlTestItem, TimeoutTestItem, MediaTestItem, RedirectTestItem
Expand Down Expand Up @@ -58,4 +59,4 @@ def render(self, request, instance, **kwargs):
# Plugins can issue redirects, for example a contact form plugin.
# Since this call happens inside a template render, the code flow
# is interrupted by an exception that is handled in middleware.
self.redirect('/contact/success/', status=301)
return HttpResponseRedirect('/contact/success/')

0 comments on commit 83e7c46

Please sign in to comment.