diff --git a/djangorestframework/renderers.py b/djangorestframework/renderers.py index 71c381f7e..75957c6dd 100644 --- a/djangorestframework/renderers.py +++ b/djangorestframework/renderers.py @@ -348,7 +348,6 @@ class DocumentingTemplateRenderer(BaseRenderer): 'logout_url': logout_url, 'FORMAT_PARAM': self._FORMAT_QUERY_PARAM, 'METHOD_PARAM': getattr(self.view, '_METHOD_PARAM', None), - 'ADMIN_MEDIA_PREFIX': getattr(settings, 'ADMIN_MEDIA_PREFIX', None), }) ret = template.render(context) diff --git a/djangorestframework/runtests/settings.py b/djangorestframework/runtests/settings.py index f54a554b3..7cb3e27b2 100644 --- a/djangorestframework/runtests/settings.py +++ b/djangorestframework/runtests/settings.py @@ -53,11 +53,6 @@ MEDIA_ROOT = '' # Examples: "http://media.lawrence.com", "http://example.com/media/" MEDIA_URL = '' -# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a -# trailing slash. -# Examples: "http://foo.com/media/", "/media/". -ADMIN_MEDIA_PREFIX = '/media/' - # Make this unique, and don't share it with anybody. SECRET_KEY = 'u@x-aj9(hoh#rb-^ymf#g2jx_hp0vj7u5#b@ag1n^seu9e!%cy' diff --git a/djangorestframework/utils/__init__.py b/djangorestframework/utils/__init__.py index 537d42523..ca16b2617 100644 --- a/djangorestframework/utils/__init__.py +++ b/djangorestframework/utils/__init__.py @@ -9,11 +9,6 @@ from djangorestframework.compat import StringIO import re import xml.etree.ElementTree as ET - -#def admin_media_prefix(request): -# """Adds the ADMIN_MEDIA_PREFIX to the request context.""" -# return {'ADMIN_MEDIA_PREFIX': settings.ADMIN_MEDIA_PREFIX} - from mediatypes import media_type_matches, is_form_media_type from mediatypes import add_media_type_param, get_media_type_params, order_by_precedence @@ -49,38 +44,6 @@ def url_resolves(url): return True -# From http://www.koders.com/python/fidB6E125C586A6F49EAC38992CF3AFDAAE35651975.aspx?s=mdef:xml -#class object_dict(dict): -# """object view of dict, you can -# >>> a = object_dict() -# >>> a.fish = 'fish' -# >>> a['fish'] -# 'fish' -# >>> a['water'] = 'water' -# >>> a.water -# 'water' -# >>> a.test = {'value': 1} -# >>> a.test2 = object_dict({'name': 'test2', 'value': 2}) -# >>> a.test, a.test2.name, a.test2.value -# (1, 'test2', 2) -# """ -# def __init__(self, initd=None): -# if initd is None: -# initd = {} -# dict.__init__(self, initd) -# -# def __getattr__(self, item): -# d = self.__getitem__(item) -# # if value is the only key in object, you can omit it -# if isinstance(d, dict) and 'value' in d and len(d) == 1: -# return d['value'] -# else: -# return d -# -# def __setattr__(self, item, value): -# self.__setitem__(item, value) - - # From xml2dict class XML2Dict(object): diff --git a/djangorestframework/utils/staticviews.py b/djangorestframework/utils/staticviews.py index 7cbc0b9b8..101df4e96 100644 --- a/djangorestframework/utils/staticviews.py +++ b/djangorestframework/utils/staticviews.py @@ -53,7 +53,6 @@ def api_login(request, template_name='djangorestframework/login.html', redirect_field_name: redirect_to, #'site': current_site, #'site_name': current_site.name, - 'ADMIN_MEDIA_PREFIX': settings.ADMIN_MEDIA_PREFIX, }, context_instance=RequestContext(request))