i18n_urls += import_string("{}.urls.i18n_urlpatterns".format(app_name)) # Tornado views urls += [ # Used internally for communication between Django and Tornado processes url(r'^notify_tornado$', zerver.tornado.views.notify, name='zerver.tornado.views.notify'), url(r'^api/v1/events/internal$', zerver.tornado.views.get_events_internal), ] # Python Social Auth urls += [url(r'^', include('social_django.urls', namespace='social'))] urls += [url(r'^saml/metadata.xml$', zerver.views.auth.saml_sp_metadata)] # User documentation site urls += [url(r'^help/(?P<article>.*)$', MarkdownDirectoryView.as_view(template_name='zerver/documentation_main.html', path_template='/zerver/help/%s.md'))] urls += [url(r'^api/(?P<article>[-\w]*\/?)$', MarkdownDirectoryView.as_view(template_name='zerver/documentation_main.html', path_template='/zerver/api/%s.md'))] # Two Factor urls if settings.TWO_FACTOR_AUTHENTICATION_ENABLED: urls += [url(r'', include(tf_urls)), url(r'', include(tf_twilio_urls))] if settings.DEVELOPMENT: urls += dev_urls.urls i18n_urls += dev_urls.i18n_urls # The sequence is important; if i18n urls don't come first then # reverse url mapping points to i18n urls which causes the frontend
# Used internally for communication between Django and Tornado processes # # Since these views don't use rest_dispatch, they cannot have # asynchronous Tornado behavior. path("notify_tornado", notify), path("api/v1/events/internal", get_events_internal), ] # Python Social Auth urls += [path("", include("social_django.urls", namespace="social"))] urls += [path("saml/metadata.xml", saml_sp_metadata)] # User documentation site help_documentation_view = MarkdownDirectoryView.as_view( template_name="zerver/documentation_main.html", path_template="/zerver/help/%s.md") api_documentation_view = MarkdownDirectoryView.as_view( template_name="zerver/documentation_main.html", path_template="/zerver/api/%s.md") urls += [ # Redirects due to us having moved the docs: path("help/delete-a-stream", RedirectView.as_view(url="/help/archive-a-stream", permanent=True)), path("api/delete-stream", RedirectView.as_view(url="/api/archive-stream", permanent=True)), path( "help/change-the-topic-of-a-message", RedirectView.as_view(url="/help/rename-a-topic", permanent=True), ), path(
urls += [url(r'^', include('%s.urls' % (app_name,)))] i18n_urls += import_string("{}.urls.i18n_urlpatterns".format(app_name)) # Tornado views urls += [ # Used internally for communication between Django and Tornado processes url(r'^notify_tornado$', zerver.tornado.views.notify, name='zerver.tornado.views.notify'), url(r'^api/v1/events/internal$', zerver.tornado.views.get_events_internal), ] # Python Social Auth urls += [url(r'^', include('social_django.urls', namespace='social'))] # User documentation site urls += [url(r'^help/(?P<article>.*)$', MarkdownDirectoryView.as_view(template_name='zerver/documentation_main.html', path_template='/zerver/help/%s.md'))] urls += [url(r'^api/(?P<article>[-\w]*\/?)$', MarkdownDirectoryView.as_view(template_name='zerver/documentation_main.html', path_template='/zerver/api/%s.md'))] # Two Factor urls if settings.TWO_FACTOR_AUTHENTICATION_ENABLED: urls += [url(r'', include(tf_urls)), url(r'', include(tf_twilio_urls))] if settings.DEVELOPMENT: urls += dev_urls.urls i18n_urls += dev_urls.i18n_urls # The sequence is important; if i18n urls don't come first then # reverse url mapping points to i18n urls which causes the frontend