Beispiel #1
0
from readthedocs.search import views as search_views


v1_api = Api(api_name='v1')
v1_api.register(UserResource())
v1_api.register(ProjectResource())
v1_api.register(VersionResource())
v1_api.register(FileResource())

admin.autodiscover()

handler404 = server_error_404
handler500 = server_error_500

basic_urls = [
    url(r'^$', HomepageView.as_view(), name='homepage'),
    url(r'^support/', SupportView.as_view(), name='support'),
    url(r'^security/', TemplateView.as_view(template_name='security.html')),
    url(r'^.well-known/security.txt',
        TemplateView.as_view(template_name='security.txt', content_type='text/plain')),
]

rtd_urls = [
    url(r'^bookmarks/', include('readthedocs.bookmarks.urls')),
    url(r'^search/$', search_views.elastic_search, name='search'),
    url(r'^dashboard/', include('readthedocs.projects.urls.private')),
    url(r'^profiles/', include('readthedocs.profiles.urls.public')),
    url(r'^accounts/', include('readthedocs.profiles.urls.private')),
    url(r'^accounts/', include('allauth.urls')),
    url(r'^notifications/', include('readthedocs.notifications.urls')),
    url(r'^accounts/gold/', include('readthedocs.gold.urls')),
Beispiel #2
0
                                    server_error_404, server_error_500)
from readthedocs.search import views as search_views

v1_api = Api(api_name='v1')
v1_api.register(UserResource())
v1_api.register(ProjectResource())
v1_api.register(VersionResource())
v1_api.register(FileResource())

admin.autodiscover()

handler404 = server_error_404
handler500 = server_error_500

basic_urls = [
    url(r'^$', HomepageView.as_view(), name='homepage'),
    url(r'^support/', SupportView.as_view(), name='support'),
    url(r'^security/', TemplateView.as_view(template_name='security.html')),
]

rtd_urls = [
    url(r'^bookmarks/', include('readthedocs.bookmarks.urls')),
    url(r'^search/$', search_views.elastic_search, name='search'),
    url(r'^dashboard/', include('readthedocs.projects.urls.private')),
    url(r'^profiles/', include('readthedocs.profiles.urls.public')),
    url(r'^accounts/', include('readthedocs.profiles.urls.private')),
    url(r'^accounts/', include('allauth.urls')),
    url(r'^notifications/', include('readthedocs.notifications.urls')),
    url(r'^accounts/gold/', include('readthedocs.gold.urls')),
    # For redirects
    url(r'^builds/', include('readthedocs.builds.urls')),
Beispiel #3
0
from django.conf import settings
from django.conf.urls import include, re_path
from django.conf.urls.static import static
from django.contrib import admin
from django.views.generic.base import RedirectView, TemplateView

from readthedocs.core.views import HomepageView, SupportView, do_not_track, server_error_500
from readthedocs.search.api import PageSearchAPIView
from readthedocs.search.views import GlobalSearchView

admin.autodiscover()

handler500 = server_error_500

basic_urls = [
    re_path(r'^$', HomepageView.as_view(), name='homepage'),
    re_path(r'^security/',
            TemplateView.as_view(template_name='security.html')),
    re_path(
        r'^\.well-known/security.txt$',
        TemplateView.as_view(template_name='security.txt',
                             content_type='text/plain'),
    ),
    re_path(r'^support/$', SupportView.as_view(), name='support'),
    # These are redirected to from the support form
    re_path(
        r'^support/success/$',
        TemplateView.as_view(template_name='support/success.html'),
        name='support_success',
    ),
    re_path(