/
bubapb
/
Devops-Tools-Documentation
Обзор
Документация
Войти
/
bubapb
/
Devops-Tools-Documentation
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
DevOps-Pipeline-Python/Python/polling/urls.py
25 строк
962 B
JohnyDev
re-arrange-dir-close #103
13 авг 2022, 22:48
13 авг 2022, 22:48
731994c
Код
Авторство
О чём код?
"""polling URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.1/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.contrib import admin from django.urls import include, path from django.views.generic import RedirectView from polls import views urlpatterns = [ path('', RedirectView.as_view(url='polls/', permanent=True)), path('polls/', include('polls.urls')), path('admin/', admin.site.urls), ]