Ignore:
Timestamp:
27/04/09 17:27:19 (11 years ago)
Author:
cbyrom
Message:

Add delete functionality to front tier of oai editor. Include
message to confirm the data has been completed, as a pop up, when
the operation is done. Update tests and simplify model + dal layer.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI01-discovery/trunk/OAIInfoEditor/oai_info_editor/controllers/edit.py

    r5232 r5233  
    136136 
    137137         
     138    def deleteProviderInfo(self, providerName): 
     139        ''' 
     140        Delete the provider info for the specified provider name 
     141        @param providerName: name of the provider whose data is to be deleted 
     142        ''' 
     143        logging.debug("Deleting provider info for provider, '%s'" %providerName) 
     144        self._setUpController(providerName = providerName) 
     145 
     146        pi = g.dao.deleteProviderInfo(providerName) 
     147 
     148        session[const.POP_UP_MESSAGE_SESSION_KEY] = "Data for provider with name, %s, successfully deleted" %providerName 
     149        session.save() 
     150 
     151        # now, return to the view page 
     152        h.redirect_to('home') 
     153 
     154         
    138155    def saveProviderInfo(self, providerName): 
    139156        ''' 
     
    141158        @param providerName: name of the provider whose data is to be saved 
    142159        ''' 
    143         logging.debug("Saving provider info") 
     160        logging.debug("Saving provider info for provider, '%s'" %providerName) 
    144161        self._setUpController(providerName = providerName) 
    145162        self.__getInputs() 
Note: See TracChangeset for help on using the changeset viewer.