Ticket #4044: url_defaults.patch

File url_defaults.patch, 565 bytes (added by Vinay Sajip <vinay_sajip@…>, 8 years ago)

Fix for incorrect handling of non-string views

  • django/conf/urls/defaults.py

     
    2121        # For include(...) processing.
    2222        return RegexURLResolver(regex, view[0], kwargs)
    2323    else:
    24         return RegexURLPattern(regex, prefix and (prefix + '.' + view) or view, kwargs, name)
     24        if prefix and type(view) == str:
     25            view = prefix + '.' + view
     26        return RegexURLPattern(regex, view, kwargs, name)
    2527
Back to Top