app/soc/views/models/base.py
changeset 662 0e89b027b140
parent 653 5105939d3bb4
child 663 c2dcae606699
equal deleted inserted replaced
661:d7b643255255 662:0e89b027b140
   492       request: the django request object
   492       request: the django request object
   493       entity: the entity to create or update from POST contents
   493       entity: the entity to create or update from POST contents
   494       fields: the new field values
   494       fields: the new field values
   495     """
   495     """
   496 
   496 
   497     pass
   497     # If scope_logic is not defined, this entity has no scope
       
   498     if 'scope_logic' not in self._params:
       
   499       return
       
   500 
       
   501     scope = self._params['scope_logic'].logic.getFromKeyName(fields['scope_path'])
       
   502     fields['scope'] = scope
   498 
   503 
   499   def _public(self, request, entity, context):
   504   def _public(self, request, entity, context):
   500     """Performs any required processing to get an entities public page.
   505     """Performs any required processing to get an entities public page.
   501 
   506 
   502     Args:
   507     Args:
   514       request: the django request object
   519       request: the django request object
   515       entity: the entity to get
   520       entity: the entity to get
   516       form: the django form that will be used for the page
   521       form: the django form that will be used for the page
   517     """
   522     """
   518 
   523 
   519     pass
   524     # fill in the email field with the data from the entity
       
   525     form.fields['scope_path'].initial = entity.scope_path
   520 
   526 
   521   def _editSeed(self, request, seed):
   527   def _editSeed(self, request, seed):
   522     """Performs any required processing on the form to get its edit page.
   528     """Performs any required processing on the form to get its edit page.
   523 
   529 
   524     Args:
   530     Args: