"""student_sys URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based views 1. Add an import: from other_app.views import Home 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') Including another URLconf 1. Import the include() function: from django.conf.urls import url, include 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) """ from django.conf.urls import url from django.contrib import admin from student.views import index, IndexView urlpatterns = [ # url(r'^$', index, name='index'), url(r'^$', IndexView.as_view(), name='index'), url(r'^admin/', admin.site.urls), ]
"""student_sys URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based views 1. Add an import: from other_app.views import Home 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') Including another URLconf 1. Import the include() function: from django.conf.urls import url, include 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) """ from django.conf.urls import url, include from django.contrib import admin from student.views import IndexView urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'', include('student.urls')), url(r'^', IndexView.as_view()), ]
from django.urls import path from . import views from student.views import IndexView app_name = "student" urlpatterns = [ path('index/', IndexView.as_view(), name='index'), ]
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.conf.urls.i18n import i18n_patterns from django.conf import settings from django.conf.urls.static import static from django.contrib import admin from django.urls import path from student.views import ( IndexView, LoginView, XemDiemDuDoanView, XemChuongTrinhDaoTao, XemDiemView, ThemKeHoachHocTapCaNhan ) urlpatterns = i18n_patterns( path('admin/', admin.site.urls), path('', IndexView.as_view(), name='home'), path('login/', LoginView.as_view(), name='login'), path('chuongtrinhdaotao/', XemChuongTrinhDaoTao.as_view(), name='ctdaotao'), path('kehoachhoctapcanhan/', ThemKeHoachHocTapCaNhan.as_view(), name='kehoachhoctapcanhan'), path('xemdiemthi/', XemDiemView.as_view(), name='xemdiemthi'), path('xemdiem/', XemDiemDuDoanView.as_view(), name='xemdiem'), prefix_default_language=False )
"""student_sys URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.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 path from django.conf.urls import url from student.views import IndexView urlpatterns = [ path('admin/', admin.site.urls), url(r'^$', IndexView.as_view(), name='index') # index是一个视图函数 ]
"""student_sys URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.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 path from student.views import IndexView urlpatterns = [ path("", IndexView.as_view(), name='index'), path('admin/', admin.site.urls), ]
"""student_sys URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.0/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 path from django.conf.urls import url from student.views import IndexView urlpatterns = [ path('admin/', admin.site.urls), url('^$', IndexView.as_view(), name="index") ]
"""Qshop 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.contrib import admin from django.urls import path, re_path from student.views import IndexView urlpatterns = [path("index/", IndexView.as_view(), name='index')]
"""student_sys URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.0/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 path, re_path # from django.conf.urls import url from student.views import index, IndexView urlpatterns = [ # url(r'^$', index, name='index'), # url(r'^$', IndexView.as_view(), name='index'), # url(r'^admin/', admin.site.urls), # 正则表达式需用re_path替换path re_path(r'^$', IndexView.as_view(), name='index'), re_path(r'^admin/', admin.site.urls), ]
"""student_sys URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.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.conf.urls import url from django.contrib import admin from django.urls import path, include from student import views from student.views import index from student.views import IndexView urlpatterns = [ # path('admin/',admin.site.urls), # path('index',views.index), # path('idex/',include("student.urls"),name="idex"), url(r"^admin/", admin.site.urls), # url(r"^index/",index,name="index"), url(r"^index/", IndexView.as_view(), name="index"), ]