app/soc/views/models/presence.py
changeset 656 a76f1b443ea4
parent 632 1f20cfb91e11
child 662 0e89b027b140
equal deleted inserted replaced
655:9635cbaa2dcd 656:a76f1b443ea4
    95 
    95 
    96 class View(base.View):
    96 class View(base.View):
    97   """View methods for the Document model.
    97   """View methods for the Document model.
    98   """
    98   """
    99 
    99 
   100   def __init__(self, original_params=None):
   100   def __init__(self, params=None):
   101     """Defines the fields and methods required for the base View class
   101     """Defines the fields and methods required for the base View class
   102     to provide the user with list, public, create, edit and delete views.
   102     to provide the user with list, public, create, edit and delete views.
   103 
   103 
   104     Params:
   104     Params:
   105       original_params: a dict with params for this View
   105       params: a dict with params for this View
   106     """
   106     """
   107 
   107 
   108     params = {}
   108     new_params = {}
   109     params['logic'] = soc.logic.models.presence.logic
   109     new_params['logic'] = soc.logic.models.presence.logic
   110 
   110 
   111     params['name'] = "Home Settings"
   111     new_params['name'] = "Home Settings"
   112     params['name_short'] = "Home Settings"
   112     new_params['name_short'] = "Home Settings"
   113     params['name_plural'] = "Home Settings"
   113     new_params['name_plural'] = "Home Settings"
   114     params['url_name'] = "home/settings"
   114     new_params['url_name'] = "home/settings"
   115     params['module_name'] = "presence"
   115     new_params['module_name'] = "presence"
   116 
   116 
   117     params['edit_form'] = EditForm
   117     new_params['edit_form'] = EditForm
   118     params['create_form'] = CreateForm
   118     new_params['create_form'] = CreateForm
   119 
   119 
   120     # Disable the presence sidebar until we have some use for it
   120     # Disable the presence sidebar until we have some use for it
   121     params['sidebar_defaults'] = []
   121     new_params['sidebar_defaults'] = []
   122 
   122 
   123     params = dicts.merge(original_params, params)
   123     params = dicts.merge(params, new_params)
   124 
   124 
   125     base.View.__init__(self, params=params)
   125     super(View, self).__init__(params=params)
   126 
   126 
   127   def _public(self, request, entity, context):
   127   def _public(self, request, entity, context):
   128     """
   128     """
   129     """
   129     """
   130 
   130