Commits

Mike Orr committed 53c4f12

Change deprecation code for url_for and redirect_to.

Comments (0)

Files changed (1)

webhelpers/rails/wrapped.py

         localdict[name] = helper_wrapper(func)
 wrap_helpers(locals())
 
-from routes import url_for, redirect_to
+from webhelpers.rails import url_for, redirect_to
 
-def deprecated(func, message):
-    def deprecated_method(*args, **kargs):
-        warnings.warn(message, DeprecationWarning, 2)
-        return func(*args, **kargs)
-    try:
-        deprecated_method.__name__ = func.__name__
-    except TypeError:
-        # Python < 2.4
-        pass
-    deprecated_method.__doc__ = "%s\n\n%s" % (message, func.__doc__)
-    return deprecated_method
-
-redirect_to = deprecated(redirect_to, 'webhelpers.rails.redirect_to is '
-                         'deprecated, import redirect_to from routes instead')
+#from routes import url_for, redirect_to
+#
+#def deprecated(func, message):
+#    def deprecated_method(*args, **kargs):
+#        warnings.warn(message, DeprecationWarning, 2)
+#        return func(*args, **kargs)
+#    try:
+#        deprecated_method.__name__ = func.__name__
+#    except TypeError:
+#        # Python < 2.4
+#        pass
+#    deprecated_method.__doc__ = "%s\n\n%s" % (message, func.__doc__)
+#    return deprecated_method
+#
+#redirect_to = deprecated(redirect_to, 'webhelpers.rails.redirect_to is '
+#                         'deprecated, import redirect_to from routes instead')