Esempio n. 1
0
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())
]
Esempio n. 2
0
"""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, GetTicketView, ProcessingView
from django.views.generic import RedirectView

urlpatterns = [
    path('welcome/', WelcomeView.as_view()),
    path('menu/', MenuView.as_view()),
    path('get_ticket/<str:procedure>', GetTicketView.as_view()),
    path('processing', ProcessingView.as_view()),
    path('processing/', RedirectView.as_view(url='processing'))
]
Esempio n. 3
0
"""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.views.generic import RedirectView
from tickets.views import WelcomeView, MenuView, WaitQueue
from tickets.views import ProcessingView, NextTicketView

urlpatterns = [
    path('welcome/', WelcomeView.as_view()),
    path("menu/", MenuView.as_view()),
    path("get_ticket/<service>", WaitQueue.as_view()),
    path("processing", ProcessingView.as_view()),
    path("processing/", RedirectView.as_view(url="/processing")),
    path("next", NextTicketView.as_view())
]
Esempio n. 4
0
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
from tickets.views import MenuView
from tickets.views import ChangeOilView, InflateTiresView, DiagnosticView
from tickets.views import ProcessingView, NextView

urlpatterns = [
    path('', WelcomeView.as_view(), name='welcome'),
    path('welcome/', WelcomeView.as_view(), name='welcome'),
    path('menu/', MenuView.as_view(), name='menu'),
    path('get_ticket/change_oil/', ChangeOilView.as_view(), name='change_oil'),
    path('get_ticket/inflate_tires/',
         InflateTiresView.as_view(),
         name='inflate_tire'),
    path('get_ticket/diagnostic/', DiagnosticView.as_view(),
         name='diagnostic'),
    path('processing', ProcessingView.as_view(), name='processing'),
    path('next/', NextView.as_view(), name='next'),
]
    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
from tickets.views import MenuView
from tickets.views import TicketView
from tickets.views import ProcessingView
from tickets.views import NextView
from django.urls import re_path
from django.views.generic import RedirectView

urlpatterns = [
    path('', MenuView.as_view()),
    path('welcome/', WelcomeView.as_view()),
    path('menu/', MenuView.as_view(), name="index"),
    path('processing', ProcessingView.as_view(), name="processing"),
    path('processing/', RedirectView.as_view(url='/next')),
    path('next', NextView.as_view(), name="next"),
    re_path('get_ticket/(?P<service>[\w_]+)', TicketView.as_view()),
]
Esempio n. 6
0
"""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, service, ProcessingView, NextView
from django.views.generic import RedirectView
from django.conf import settings
from django.conf.urls.static import static

urlpatterns = [
    path('welcome/', WelcomeView.as_view()),
    path('menu/', MenuView.as_view()),
    re_path("processing/?", ProcessingView.as_view()),
    path('next/', NextView.as_view()),
    re_path("get_ticket/(?P<service>\w*)", service),
]

urlpatterns += static(settings.STATIC_URL)