代码拉取完成,页面将自动刷新
Include Django URL patterns with decorators.
Unpack the archive, cd
to the source directory, and run the following
command:
python setup.py install
Assuming you have pip and git installed, run the following command to install from the GitHub repository:
pip install git+git://github.com/jeffkistler/django-decorator-include.git#egg=django-decorator-include
decorator_include
is intended for use in URL confs as a replacement
for the django.conf.urls.defaults.include
function. It works in almost
the same way as include
, however the first argument should be either a
decorator or an iterable of decorators to apply, in reverse order, to all
included views. Here is an example URL conf:
from django.conf.urls.defaults import * from django.contrib.auth.decorators import login_required from decorator_include import decorator_include urlpatterns = patterns('', url(r'^$', 'mysite.views.index', name='index'), url(r'^secret/', decorator_include(login_required, 'mysite.secret.urls'), )
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。