Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Templates should be namespaced and marked with block tags #165

poswald opened this Issue · 2 comments

2 participants


Similar to Issue #162, I believe it is considered a best practice to namespace the templates directory of 3rd party libraries. For example django's admin is under django/contrib/admin/templates/admin/. This additional directory prevents the possibility of any collisions when looking up the templates by name.

Furthermore, it would be nice to offer some common override-able blocks in the default template. For example, if the template contained this:

    <link rel="stylesheet" type="text/css" href='{% get_static_prefix %}djangorestframework/css/style.css'/>
    <title>{% block title %}Django REST framework{% endblock %} - {{ name }}</title>

Then a user can simply extend this template and set their own title in their template dir:

{% extends "djangorestframework/renderer.html" %}
{% block title %}My Site{% endblook%}
@poswald poswald referenced this issue from a commit in poswald/django-rest-framework
@poswald poswald Documentation on how to override the template; Closes Issue #165 bf717ef

This is done but I kept it in a branch (poswald/djangorestframework@namespace-templates) because it conflicts a bit with Issue #162.. If you pull that one in, I'll send you a pull for this one as well.


+1 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.