示例#1
0
def simplestatic_debug_urls():
    if not conf.SIMPLESTATIC_DEBUG:
        return patterns('')

    return patterns('', url(
        r'^%s(?P<path>.*)$' % conf.SIMPLESTATIC_DEBUG_PATH,
        'django.views.static.serve',
        {'show_indexes': True, 'document_root': conf.SIMPLESTATIC_DIR},
    ))
示例#2
0
def simplestatic_debug_urls():
    if not conf.SIMPLESTATIC_DEBUG:
        return patterns("")

    return patterns(
        "",
        url(
            r"^%s(?P<path>.*)$" % conf.SIMPLESTATIC_DEBUG_PATH,
            "django.views.static.serve",
            {"show_indexes": True, "document_root": conf.SIMPLESTATIC_DIR},
        ),
    )
示例#3
0
 def render(self, context):
     return url(self.path.resolve(context))
 def render(self, context):
     return url(self.path.resolve(context))