コード例 #1
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)
コード例 #2
0
ファイル: urls.py プロジェクト: ms85py/django-carservice
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())
]
コード例 #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 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()),
]
コード例 #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 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()),
]
コード例 #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
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())
]
コード例 #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, 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())
]
コード例 #7
0
    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()),
]
コード例 #8
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("", 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()),
]