:art: Support Python3.x for 'urls include'

huangqimin преди 5 години
родител
ревизия
3f8196dcaa
променени са 1 файла, в които са добавени 8 реда и са изтрити 8 реда
  1. 8 8
      kodo/urls.py

+ 8 - 8
kodo/urls.py

@@ -84,24 +84,24 @@ urlpatterns += [
84 84
 # Additionally, we include login URLs for the browsable API.
85 85
 urlpatterns += [
86 86
     # url(r'^restapi/', include(router.urls)),
87
-    url(r'^api/', include('api.urls', namespace='api')),
88
-    url(r'^uniapi/', include('django_uniapi.urls', namespace='uniapi')),
89
-    url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')),
87
+    url(r'^api/', include(('api.urls', 'api'), namespace='api')),
88
+    url(r'^uniapi/', include(('django_uniapi.urls', 'uniapi'), namespace='uniapi')),
89
+    url(r'^api-auth/', include(('rest_framework.urls', 'rest_framework'), namespace='rest_framework')),
90 90
 ]
91 91
 
92 92
 urlpatterns += [
93
-    url(r'^w/', include('django_we.urls', namespace='shortwechat')),
94
-    url(r'^we/', include('django_we.urls', namespace='wechat')),
93
+    url(r'^w/', include(('django_we.urls', 'shortwechat'), namespace='shortwechat')),
94
+    url(r'^we/', include(('django_we.urls', 'wechat'), namespace='wechat')),
95 95
 ]
96 96
 
97 97
 urlpatterns += [
98
-    url(r'^p/', include('page.urls', namespace='shortpage')),
99
-    url(r'^page/', include('page.urls', namespace='page')),
98
+    url(r'^p/', include(('page.urls', 'shortpage'), namespace='shortpage')),
99
+    url(r'^page/', include(('page.urls', 'page'), namespace='page')),
100 100
 ]
101 101
 
102 102
 # Simditor编辑器
103 103
 urlpatterns += [
104
-    url(r'^simditor/', include('simditor.urls'))
104
+    url(r'^simditor/', include(('simditor.urls', 'simditor'), namespace='simditor'))
105 105
 ]
106 106
 
107 107
 if settings.DEBUG: