Commits

Andriy Kornatskyy committed 80a0407

Reconfigured routes to use hierarchical structure (locale node).

  • Participants
  • Parent commits 2993db9

Comments (0)

Files changed (2)

File demos/public/src/urls.py

                 root='content/static/',
                 age=timedelta(hours=1))))
 
+locale_urls = public_urls + membership_urls
+locale_urls.append(('error/', error_urls, locale_defaults))
+locale_urls.append(('error/', test_error_urls, locale_defaults))
 all_urls = [
         url('',
             template_handler('public/home.html'),
             locale_defaults,
             name='default'),
-        (locale_pattern, public_urls, locale_defaults),
-        (locale_pattern, membership_urls, locale_defaults),
-        (locale_pattern + 'error/', error_urls, locale_defaults),
-        (locale_pattern + 'error/', test_error_urls, locale_defaults),
+        (locale_pattern, locale_urls, locale_defaults),
         url('static/{path:any}', static_files, name='static'),
         url('favicon.ico', static_files, {'path': 'img/favicon.ico'})
 ]

File demos/template/src/urls.py

                 root='content/static/',
                 age=timedelta(hours=1))))
 
+locale_urls = public_urls + membership_urls
+locale_urls.append(('error/', error_urls, locale_defaults))
 all_urls = [
         url('',
             template_handler('public/home.html'),
             locale_defaults,
             name='default'),
-        (locale_pattern, public_urls, locale_defaults),
-        (locale_pattern, membership_urls, locale_defaults),
-        (locale_pattern + 'error/', error_urls, locale_defaults),
+        (locale_pattern, locale_urls, locale_defaults),
         url('static/{path:any}', static_files, name='static'),
         url('favicon.ico', static_files, {'path': 'img/favicon.ico'})
 ]