Make Django urlpatterns list of url()s

- Support for legacy pattern() mechanism will be removed in Django
  1.10.  Currently we see a warning for each Plinth module.
This commit is contained in:
Sunil Mohan Adapa authored and James Valleroy committed 2015-12-05 09:33:23 -05:00
1 parent a432e16ed7
commit a69f419c3c
29 files changed
+197 -176

No files matched your search

+3 -3
View File
@@ -108,9 +108,9 @@ def _include_module_urls(module_name):
namespace = module_name.split('.')[-1]
url_module = module_name + '.urls'
try:
urls.urlpatterns += django.conf.urls.patterns(
'', django.conf.urls.url(
r'', django.conf.urls.include(url_module, namespace)))
urls.urlpatterns += [
django.conf.urls.url(
r'', django.conf.urls.include(url_module, namespace))]
except ImportError:
LOGGER.debug('No URLs for %s', module_name)
if cfg.debug: