equal
deleted
inserted
replaced
80 """ |
80 """ |
81 |
81 |
82 params = {} |
82 params = {} |
83 rights = {} |
83 rights = {} |
84 |
84 |
|
85 # add ugettext_lazy ? |
85 params['name'] = "Site Settings" |
86 params['name'] = "Site Settings" |
86 params['name_short'] = "site_settings" |
87 params['name_short'] = "Site Settings" |
87 params['name_plural'] = "Site Settings" |
88 params['name_plural'] = "Site Settings" |
|
89 # lower name and replace " " with "/" |
|
90 # for module name lower name and replace " " with "_" |
|
91 params['url_name'] = "site/settings" |
|
92 params['module_name'] = "site_settings" |
88 |
93 |
89 params['edit_form'] = EditForm |
94 params['edit_form'] = EditForm |
90 params['create_form'] = CreateForm |
95 params['create_form'] = CreateForm |
91 |
96 |
92 params['lists_template'] = { |
97 params['lists_template'] = { |
94 'list_pagination': 'soc/list/list_pagination.html', |
99 'list_pagination': 'soc/list/list_pagination.html', |
95 'list_row': 'soc/site_settings/list/site_row.html', |
100 'list_row': 'soc/site_settings/list/site_row.html', |
96 'list_heading': 'soc/site_settings/list/site_heading.html', |
101 'list_heading': 'soc/site_settings/list/site_heading.html', |
97 } |
102 } |
98 |
103 |
99 params['delete_redirect'] = '/site/list' |
104 params['delete_redirect'] = '/' + params['url_name'] + '/list' |
100 |
105 |
101 params['sidebar_additional'] = [('/site_settings/edit','Edit Main Site Settings')] |
106 params['sidebar_additional'] = [ ( '/' + params['url_name'] + '/edit', 'Edit Main Site Settings')] |
102 |
107 |
103 params = dicts.merge(original_params, params) |
108 params = dicts.merge(original_params, params) |
104 rights = dicts.merge(original_rights, rights) |
109 rights = dicts.merge(original_rights, rights) |
105 |
110 |
106 home_settings.View.__init__(self, original_rights=rights, original_params=params) |
111 home_settings.View.__init__(self, original_rights=rights, original_params=params) |
141 """See base.View.getDjangoURLPatterns(). |
146 """See base.View.getDjangoURLPatterns(). |
142 """ |
147 """ |
143 |
148 |
144 patterns = super(View, self).getDjangoURLPatterns() |
149 patterns = super(View, self).getDjangoURLPatterns() |
145 patterns += [(r'^$','soc.views.models.site_settings.main_public')] |
150 patterns += [(r'^$','soc.views.models.site_settings.main_public')] |
146 patterns += [(r'^site_settings/edit$', 'soc.views.models.site_settings.main_edit')] |
151 patterns += [(r'^' + self._params['url_name'] + '/edit$', 'soc.views.models.site_settings.main_edit')] |
147 return patterns |
152 return patterns |
148 |
153 |
149 view = View() |
154 view = View() |
150 |
155 |
151 create = view.create |
156 create = view.create |