Package expedient :: Package clearinghouse :: Package aggregate :: Module views
[hide private]
[frames] | no frames]

Module views

source code


Author: jnaous

Functions [hide private]
 
list(request, agg_id=None)
Get a list of aggregates.
source code
 
delete(request, agg_id)
Display a confirmation page then stop all slices and delete the aggregate.
source code
 
info(request, ct_id)
Return a page that shows the information on the aggregate.
source code
 
get_can_use_permission(request, permission, permittee, target_obj_or_class, redirect_to=None)
Get the 'can_use_aggregate' permission.
source code
 
status_img_url(request, agg_id)
Get the url for the status image of the aggregate
source code
Variables [hide private]
  logger = logging.getLogger("AggregateViews")
  TEMPLATE_PATH = 'expedient/clearinghouse/aggregate'
  __package__ = 'expedient.clearinghouse.aggregate'
Function Details [hide private]

list(request, agg_id=None)

source code 

Get a list of aggregates. agg_id specifies id to highlight. On POST, get the type of aggregate to be created and redirect to that model's create url.

Decorators:
  • @require_objs_permissions_for_view(perm_names= ["can_add_aggregate"], permittee_func= get_user_from_req, target_func= get_queryset_from_class(Aggregate), methods= ["POST"])

delete(request, agg_id)

source code 

Display a confirmation page then stop all slices and delete the aggregate.

Decorators:
  • @require_objs_permissions_for_view(perm_names= ["can_edit_aggregate"], permittee_func= get_user_from_req, target_func= get_leaf_queryset(Aggregate, "agg_id"), methods= ["GET", "POST"])

get_can_use_permission(request, permission, permittee, target_obj_or_class, redirect_to=None)

source code 

Get the 'can_use_aggregate' permission.

For project, slice, or user permittees, call the corresponding add_to_* method of the target aggregate.