equal
deleted
inserted
replaced
110 new_params['name_plural'] = "Users" |
110 new_params['name_plural'] = "Users" |
111 new_params['url_name'] = "user" |
111 new_params['url_name'] = "user" |
112 new_params['module_name'] = "user_self" |
112 new_params['module_name'] = "user_self" |
113 |
113 |
114 new_params['sidebar_heading'] = 'Users' |
114 new_params['sidebar_heading'] = 'Users' |
|
115 |
|
116 patterns = [] |
|
117 |
|
118 page_name = "Profile" |
|
119 patterns += [(r'^%(url_name)s/edit$', |
|
120 'soc.views.models.%(module_name)s.edit', page_name)] |
|
121 |
|
122 page_name = "Requests Overview" |
|
123 patterns += [(r'^%(url_name)s/roles$', |
|
124 'soc.views.models.request.list_self', page_name)] |
|
125 |
|
126 new_params['django_patterns_defaults'] = patterns |
115 |
127 |
116 params = dicts.merge(params, new_params) |
128 params = dicts.merge(params, new_params) |
117 |
129 |
118 super(View, self).__init__(params=params) |
130 super(View, self).__init__(params=params) |
119 |
131 |
232 ('/' + self._params['url_name'] + '/roles', 'Roles', 'roles'), |
244 ('/' + self._params['url_name'] + '/roles', 'Roles', 'roles'), |
233 ] |
245 ] |
234 |
246 |
235 return super(View, self).getSidebarLinks(request, params) |
247 return super(View, self).getSidebarLinks(request, params) |
236 |
248 |
237 def getDjangoURLPatterns(self, params=None): |
|
238 """See base.View.getDjangoURLPatterns(). |
|
239 """ |
|
240 |
|
241 patterns = [] |
|
242 patterns += [(r'^' + self._params['url_name'] + '/edit$', |
|
243 'soc.views.models.user_self.edit')] |
|
244 |
|
245 page_name = "Requests Overview" |
|
246 patterns += [(r'^' + self._params['url_name'] + '/roles$', |
|
247 'soc.views.models.request.list_self', |
|
248 {'page_name': page_name}, page_name)] |
|
249 |
|
250 return patterns |
|
251 |
|
252 |
249 |
253 view = View() |
250 view = View() |
254 |
251 |
255 edit = view.edit |
252 edit = view.edit |