diff options
Diffstat (limited to 'tools/pharos-dashboard/dashboard/urls.py')
-rw-r--r-- | tools/pharos-dashboard/dashboard/urls.py | 45 |
1 files changed, 18 insertions, 27 deletions
diff --git a/tools/pharos-dashboard/dashboard/urls.py b/tools/pharos-dashboard/dashboard/urls.py index 8050eb88..cf6340f6 100644 --- a/tools/pharos-dashboard/dashboard/urls.py +++ b/tools/pharos-dashboard/dashboard/urls.py @@ -1,35 +1,26 @@ -from dashboard.views.booking import BookingCalendarView, ResourceBookingsView, DeleteBookingView -from dashboard.views.table_views import CIPodsView, DevelopmentPodsView, JenkinsSlavesView -from django.conf.urls import url, include -from django.contrib.auth import views as auth_views +"""pharos_dashboard URL Configuration +The `urlpatterns` list routes URLs to views. For more information please see: + https://docs.djangoproject.com/en/1.10/topics/http/urls/ +Examples: +Function views + 1. Add an import: from my_app import views + 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') +Class-based views + 1. Add an import: from other_app.views import Home + 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') +Including another URLconf + 1. Import the include() function: from django.conf.urls import url, include + 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) +""" +from django.conf.urls import url -urlpatterns = [ - # registration - url(r'^accounts/login/$', auth_views.login, name='login'), - url(r'^accounts/logout/$', auth_views.logout, name='logout'), - - # Index - url(r'^index/$', CIPodsView.as_view(), name='index'), - url(r'^index/$', CIPodsView.as_view(), name='index'), - url(r'^$', CIPodsView.as_view(), name=""), +from dashboard.views import * - # Tables +urlpatterns = [ url(r'^ci_pods/$', CIPodsView.as_view(), name='ci_pods'), url(r'^dev_pods/$', DevelopmentPodsView.as_view(), name='dev_pods'), url(r'^jenkins_slaves/$', JenkinsSlavesView.as_view(), name='jenkins_slaves'), - # Booking Calendar - url(r'^booking_calendar/$', DevelopmentPodsView.as_view(), - name='booking_calendar'), - url(r'^booking_calendar/(?P<resource_id>[0-9]+)/$', - BookingCalendarView.as_view(), name='booking_calendar'), - url(r'^booking_calendar/(?P<resource_id>[0-9]+)/(?P<booking_id>[0-9]+)/$', - BookingCalendarView.as_view(), name='booking_calendar'), - - # AJAX urls - url(r'^resource/(?P<resource_id>[0-9]+)/bookings/$', - ResourceBookingsView.as_view(), name='resource_bookings'), - url(r'^booking/(?P<booking_id>[0-9]+)/delete$', - DeleteBookingView.as_view(), name='delete_booking'), + url(r'^$', DevelopmentPodsView.as_view(), name="index"), ] |