def get_redirect_url(self, *args, **kwargs):
if self.url:<EOL><INDENT>url = self.url % kwargs<EOL><DEDENT>elif self.pattern_name:<EOL><INDENT>try:<EOL><INDENT>url = reverse(self.pattern_name, args=args, kwargs=kwargs)<EOL><DEDENT>except NoReverseMatch:<EOL><INDENT>return None<EOL><DEDENT><DEDENT>else:<EOL><INDENT>return None<EOL><DEDENT>return url<EOL>
Return the URL redirect to. Keyword arguments from the
URL pattern match generating the redirect request
are provided as kwargs to this method.