Пример #1
0
               url(r'^accounts/login',
                   LoginView.as_view(), name="login"),
               url(r'^job/(?P<id>[0-9]+)$',
                   cache_page(60 * CACHE)(JobDetailView.as_view()), name='job-detail'),
               url(r'^job_history/(?P<id>[0-9]+)$',
                   JobHistoryView.as_view(), name='job-history'),
               url(r'^test/(?P<id>[0-9]+)$',
                   TestDetailView.as_view(), name='test-detail'),
               url(r'^(Automation/)?[tT]ests.html$',
                   cache_page(60 * CACHE)(TestsListView.as_view()), name='tests-list'),
               url(r'^(Automation/)?[jJ]obs.html$',
                   cache_page(60 * CACHE)(JobsListView.as_view()), name='jobs-list'),
               url(r'^(Automation/)?[dD]iffs.html$',
                   JobsDiffView.as_view(), name='jobs-diff'),
               url(r'^(Automation/?)?$',
                   HomePageView.as_view(), name='homepage'),

               url(r'^%s(?P<path>.*)$' % settings.STATIC_URL[1:],
                   django.views.static.serve,
                   {"document_root": settings.STATIC_ROOT}),

               url(r'^admin/doc/', include(
                   'django.contrib.admindocs.urls')),
               url(r'^admin/', include(admin.site.urls)),
               url(r'^admin/grappelli/', include('grappelli.urls')),
                       ]
if settings.DEBUG:
    import debug_toolbar
    urlpatterns += [
        url(r'^__debug__/', include(debug_toolbar.urls)),
    ]
Пример #2
0
    url(r'^reports/(?P<id>[0-9]+)$',
        ReportPageView.as_view(),
        name='report-page'),
    url(r'^accounts/login', LoginView.as_view(), name="login"),
    url(r'^job/(?P<id>[0-9]+)$',
        cache_page(60 * CACHE)(JobDetailView.as_view()),
        name='job-detail'),
    url(r'^job_history/(?P<id>[0-9]+)$',
        JobHistoryView.as_view(),
        name='job-history'),
    url(r'^test/(?P<id>[0-9]+)$', TestDetailView.as_view(),
        name='test-detail'),
    url(r'^(Automation/)?[tT]ests.html$',
        cache_page(60 * CACHE)(TestsListView.as_view()),
        name='tests-list'),
    url(r'^(Automation/)?[jJ]obs.html$',
        cache_page(60 * CACHE)(JobsListView.as_view()),
        name='jobs-list'),
    url(r'^(Automation/)?[dD]iffs.html$',
        JobsDiffView.as_view(),
        name='jobs-diff'),
    url(r'^(Automation/?)?$', HomePageView.as_view(), name='homepage'),
    url(r'^%s(?P<path>.*)$' % settings.MEDIA_URL[1:],
        'django.views.static.serve', {"document_root": settings.MEDIA_ROOT}),
    url(r'^%s(?P<path>.*)$' % settings.STATIC_URL[1:],
        'django.views.static.serve', {"document_root": settings.STATIC_ROOT}),
    url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^admin/grappelli/', include('grappelli.urls')),
)
Пример #3
0
                       url(r'^accounts/login',
                           LoginView.as_view(), name="login"),
                       url(r'^job/(?P<id>[0-9]+)$',
                           cache_page(60 * CACHE)(JobDetailView.as_view()), name='job-detail'),
                       url(r'^job_history/(?P<id>[0-9]+)$',
                           JobHistoryView.as_view(), name='job-history'),
                       url(r'^test/(?P<id>[0-9]+)$',
                           TestDetailView.as_view(), name='test-detail'),
                       url(r'^(Automation/)?[tT]ests.html$',
                           cache_page(60 * CACHE)(TestsListView.as_view()), name='tests-list'),
                       url(r'^(Automation/)?[jJ]obs.html$',
                           cache_page(60 * CACHE)(JobsListView.as_view()), name='jobs-list'),
                       url(r'^(Automation/)?[dD]iffs.html$',
                           JobsDiffView.as_view(), name='jobs-diff'),
                       url(r'^(Automation/?)?$',
                           HomePageView.as_view(), name='homepage'),

                       url(r'^%s(?P<path>.*)$' % settings.MEDIA_URL[1:],
                           'django.views.static.serve',
                           {"document_root": settings.MEDIA_ROOT}),

                       url(r'^%s(?P<path>.*)$' % settings.STATIC_URL[1:],
                           'django.views.static.serve',
                           {"document_root": settings.STATIC_ROOT}),

                       url(r'^admin/doc/', include(
                           'django.contrib.admindocs.urls')),
                       url(r'^admin/', include(admin.site.urls)),
                       url(r'^admin/grappelli/', include('grappelli.urls')),
                       )
Пример #4
0
"""polls_app URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path, include

from apps.core.views import HomePageView

urlpatterns = [
    path('admin/', admin.site.urls),
    path('polls/', include("apps.polls.urls")),
    path('users/', include("apps.users.urls")),
    path('', HomePageView.as_view(), name="home"),
]