diff --git a/djangorestframework/utils/__init__.py b/djangorestframework/utils/__init__.py index ba2f6e05b..f72e0046d 100644 --- a/djangorestframework/utils/__init__.py +++ b/djangorestframework/utils/__init__.py @@ -1,6 +1,6 @@ from django.utils.encoding import smart_unicode from django.utils.xmlutils import SimplerXMLGenerator -from django.core.urlresolvers import resolve, reverse +from django.core.urlresolvers import resolve, reverse as django_reverse from django.conf import settings from djangorestframework.compat import StringIO @@ -174,5 +174,6 @@ class XMLRenderer(): def dict2xml(input): return XMLRenderer().dict2xml(input) -def reverse(viewname, urlconf=None, args=None, kwargs=None, prefix=None, current_app=None): - raise NotImplementedError + +def reverse(viewname, request, *args, **kwargs): + return request.build_absolute_uri(django_reverse(viewname, *args, **kwargs))