Add API to list all templates

Remove newlines from the rendered templates.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2019-04-02 22:37:46 -04:00
parent 33a542b9d5
commit f45384e399
4 changed files with 41 additions and 6 deletions
+8 -2
View File
@@ -3,7 +3,9 @@ from __future__ import unicode_literals
from django.conf.urls import url
from django.views.i18n import javascript_catalog, set_language
from .api_views import APIContentTypeList, APITemplateView
from .api_views import (
APIContentTypeList, APITemplateDetailView, APITemplateListView
)
from .views import (
AboutView, CheckVersionView, CurrentUserDetailsView, CurrentUserEditView,
CurrentUserLocaleProfileDetailsView, CurrentUserLocaleProfileEditView,
@@ -78,7 +80,11 @@ api_urls = [
name='content-type-list'
),
url(
r'^templates/(?P<name>[-\w]+)/$', APITemplateView.as_view(),
r'^templates/$', APITemplateListView.as_view(),
name='template-list'
),
url(
r'^templates/(?P<name>[-\w]+)/$', APITemplateDetailView.as_view(),
name='template-detail'
),
]