예제 #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 tickets.views import WelcomeView, MenuView, Service, Processing, Next

urlpatterns = [
    path('welcome', WelcomeView.as_view()),
    path('menu', MenuView.as_view()),
    path('get_ticket/<str:service>', Service.as_view()),
    path('processing', Processing.as_view()),
    path('next', Next.as_view()),
]
예제 #2
0
파일: urls.py 프로젝트: miloft/hypercar
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)
예제 #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, re_path
from django.views.generic import RedirectView
from tickets.views import WelcomeView, MenuView, OilView, TireView, DiagView, OperatorView, NextView

urlpatterns = [
    path('', WelcomeView.as_view()),
    path('welcome/', WelcomeView.as_view()),
    path('menu/', MenuView.as_view()),
    path('get_ticket/change_oil/', OilView.as_view()),
    path('get_ticket/inflate_tires/', TireView.as_view()),
    path('get_ticket/diagnostic/', DiagView.as_view()),
    path('processing', OperatorView.as_view()),
    re_path("processing/?", OperatorView.as_view()),
    path('next/', NextView.as_view()),
]
예제 #4
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 NextView, WelcomeView, OilView, InflateView, DiagnosticView, ProcessView
from django.views.generic import RedirectView

urlpatterns = [
    path('menu/', WelcomeView.as_view()),
    path('get_ticket/change_oil', OilView.as_view()),
    path('get_ticket/inflate_tires', InflateView.as_view()),
    path('get_ticket/diagnostic', DiagnosticView.as_view()),
    path('processing', ProcessView.as_view()),
    path("next", NextView.as_view())
]
예제 #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, 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())
]
예제 #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, MenuPage, GetTicket, ProcessingView, NextView

urlpatterns = [
    path('', WelcomeView.as_view()),
    re_path('menu/', MenuPage.as_view()),
    path('get_ticket/<str:link>', GetTicket.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, 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()),
]