app/soc/views/helper/params.py
changeset 1093 05ac761edb27
parent 1092 b03895bba47a
child 1094 e143974a6e27
equal deleted inserted replaced
1092:b03895bba47a 1093:05ac761edb27
   121           'soc.views.models.%(module_name)s.public', 'Show %(name_short)s'),
   121           'soc.views.models.%(module_name)s.public', 'Show %(name_short)s'),
   122       (r'^%(url_name)s/(?P<access_type>export)/%(key_fields)s$',
   122       (r'^%(url_name)s/(?P<access_type>export)/%(key_fields)s$',
   123           'soc.views.models.%(module_name)s.export', 'Export %(name_short)s'),
   123           'soc.views.models.%(module_name)s.export', 'Export %(name_short)s'),
   124       (r'^%(url_name)s/(?P<access_type>create)$',
   124       (r'^%(url_name)s/(?P<access_type>create)$',
   125           'soc.views.models.%(module_name)s.create', 'Create %(name_short)s'),
   125           'soc.views.models.%(module_name)s.create', 'Create %(name_short)s'),
   126       (r'^%(url_name)s/(?P<access_type>create)/%(scope)s$',
       
   127           'soc.views.models.%(module_name)s.create', 'Create %(name_short)s'),
       
   128       (r'^%(url_name)s/(?P<access_type>delete)/%(key_fields)s$',
   126       (r'^%(url_name)s/(?P<access_type>delete)/%(key_fields)s$',
   129           'soc.views.models.%(module_name)s.delete', 'Delete %(name_short)s'),
   127           'soc.views.models.%(module_name)s.delete', 'Delete %(name_short)s'),
   130       (r'^%(url_name)s/(?P<access_type>edit)/%(key_fields)s$',
   128       (r'^%(url_name)s/(?P<access_type>edit)/%(key_fields)s$',
   131           'soc.views.models.%(module_name)s.edit', 'Edit %(name_short)s'),
   129           'soc.views.models.%(module_name)s.edit', 'Edit %(name_short)s'),
   132       (r'^%(url_name)s/(?P<access_type>list)$',
   130       (r'^%(url_name)s/(?P<access_type>list)$',
   133           'soc.views.models.%(module_name)s.list', 'List %(name_plural)s'),
   131           'soc.views.models.%(module_name)s.list', 'List %(name_plural)s'),
   134       (r'^%(url_name)s/(?P<access_type>pick)$',
   132       (r'^%(url_name)s/(?P<access_type>pick)$',
   135           'soc.views.models.%(module_name)s.pick', 'Pick %(name_short)s'),
   133           'soc.views.models.%(module_name)s.pick', 'Pick %(name_short)s'),
   136       ]
   134       ]
   137 
   135 
       
   136   if not params.get('no_create_with_scope'):
       
   137     new_params['django_patterns_defaults'] += [
       
   138         (r'^%(url_name)s/(?P<access_type>create)/%(scope)s$',
       
   139         'soc.views.models.%(module_name)s.create', 'Create %(name_short)s')]
       
   140 
   138   if not params.get('no_create_with_key_fields'):
   141   if not params.get('no_create_with_key_fields'):
   139     new_params['django_patterns_defaults'] += [
   142     new_params['django_patterns_defaults'] += [
   140         (r'^%(url_name)s/(?P<access_type>create)/%(key_fields)s$',
   143         (r'^%(url_name)s/(?P<access_type>create)/%(key_fields)s$',
   141         'soc.views.models.%(module_name)s.create', 'Create %(name_short)s')]
   144         'soc.views.models.%(module_name)s.create', 'Create %(name_short)s')]
   142 
   145