--- a/app/soc/views/helper/params.py Thu Dec 18 07:02:48 2008 +0000
+++ b/app/soc/views/helper/params.py Thu Dec 18 09:52:04 2008 +0000
@@ -109,8 +109,6 @@
'soc.views.models.%(module_name)s.public', 'Show %(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)/%(key_fields)s$',
- '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$',
@@ -121,6 +119,11 @@
'soc.views.models.%(module_name)s.list', 'List %(name_plural)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$',
+ 'soc.views.models.%(module_name)s.create', 'Create %(name_short)s')]
+
new_params['public_template'] = 'soc/%(module_name)s/public.html' % params
new_params['create_template'] = 'soc/models/edit.html'
new_params['edit_template'] = 'soc/models/edit.html'