django_view_dispatch:基于请求 HTTP 动词(GET、POST、PUT...)在 urls.py 中调度视图的 Django 实用程序

时间:2024-07-03 11:24:26
【文件属性】:

文件名称:django_view_dispatch:基于请求 HTTP 动词(GET、POST、PUT...)在 urls.py 中调度视图的 Django 实用程序

文件大小:4KB

文件格式:ZIP

更新时间:2024-07-03 11:24:26

Python

用法 from django . conf . urls import patterns , url from django_view_dispatch import dispatch , dispatch_strict from . import views urlpatterns = patterns ( '' , url ( r'^some_url/$' , dispatch ( get = views . my_view , post = views . my_view_for_post ), name = 'events_json' ), # you can get any keyword argument you want to specify any http verb url ( r'^some_url/$' , dispatch ( get =


【文件预览】:
django_view_dispatch-master
----setup.cfg(23B)
----README.md(3KB)
----test.py(2KB)
----settings.py(118B)
----django_view_dispatch.py(1008B)
----requirements.txt(16B)
----setup.py(755B)
----.travis.yml(215B)

网友评论