mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 21:13:36 +00:00
views/integrations: Change non-generic HelpView to MarkdownDirectoryView.
The HelpView class will render a directory as markdown with an index HTML page. This however can also be used for other generics and applied to the API pages as well, so change the class to a generic class and specify the path templates and names. Tweaked by tabbott and Eeshan Garg.
This commit is contained in:
committed by
Tim Abbott
parent
4cb3cdb5b0
commit
6933d51c0f
@@ -8,7 +8,7 @@ import os
|
||||
import zerver.forms
|
||||
from zproject import dev_urls
|
||||
from zproject.legacy_urls import legacy_urls
|
||||
from zerver.views.integrations import IntegrationView, APIView, HelpView
|
||||
from zerver.views.integrations import IntegrationView, APIView, MarkdownDirectoryView
|
||||
from zerver.lib.integrations import WEBHOOK_INTEGRATIONS
|
||||
from zerver.webhooks import github_dispatcher
|
||||
|
||||
@@ -543,7 +543,9 @@ urls += [
|
||||
urls += [url(r'^', include('social_django.urls', namespace='social'))]
|
||||
|
||||
# User documentation site
|
||||
urls += [url(r'^help/(?P<article>.*)$', HelpView.as_view(template_name='zerver/help/main.html'))]
|
||||
urls += [url(r'^help/(?P<article>.*)$',
|
||||
MarkdownDirectoryView.as_view(template_name='zerver/help/main.html',
|
||||
path_template='/zerver/help/%s.md'))]
|
||||
|
||||
if settings.DEVELOPMENT:
|
||||
urls += dev_urls.urls
|
||||
|
||||
Reference in New Issue
Block a user