--- a/app/soc/views/helper/params.py Sat Feb 14 16:43:20 2009 +0000
+++ b/app/soc/views/helper/params.py Sat Feb 14 16:43:53 2009 +0000
@@ -124,18 +124,19 @@
'soc.views.models.%(module_name)s.public', 'Show %(name_short)s'),
(r'^%(url_name)s/(?P<access_type>export)/%(key_fields)s$',
'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>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$',
'soc.views.models.%(module_name)s.edit', 'Edit %(name_short)s'),
- (r'^%(url_name)s/(?P<access_type>list)$',
- 'soc.views.models.%(module_name)s.list', 'List %(name_plural)s'),
(r'^%(url_name)s/(?P<access_type>pick)$',
'soc.views.models.%(module_name)s.pick', 'Pick %(name_short)s'),
]
+ if not params.get('no_create_raw'):
+ new_params['django_patterns_defaults'] += [
+ (r'^%(url_name)s/(?P<access_type>create)$',
+ 'soc.views.models.%(module_name)s.create', 'Create %(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$',
@@ -146,6 +147,11 @@
(r'^%(url_name)s/(?P<access_type>create)/%(key_fields)s$',
'soc.views.models.%(module_name)s.create', 'Create %(name_short)s')]
+ if not params.get('no_list_raw'):
+ new_params['django_patterns_defaults'] += [
+ (r'^%(url_name)s/(?P<access_type>list)$',
+ 'soc.views.models.%(module_name)s.list', 'List %(name_plural)s')]
+
new_params['public_template'] = 'soc/%(module_name)s/public.html' % params
new_params['export_template'] = 'soc/%(module_name)s/export.html' % params
new_params['create_template'] = 'soc/models/edit.html'
--- a/app/soc/views/models/document.py Sat Feb 14 16:43:20 2009 +0000
+++ b/app/soc/views/models/document.py Sat Feb 14 16:43:53 2009 +0000
@@ -87,8 +87,10 @@
'soc.views.models.%(module_name)s.list', 'List %(name_plural)s')
]
+ new_params['no_create_raw'] = True
new_params['no_create_with_scope'] = True
new_params['no_create_with_key_fields'] = True
+ new_params['no_list_raw'] = True
new_params['create_extra_dynafields'] = {
'content': forms.fields.CharField(