Beispiel #1
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, ChangeOilView, InflateTiresView, DiagnosticView, ProcessingView, \
    NextView

urlpatterns = [
    path('welcome/', WelcomeView.as_view()),
    path('menu/', MenuView.as_view()),
    path('get_ticket/change_oil', ChangeOilView.as_view()),
    path('get_ticket/inflate_tires', InflateTiresView.as_view()),
    path('get_ticket/diagnostic', DiagnosticView.as_view()),
    path('processing', ProcessingView.as_view()),
    path('processing/', RedirectView.as_view(url='/processing')),  # fail-safe
    path('next/', NextView.as_view()),  # fail-safe
]
Beispiel #2
0
    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())
]
Beispiel #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 tickets.views import MenuView, OilView, TireView, DiagnosticView, ProcessView, NextView

urlpatterns = [
    path('', MenuView.as_view()),
    path("get_ticket/change_oil", OilView.as_view()),
    path("get_ticket/inflate_tires", TireView.as_view()),
    path("get_ticket/diagnostic", DiagnosticView.as_view()),
    path("processing", ProcessView.as_view()),
    path("next", NextView.as_view()),
]
Beispiel #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'),
]
Beispiel #5
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, RedirectView, MenuView, ProcessingView, NextView
from django.contrib import admin

urlpatterns = [
    path('', RedirectView.as_view()),
    path('welcome/', WelcomeView.as_view()),
    path('admin/', admin.site.urls),
    path('menu/', MenuView.as_view()),
    path('get_ticket/<str:task>', MenuView.as_view()),
    re_path(r'/?processing/?', ProcessingView.as_view()),
    re_path(r"/?next", NextView.as_view())
]
    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()),
]
"""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("", MenuView.as_view()),
    re_path('welcome/?', WelcomeView.as_view()),
    re_path('menu/?', MenuView.as_view()),
    path('get_ticket/<str:link>', TicketView.as_view()),
    re_path('processing/?', ProcessingView.as_view()),
    re_path('next/?', NextView.as_view()),
]