app/soc/views/models/document.py
changeset 1324 8cf30dee8048
parent 1319 042347748c45
child 1343 4ba39392c854
equal deleted inserted replaced
1323:a666374587df 1324:8cf30dee8048
    74 
    74 
    75     new_params['name'] = "Document"
    75     new_params['name'] = "Document"
    76 
    76 
    77     new_params['export_content_type'] = 'text/text'
    77     new_params['export_content_type'] = 'text/text'
    78 
    78 
    79     names = [i for i in document_logic.getKeyFieldNames() if i != 'link_id']
       
    80     create_pattern = params_helper.getPattern(
       
    81         names, linkable.SCOPE_PATH_ARG_PATTERN)
       
    82 
       
    83     new_params['extra_django_patterns'] = [
       
    84         (r'^document/(?P<access_type>create)/%s$' % create_pattern,
       
    85         'soc.views.models.%(module_name)s.create', 'Create %(name_short)s'),
       
    86         (r'^document/(?P<access_type>list)/%s$' % create_pattern,
       
    87         'soc.views.models.%(module_name)s.list', 'List %(name_plural)s')
       
    88         ]
       
    89 
       
    90     new_params['no_create_raw'] = True
    79     new_params['no_create_raw'] = True
    91     new_params['no_create_with_scope'] = True
    80     new_params['no_create_with_scope'] = True
    92     new_params['no_create_with_key_fields'] = True
    81     new_params['no_create_with_key_fields'] = True
    93     new_params['no_list_raw'] = True
    82     new_params['no_list_raw'] = True
       
    83     new_params['sans_link_id_create'] = True
       
    84     new_params['sans_link_id_list'] = True
    94 
    85 
    95     new_params['create_extra_dynafields'] = {
    86     new_params['create_extra_dynafields'] = {
    96         'content': forms.fields.CharField(
    87         'content': forms.fields.CharField(
    97             widget=helper.widgets.FullTinyMCE(attrs={'rows': 25, 'cols': 100})),
    88             widget=helper.widgets.FullTinyMCE(attrs={'rows': 25, 'cols': 100})),
    98         'scope_path': forms.fields.CharField(widget=forms.HiddenInput,
    89         'scope_path': forms.fields.CharField(widget=forms.HiddenInput,