Loading

摘要: URL配置 基本格式: from django.conf.urls import url urlpatterns = [ url(正则表达式, views视图,参数,别名),] 示例: from django.conf.urls import url from . import views urlp 阅读全文
posted @ 2019-04-08 11:45 Ellisonzhang 阅读(296) 评论(0) 推荐(0) 编辑
摘要: django的类视图拥有自动查找指定方法的功能, 通过调用是通过as_view()方法实现 urls.py from meduo_mall.demo import views urlpatterns = [ url(r'register/$', views.Demo.as_view()) ] vie 阅读全文
posted @ 2019-04-08 08:52 Ellisonzhang 阅读(295) 评论(0) 推荐(0) 编辑