def get_context_data(self, **kwargs):
context = super(SubmissionRedirectView, self).get_context_data(**kwargs)<EOL>redirect_url = unquote(self.request.GET.get('<STR_LIT>', '<STR_LIT>'))<EOL>if not redirect_url:<EOL><INDENT>redirect_url = self.get_return_page().get('<STR_LIT:url>','<STR_LIT>')<EOL><DEDENT>if not redirect_url:<EOL><INDENT>try:<EOL><INDENT>redirect_url = Page.objects.get(<EOL>pk=getConstant('<STR_LIT>')<EOL>).get_absolute_url(settings.LANGUAGE_CODE)<EOL><DEDENT>except ObjectDoesNotExist:<EOL><INDENT>redirect_url = '<STR_LIT:/>'<EOL><DEDENT><DEDENT>context.update({<EOL>'<STR_LIT>': redirect_url,<EOL>'<STR_LIT>': self.request.GET.get('<STR_LIT>', <NUM_LIT:5>),<EOL>})<EOL>return context<EOL>
The URL to redirect to can be explicitly specified, or it can come
from the site session history, or it can be the default admin success page
as specified in the site settings.