mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-23 10:03:57 +03:00
Move the new `reverse' function from urlresolvers to utils
This commit is contained in:
parent
12e34814e9
commit
af4851f7a8
|
@ -2,7 +2,7 @@ from django.conf.urls.defaults import patterns, url
|
||||||
from django.test import TestCase
|
from django.test import TestCase
|
||||||
from django.utils import simplejson as json
|
from django.utils import simplejson as json
|
||||||
|
|
||||||
from djangorestframework.urlresolvers import reverse
|
from djangorestframework.utils import reverse
|
||||||
from djangorestframework.views import View
|
from djangorestframework.views import View
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
from django.core.urlresolvers import reverse
|
|
||||||
|
|
||||||
def reverse(viewname, urlconf=None, args=None, kwargs=None, prefix=None, current_app=None):
|
|
||||||
raise NotImplementedError
|
|
|
@ -1,6 +1,6 @@
|
||||||
from django.utils.encoding import smart_unicode
|
from django.utils.encoding import smart_unicode
|
||||||
from django.utils.xmlutils import SimplerXMLGenerator
|
from django.utils.xmlutils import SimplerXMLGenerator
|
||||||
from django.core.urlresolvers import resolve
|
from django.core.urlresolvers import resolve, reverse
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
|
||||||
from djangorestframework.compat import StringIO
|
from djangorestframework.compat import StringIO
|
||||||
|
@ -173,3 +173,6 @@ class XMLRenderer():
|
||||||
|
|
||||||
def dict2xml(input):
|
def dict2xml(input):
|
||||||
return XMLRenderer().dict2xml(input)
|
return XMLRenderer().dict2xml(input)
|
||||||
|
|
||||||
|
def reverse(viewname, urlconf=None, args=None, kwargs=None, prefix=None, current_app=None):
|
||||||
|
raise NotImplementedError
|
||||||
|
|
Loading…
Reference in New Issue
Block a user