Exemple #1
0

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')),
    # For redirects
Exemple #2
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')),
]

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')),
    # For testing the 404's with DEBUG on.
Exemple #3
0
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(
        r'^support/error/$',
        TemplateView.as_view(template_name='support/error.html'),
        name='support_error',
    ),
]

rtd_urls = [
    re_path(r'^search/$', GlobalSearchView.as_view(), name='search'),