aboutsummaryrefslogtreecommitdiffstats
path: root/djangorestframework/utils/__init__.py
diff options
context:
space:
mode:
authorTom Christie2012-02-21 22:13:41 +0000
committerTom Christie2012-02-21 22:13:41 +0000
commitb074754b54adf172cd2d102e2a326a7f322cf2ef (patch)
treead3716a765fc6136a0b4cf8b88fa5808c09c151a /djangorestframework/utils/__init__.py
parent9277f438cb85e8205cfe0149142d2f2b4d11a31c (diff)
downloaddjango-rest-framework-b074754b54adf172cd2d102e2a326a7f322cf2ef.tar.bz2
Remove ADMIN_MEDIA_PREFIX everywhere
Diffstat (limited to 'djangorestframework/utils/__init__.py')
-rw-r--r--djangorestframework/utils/__init__.py37
1 files changed, 0 insertions, 37 deletions
diff --git a/djangorestframework/utils/__init__.py b/djangorestframework/utils/__init__.py
index 537d4252..ca16b261 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):