Move the templates into a named directory

This commit is contained in:
Paul Oswald 2012-02-15 10:30:56 +09:00
parent e0f7d2cd9f
commit cbd0752740
6 changed files with 6 additions and 6 deletions

View File

@ -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 = (

View File

@ -1,3 +1,3 @@
{% extends "base_renderer.html" %}
{% extends "djangorestframework/base_renderer.html" %}
{# Override this template in your own templates directory to customize #}

View File

@ -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)