456 self._logic.delete(entity) |
456 self._logic.delete(entity) |
457 redirect = params['delete_redirect'] |
457 redirect = params['delete_redirect'] |
458 |
458 |
459 return http.HttpResponseRedirect(redirect) |
459 return http.HttpResponseRedirect(redirect) |
460 |
460 |
|
461 def select(self, request, view, redirect, page_name=None, params=None): |
|
462 """Displays a list page allowing the user to select an entity |
|
463 |
|
464 After having selected the Sponsor, the user is redirected to the |
|
465 'create a new program' page with the scope_path set appropriately. |
|
466 |
|
467 Params usage: |
|
468 The params dictionary is also passed to getListContent from |
|
469 the helper.list module, please refer to its docstring also. |
|
470 The params dictionary is passed to self._list as well, refer |
|
471 to its docstring for details on how it uses it. |
|
472 |
|
473 Args: |
|
474 request: the standard Django HTTP request object |
|
475 page_name: the page name displayed in templates as page and header title |
|
476 params: a dict with params for this View |
|
477 """ |
|
478 |
|
479 params = dicts.merge(params, view.getParams()) |
|
480 params = dicts.merge(params, self._params) |
|
481 params['list_action'] = (redirect, self._params) |
|
482 |
|
483 content = helper.lists.getListContent(request, params) |
|
484 contents = [content] |
|
485 |
|
486 return self._list(request, params, contents, page_name) |
|
487 |
461 def _editPost(self, request, entity, fields): |
488 def _editPost(self, request, entity, fields): |
462 """Performs any required processing on the entity to post its edit page. |
489 """Performs any required processing on the entity to post its edit page. |
463 |
490 |
464 Args: |
491 Args: |
465 request: the django request object |
492 request: the django request object |