app/soc/views/helper/params.py
changeset 1093 05ac761edb27
parent 1092 b03895bba47a
child 1094 e143974a6e27
--- a/app/soc/views/helper/params.py	Fri Jan 30 22:00:01 2009 +0000
+++ b/app/soc/views/helper/params.py	Fri Jan 30 22:00:23 2009 +0000
@@ -123,8 +123,6 @@
           'soc.views.models.%(module_name)s.export', 'Export %(name_short)s'),
       (r'^%(url_name)s/(?P<access_type>create)$',
           'soc.views.models.%(module_name)s.create', 'Create %(name_short)s'),
-      (r'^%(url_name)s/(?P<access_type>create)/%(scope)s$',
-          'soc.views.models.%(module_name)s.create', 'Create %(name_short)s'),
       (r'^%(url_name)s/(?P<access_type>delete)/%(key_fields)s$',
           'soc.views.models.%(module_name)s.delete', 'Delete %(name_short)s'),
       (r'^%(url_name)s/(?P<access_type>edit)/%(key_fields)s$',
@@ -135,6 +133,11 @@
           'soc.views.models.%(module_name)s.pick', 'Pick %(name_short)s'),
       ]
 
+  if not params.get('no_create_with_scope'):
+    new_params['django_patterns_defaults'] += [
+        (r'^%(url_name)s/(?P<access_type>create)/%(scope)s$',
+        'soc.views.models.%(module_name)s.create', 'Create %(name_short)s')]
+
   if not params.get('no_create_with_key_fields'):
     new_params['django_patterns_defaults'] += [
         (r'^%(url_name)s/(?P<access_type>create)/%(key_fields)s$',