mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-01-24 08:14:16 +03:00
Move the templates into a named directory
This commit is contained in:
parent
e0f7d2cd9f
commit
cbd0752740
|
@ -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 = (
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
{% extends "base_renderer.html" %}
|
||||
{% extends "djangorestframework/base_renderer.html" %}
|
||||
|
||||
{# Override this template in your own templates directory to customize #}
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user