Django Book 翻译
菜单>:
TOC
返回
原文:
Speaking of constructing ``urlpatterns`` dynamically, you might want to take advantage of this technique to alter your URLconfs behavior while in Djangos debug mode. To do this, just check the value of the ``DEBUG`` setting at runtime, like so:
翻译:
当谈到动态构建 ``urlpatterns`` 时,你可能想利用这一技术,在 Django 的调试模式时,来修改 URLconf 的行为。为了做到这一点,只要在运行时检查 ``DEBUG`` 配置项的值即可,如:
备注:
译者: