urlpatterns += i18n_patterns( url(r'^search', include(search_lang_base_urlpatterns))) urlpatterns += i18n_patterns( url(r'^docs.json$', document_as_json, name='wiki.json')) urlpatterns += i18n_patterns(url(r'^docs/', include(wiki_lang_urlpatterns))) urlpatterns += [url('', include('kuma.attachments.urls'))] urlpatterns += i18n_patterns( url(r'dashboards/?$', dashboards_index, name='dashboards.index'), ) urlpatterns += i18n_patterns( url(r'^dashboards/', include(dashboards_lang_urlpatterns))) urlpatterns += [url('users/', include('kuma.users.urls'))] urlpatterns += i18n_patterns( url(r'^payments/$', payment_views.contribute, name='payments'), ) urlpatterns += i18n_patterns( url(r'^contribute/$', ensure_wiki_domain(RedirectView.as_view(url=reverse_lazy('payments'))), name='redirect-to-payments'), ) urlpatterns += i18n_patterns( url(r'^payments/', include(payments_lang_urlpatterns))) urlpatterns += i18n_patterns( url('', decorator_include(never_cache, users_lang_urlpatterns))) if settings.MAINTENANCE_MODE: urlpatterns += i18n_patterns( # Redirect if we try to use the "tidings" unsubscribe. url( r'^unsubscribe/.*', ensure_wiki_domain( never_cache( RedirectView.as_view(pattern_name='maintenance_mode', permanent=False)))))
re_path(r"^account/", include(accountsettings_lang_urlpatterns)) ) urlpatterns += i18n_patterns(re_path(r"^payments/", include(payments_lang_urlpatterns))) urlpatterns += i18n_patterns( re_path("", decorator_include(never_cache, users_lang_urlpatterns)) ) if settings.MAINTENANCE_MODE: urlpatterns += i18n_patterns( # Redirect if we try to use the "tidings" unsubscribe. re_path( r"^unsubscribe/.*", ensure_wiki_domain( never_cache( RedirectView.as_view( pattern_name="maintenance_mode", permanent=False ) ) ), ) ) else: urlpatterns += i18n_patterns( # The first argument to "decorator_include" can be an iterable # of view decorators, which are applied in reverse order. re_path( r"^", decorator_include((ensure_wiki_domain, never_cache), "tidings.urls") ), )
re_path( r"^localization-tag/(?P<tag>[^/]+)$", views.list.with_localization_tag, name="wiki.list_with_localization_tag", ), re_path( r"^localization-tag/?", views.list.with_localization_tag, name="wiki.list_with_localization_tags", ), # Legacy KumaScript macro list, when they were stored in Kuma database re_path( r"^templates$", ensure_wiki_domain( shared_cache_control(s_maxage=60 * 60 * 24 * 30)( RedirectView.as_view(pattern_name="dashboards.macros", permanent=True) ) ), ), # Akismet Revision re_path( r"^submit_akismet_spam$", views.akismet_revision.submit_akismet_spam, name="wiki.submit_akismet_spam", ), # Feeds re_path( r"^feeds/(?P<format>[^/]+)/all/?", shared_cache_control(feeds.DocumentsRecentFeed()), name="wiki.feeds.recent_documents", ),