tomchristie/django-rest-framework — Issue #165: Templates should be namespaced and marked with block tags
Author: poswald
Created: 2012-02-15 00:23:57+00:00
State: open

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:

{% block title %}Django REST framework{% endblock %} - {{ name }}

...

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%}