Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-rest-framework
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
django-rest-framework
Commits
b074754b
Commit
b074754b
authored
Feb 21, 2012
by
Tom Christie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove ADMIN_MEDIA_PREFIX everywhere
parent
9277f438
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
44 deletions
+0
-44
djangorestframework/renderers.py
+0
-1
djangorestframework/runtests/settings.py
+0
-5
djangorestframework/utils/__init__.py
+0
-37
djangorestframework/utils/staticviews.py
+0
-1
No files found.
djangorestframework/renderers.py
View file @
b074754b
...
@@ -348,7 +348,6 @@ class DocumentingTemplateRenderer(BaseRenderer):
...
@@ -348,7 +348,6 @@ class DocumentingTemplateRenderer(BaseRenderer):
'logout_url'
:
logout_url
,
'logout_url'
:
logout_url
,
'FORMAT_PARAM'
:
self
.
_FORMAT_QUERY_PARAM
,
'FORMAT_PARAM'
:
self
.
_FORMAT_QUERY_PARAM
,
'METHOD_PARAM'
:
getattr
(
self
.
view
,
'_METHOD_PARAM'
,
None
),
'METHOD_PARAM'
:
getattr
(
self
.
view
,
'_METHOD_PARAM'
,
None
),
'ADMIN_MEDIA_PREFIX'
:
getattr
(
settings
,
'ADMIN_MEDIA_PREFIX'
,
None
),
})
})
ret
=
template
.
render
(
context
)
ret
=
template
.
render
(
context
)
...
...
djangorestframework/runtests/settings.py
View file @
b074754b
...
@@ -53,11 +53,6 @@ MEDIA_ROOT = ''
...
@@ -53,11 +53,6 @@ MEDIA_ROOT = ''
# Examples: "http://media.lawrence.com", "http://example.com/media/"
# Examples: "http://media.lawrence.com", "http://example.com/media/"
MEDIA_URL
=
''
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.
# Make this unique, and don't share it with anybody.
SECRET_KEY
=
'u@x-aj9(hoh#rb-^ymf#g2jx_hp0vj7u5#b@ag1n^seu9e!
%
cy'
SECRET_KEY
=
'u@x-aj9(hoh#rb-^ymf#g2jx_hp0vj7u5#b@ag1n^seu9e!
%
cy'
...
...
djangorestframework/utils/__init__.py
View file @
b074754b
...
@@ -9,11 +9,6 @@ from djangorestframework.compat import StringIO
...
@@ -9,11 +9,6 @@ from djangorestframework.compat import StringIO
import
re
import
re
import
xml.etree.ElementTree
as
ET
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
media_type_matches
,
is_form_media_type
from
mediatypes
import
add_media_type_param
,
get_media_type_params
,
order_by_precedence
from
mediatypes
import
add_media_type_param
,
get_media_type_params
,
order_by_precedence
...
@@ -49,38 +44,6 @@ def url_resolves(url):
...
@@ -49,38 +44,6 @@ def url_resolves(url):
return
True
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
# From xml2dict
class
XML2Dict
(
object
):
class
XML2Dict
(
object
):
...
...
djangorestframework/utils/staticviews.py
View file @
b074754b
...
@@ -53,7 +53,6 @@ def api_login(request, template_name='djangorestframework/login.html',
...
@@ -53,7 +53,6 @@ def api_login(request, template_name='djangorestframework/login.html',
redirect_field_name
:
redirect_to
,
redirect_field_name
:
redirect_to
,
#'site': current_site,
#'site': current_site,
#'site_name': current_site.name,
#'site_name': current_site.name,
'ADMIN_MEDIA_PREFIX'
:
settings
.
ADMIN_MEDIA_PREFIX
,
},
context_instance
=
RequestContext
(
request
))
},
context_instance
=
RequestContext
(
request
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment