摘要:
URL配置 基本格式: from django.conf.urls import url urlpatterns = [ url(正则表达式, views视图,参数,别名),] 示例: from django.conf.urls import url from . import views urlp 阅读全文
摘要:
django的类视图拥有自动查找指定方法的功能, 通过调用是通过as_view()方法实现 urls.py from meduo_mall.demo import views urlpatterns = [ url(r'register/$', views.Demo.as_view()) ] vie 阅读全文