我们从Python开源项目中,提取了以下1个代码示例,用于说明如何使用django.contrib.staticfiles.urls.staticfiles_urlpatterns()。
def setup_urlconf(self, router): # url from django.conf.urls import url, include from django.contrib.staticfiles.urls import staticfiles_urlpatterns urlpatterns = [ url(r'^', include(router.urls)) ] urlpatterns += staticfiles_urlpatterns() return urlpatterns