def wizard(store, request, language=GLSetting.memory_copy.default_language): receiver = request['receiver'] context = request['context'] node = request['node'] try: context_dict = db_create_context(store, context, language) except Exception as excep: log.err("Failed Context initialization %s" % excep) raise excep # associate the new context to the receiver receiver['contexts'] = [ context_dict['id'] ] try: receiver_dict = db_create_receiver(store, receiver, language) except Exception as excep: log.err("Failed Receiver Finitialization %s" % excep) raise excep try: db_update_node(store, node, True, language) except Exception as excep: log.err("Failed Node initialization %s" % excep) raise excep
def wizard(store, request, language=GLSetting.memory_copy.default_language): receiver = request['receiver'] context = request['context'] node = request['node'] try: context_dict = db_create_context(store, context, language) except Exception as excep: log.err("Failed Context initialization %s" % excep) raise excep # associate the new context to the receiver receiver['contexts'] = [context_dict['id']] try: receiver_dict = db_create_receiver(store, receiver, language) except Exception as excep: log.err("Failed Receiver Finitialization %s" % excep) raise excep try: db_update_node(store, node, True, language) except Exception as excep: log.err("Failed Node initialization %s" % excep) raise excep
def wizard(store, request, language): node = request['node'] context = request['context'] receiver = request['receiver'] node['default_language'] = language node['languages_enabled'] = [language] # Header title of the homepage is initially set with the node title node['header_title_homepage'] = node['name'] try: db_update_node(store, node, True, language) except Exception as excep: log.err("Failed Node initialization %s" % excep) raise excep try: context_dict = db_create_context(store, context, language) except Exception as excep: log.err("Failed Context initialization %s" % excep) raise excep # associate the new context to the receiver receiver['contexts'] = [context_dict['id']] try: db_create_receiver(store, receiver, language) except Exception as excep: log.err("Failed Receiver Initialization %s" % excep) raise excep