/api/: Add Markdown-based /api-new documentation.

This commit allows for the /api-new/ page to rendered similarly to our
/help pages.  It's based on the old content for /api, but we're not
replacing the old content yet, to give a bit of time to restructure
things reasonably.

Tweaked by eeshangarg and tabbott.
This commit is contained in:
Brock Whittaker
2017-07-24 17:37:04 -07:00
committed by Tim Abbott
parent 31ea495842
commit e86e259cb1
12 changed files with 335 additions and 4 deletions

View File

@@ -546,6 +546,9 @@ urls += [url(r'^', include('social_django.urls', namespace='social'))]
urls += [url(r'^help/(?P<article>.*)$',
MarkdownDirectoryView.as_view(template_name='zerver/help/main.html',
path_template='/zerver/help/%s.md'))]
urls += [url(r'^api-new/(?P<article>[-\w]*\/?)$',
MarkdownDirectoryView.as_view(template_name='zerver/api/main.html',
path_template='/zerver/api/%s.md'))]
if settings.DEVELOPMENT:
urls += dev_urls.urls