﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
24220	get_success_url raises an exception when success_url is lazy object	Tomáš Ehrlich	Tomáš Ehrlich	"In #24133 was added deprecation warning when `self.success_url` contains old %-style Python formatting strings.

However, `success_url` could be a lazy object like `reverse_lazy` and trying to call `re.search` on lazy object results in `TypeError`:


{{{
../../../../.envs/lingui-next/lib/python3.4/site-packages/django/views/generic/edit.py:166: in get_success_url
    if re.search(r'%\([^\)]+\)', self.success_url):
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

pattern = '%\\([^\\)]+\\)'
string = <django.utils.functional.lazy.<locals>.__proxy__ object at 0x10678ca90>
flags = 0

    def search(pattern, string, flags=0):
        """"""Scan through string looking for a match to the pattern, returning
        a match object, or None if no match was found.""""""
>       return _compile(pattern, flags).search(string)
E       TypeError: expected string or buffer

../../../../.envs/lingui-next/lib/python3.4/re.py:166: TypeError
}}}"	Bug	closed	Generic views	1.8alpha1	Normal	fixed			Unreviewed	1	0	0	0	0	0
