Skip to content

Commit 9303466

Browse files
committed
did: cleanup old code
1 parent a454c58 commit 9303466

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

basxbread/utils/urls.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def decorator(view):
114114
return decorator
115115

116116

117-
def autopath(*args, **kwargs):
117+
def autopath(view, urlname=None, check_function=None):
118118
"""This function can be used to automatically generate a URL for a view.
119119
In many situations for internal database applications we are not too conserned
120120
about the exact name and value of a certain URL but rather a consistent naming
@@ -131,18 +131,6 @@ def autopath(*args, **kwargs):
131131
be found in ``./manage.py show_urls`` or be passed directly as argument ``urlname``.
132132
133133
"""
134-
return generate_path(*args, **kwargs, _DISABLE_WARNING=True)
135-
136-
137-
def generate_path(view, urlname=None, check_function=None, _DISABLE_WARNING=False):
138-
if not _DISABLE_WARNING:
139-
import warnings
140-
141-
warnings.warn(
142-
"'generate_path' is deprecated, use the compatible function 'autopath' instead",
143-
UserWarning,
144-
stacklevel=2,
145-
)
146134

147135
check_function = check_function or (lambda user: True)
148136
pathcomponents = [_viewbasepath(view, urlname)]

0 commit comments

Comments
 (0)