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
cbd07527
Commit
cbd07527
authored
Feb 15, 2012
by
Paul Oswald
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move the templates into a named directory
parent
e0f7d2cd
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
7 additions
and
6 deletions
+7
-6
djangorestframework/renderers.py
+3
-3
djangorestframework/templates/djangorestframework/api_login.html
+0
-0
djangorestframework/templates/djangorestframework/base_renderer.html
+0
-0
djangorestframework/templates/djangorestframework/renderer.html
+2
-1
djangorestframework/templates/djangorestframework/renderer.txt
+0
-0
djangorestframework/utils/staticviews.py
+2
-2
No files found.
djangorestframework/renderers.py
View file @
cbd07527
...
...
@@ -373,7 +373,7 @@ class DocumentingHTMLRenderer(DocumentingTemplateRenderer):
media_type
=
'text/html'
format
=
'html'
template
=
'renderer.html'
template
=
'
djangorestframework/
renderer.html'
class
DocumentingXHTMLRenderer
(
DocumentingTemplateRenderer
):
...
...
@@ -385,7 +385,7 @@ class DocumentingXHTMLRenderer(DocumentingTemplateRenderer):
media_type
=
'application/xhtml+xml'
format
=
'xhtml'
template
=
'renderer.html'
template
=
'
djangorestframework/
renderer.html'
class
DocumentingPlainTextRenderer
(
DocumentingTemplateRenderer
):
...
...
@@ -397,7 +397,7 @@ class DocumentingPlainTextRenderer(DocumentingTemplateRenderer):
media_type
=
'text/plain'
format
=
'txt'
template
=
'renderer.txt'
template
=
'
djangorestframework/
renderer.txt'
DEFAULT_RENDERERS
=
(
...
...
djangorestframework/templates/api_login.html
→
djangorestframework/templates/
djangorestframework/
api_login.html
View file @
cbd07527
File moved
djangorestframework/templates/base_renderer.html
→
djangorestframework/templates/
djangorestframework/
base_renderer.html
View file @
cbd07527
File moved
djangorestframework/templates/renderer.html
→
djangorestframework/templates/
djangorestframework/
renderer.html
View file @
cbd07527
{% extends "base_renderer.html" %}
{% extends "
djangorestframework/
base_renderer.html" %}
{# Override this template in your own templates directory to customize #}
\ No newline at end of file
djangorestframework/templates/renderer.txt
→
djangorestframework/templates/
djangorestframework/
renderer.txt
View file @
cbd07527
File moved
djangorestframework/utils/staticviews.py
View file @
cbd07527
...
...
@@ -12,7 +12,7 @@ import base64
# be making settings changes in order to accomodate django-rest-framework
@csrf_protect
@never_cache
def
api_login
(
request
,
template_name
=
'api_login.html'
,
def
api_login
(
request
,
template_name
=
'
djangorestframework/
api_login.html'
,
redirect_field_name
=
REDIRECT_FIELD_NAME
,
authentication_form
=
AuthenticationForm
):
"""Displays the login form and handles the login action."""
...
...
@@ -57,5 +57,5 @@ def api_login(request, template_name='api_login.html',
},
context_instance
=
RequestContext
(
request
))
def
api_logout
(
request
,
next_page
=
None
,
template_name
=
'api_login.html'
,
redirect_field_name
=
REDIRECT_FIELD_NAME
):
def
api_logout
(
request
,
next_page
=
None
,
template_name
=
'
djangorestframework/
api_login.html'
,
redirect_field_name
=
REDIRECT_FIELD_NAME
):
return
logout
(
request
,
next_page
,
template_name
,
redirect_field_name
)
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