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.urls import path from django.views.generic import RedirectView from tickets.views import WelcomeView, MenuView, TicketView, OperatorView, NextView # Route supported URLs to their corresponding view classes. urlpatterns = [ path('welcome/', RedirectView.as_view(url='/welcome')), path('welcome', WelcomeView.as_view()), path('menu/', RedirectView.as_view(url='/menu')), path('menu', MenuView.as_view()), path('get_ticket/change_oil/', RedirectView.as_view(url='/get_ticket/change_oil')), path('get_ticket/change_oil', TicketView.as_view()), path('get_ticket/inflate_tires/', RedirectView.as_view(url='/get_ticket/inflate_tires')), path('get_ticket/inflate_tires', TicketView.as_view()), path('get_ticket/diagnostic/', RedirectView.as_view(url='/get_ticket/diagnostic')), path('get_ticket/diagnostic', TicketView.as_view()), path('processing/', RedirectView.as_view(url='/processing')), path('processing', OperatorView.as_view()), path('next/', RedirectView.as_view(url='/next')), path('next', NextView.as_view()), path('', WelcomeView.as_view()) ]
from django.conf.urls.static import static from django.urls import path from hypercar import settings from tickets.views import WelcomeView, MenuView, TicketView, OperatorView, TableView from django.views.generic.base import RedirectView urlpatterns = [ path('welcome/', WelcomeView.as_view(), name='welcome'), path('menu/', MenuView.as_view(), name='menu'), path('get_ticket/<str:service>', TicketView.as_view(), name='ticket'), path('processing/', RedirectView.as_view(url='/processing')), path('processing', OperatorView.as_view(), name='operator'), path('next/', RedirectView.as_view(url='/next')), path('next', TableView.as_view(), name='next_ticket'), path('', RedirectView.as_view(url='welcome/')) ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
from django.urls import path from tickets.views import WelcomeView, TicketView, check_time, ProcessView, next urlpatterns = [ path('welcome/', WelcomeView.as_view()), path('menu/', TicketView.as_view()), path('get_ticket/<str:service>', check_time), path('processing/', ProcessView.as_view()), path('next/', next), ]
from django.urls import path from django.urls import re_path from tickets.views import WelcomeView from tickets.views import MenuView from tickets.views import TicketView from tickets.views import ProcessingView from tickets.views import NextTicketView urlpatterns = [ path('', MenuView.as_view()), # added after solving the task path('welcome/', WelcomeView.as_view()), path('menu/', MenuView.as_view()), path('get_ticket/<str:link>', TicketView.as_view()), re_path('processing/?', ProcessingView.as_view()), re_path('next/?', NextTicketView.as_view()) ]
"""hypercar 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.urls import path, re_path from tickets.views import WelcomeView, MainPageView, MenuView, TicketView, ProcessView, NextView urlpatterns = [ path('welcome/', WelcomeView.as_view()), path('', MainPageView.as_view()), path("menu/", MenuView.as_view()), re_path('get_ticket/(?P<service>\w+)', TicketView.as_view()), path("processing", ProcessView.as_view()), path("next", NextView.as_view()) ]
"""hypercar 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.urls import path from tickets.views import WelcomeView, MenuView, TicketView, OperatorView, DisplayView urlpatterns = [ path('welcome/', WelcomeView.as_view()), path('menu/', MenuView.as_view()), path('get_ticket/<service>/', TicketView.as_view()), path('processing', OperatorView.as_view()), path('next', DisplayView.as_view()), ]
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.urls import path from django.views.generic import RedirectView from tickets.views import WelcomeView, MenuView, TicketView, OperatorView, NextView from tickets.models import Ticket urlpatterns = [ path('welcome/', WelcomeView.as_view()), path('menu/', MenuView.as_view()), path('get_ticket/<str:task>/', TicketView.as_view()), path('processing', OperatorView.as_view()), path('processing/', RedirectView.as_view(url='/processing')), path('next/', NextView.as_view()) ] # Truncate tickets table when Application starts # Required for the tests, but removes persistence... Ticket.objects.all().delete()
"""hypercar 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.urls import path, re_path from tickets.views import WelcomeView, menuView, TicketView, ProcessingView, nextView urlpatterns = [ path('welcome', WelcomeView.as_view()), path("menu", menuView), path("processing", ProcessingView.as_view()), path("next", nextView), re_path(r"^get_ticket/(?P<operation>\w+)$", TicketView.as_view()) ]
from django.conf.urls import url from tickets.views import (TicketsListView, TicketView, AddBugView, AddFeatureView, SetTicketStatusView, AddCommentView, EditCommentView, EditTicketView, VoteForTicketView, DeleteTicketView, LabelListView, AddLabelView, EditLabelView, DeleteLabelView, DeleteCommentView) urlpatterns = [ url(r'^$', TicketsListView.as_view(), name='tickets-list'), url(r'^(?P<pk>[0-9]+)/$', TicketView.as_view(), name='ticket'), url(r'^(?P<pk>[0-9]+)/approved/$', SetTicketStatusView.as_view(status_field='approved'), name='approve-ticket'), url(r'^(?P<pk>[0-9]+)/doing/$', SetTicketStatusView.as_view(status_field='doing'), name='doing-ticket'), url(r'^(?P<pk>[0-9]+)/done/$', SetTicketStatusView.as_view(status_field='done'), name='done-ticket'), url(r'^report-bug/$', AddBugView.as_view(), name='add-bug'), url(r'^request-feature/$', AddFeatureView.as_view(), name='add-feature'), url(r'^(?P<pk>[0-9]+)/edit/$', EditTicketView.as_view(), name='edit-ticket'), url(r'^(?P<pk>[0-9]+)/delete/$', DeleteTicketView.as_view(), name='delete-ticket'), url(r'^(?P<pk>[0-9]+)/vote/$', VoteForTicketView.as_view(), name='vote-for-ticket'), url(r'^(?P<ticket_pk>[0-9]+)/comments/add/$',
"""hypercar 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.urls import path, re_path from tickets.views import WelcomeView, MenuView, TicketView, ProcessingView, NextView urlpatterns = [ path("welcome/", WelcomeView.as_view()), path("menu/", MenuView.as_view()), re_path("get_ticket/(\w+)", TicketView.as_view()), path("processing/", ProcessingView.as_view()), path("next/", NextView.as_view()) ]
"""hypercar 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.urls import path, re_path from tickets.views import WelcomeView, MenuView, TicketView, ProcessingView urlpatterns = [ path('welcome/', WelcomeView.as_view()), path('menu/', MenuView.as_view()), path('processing/', ProcessingView.as_view()), re_path('get_ticket/(?P<ticket>\w+)/', TicketView.as_view()) ]
"""hypercar 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.urls import path, re_path from tickets.views import WelcomeView, MenuView, TicketView, ProcessingView, NextView urlpatterns = [ path('welcome/', WelcomeView.as_view()), path('menu/', MenuView.as_view()), path('next/', NextView.as_view()), re_path('get_ticket/(?P<ticket_name>[^/]*)/?', TicketView.as_view()), path('processing/', ProcessingView.as_view()) ]
"""hypercar 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.urls import path from django.urls import re_path from tickets.views import WelcomeView, MenuView, TicketView, ProcessingView, NextClientView urlpatterns = [ path('welcome/', WelcomeView.as_view()), path('menu/', MenuView.as_view()), re_path(r'^get_ticket\/(change_oil|inflate_tires|diagnostic)\/$', TicketView.as_view()), path('processing', ProcessingView.as_view()), path('next', NextClientView.as_view()) ]
"""hypercar 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.urls import path, re_path from django.views.generic import RedirectView from tickets.views import WelcomeView, MenuView, TicketView, ProcessingView, NextView urlpatterns = [ path('welcome/', WelcomeView.as_view()), path('menu/', MenuView.as_view()), path('next/', NextView.as_view()), path('processing', ProcessingView.as_view()), path('processing/', RedirectView.as_view(url='/processing')), re_path('get_ticket/(?P<service>[^/]*)/?', TicketView.as_view()) ]
"""hypercar 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.urls import path, re_path from tickets.views import WelcomeView, MenuView, TicketView, ProcessView, NextView urlpatterns = [ path('welcome/', WelcomeView.as_view()), path('menu', MenuView.as_view()), path('menu/', MenuView.as_view()), path('processing', ProcessView.as_view()), path('next', NextView.as_view()), re_path(r'get_ticket/(?P<service>\w{1,13})/$', TicketView.as_view()) ]