Esempio n. 1
0
 def index(self, came_from=lurl('/')):
     
     #print request.scheme   + '://';
     #hooks.notify('tgext.pylogservice.startup' ) 
     #hooks.notify('tgext.pyutilservice.startup')
     
     if not request.identity:
         ManageSession.deleteAll()
         
     if ManageSession.getLanguage() is None:
         ManageSession.setLanguage()
         
     print 'Session Language : %s' %(ManageSession.getLanguage())
     
     
     
     
     return dict(page='metronic') 
Esempio n. 2
0
 def saveProject(self, came_from=lurl('/'), *args, **kw):
     reload(sys).setdefaultencoding("utf-8");
     self.success = True;
     self.message = "success";
     
     print 'Session Language : %s' %(ManageSession.getLanguage())
     
     self.project = model.QuestionProject(**kw);
     self.project.id_question_project = self.utility.setIfEmpty(self.project.id_question_project)
     user =  request.identity['user']; 
     self.project.user_id =  user.user_id;
     
     if self.project.id_question_project :
         self.project.updateall();
     else:
         self.project.save();
         self.addQuestionGroup(  id_question_project=self.project.id_question_project, 
                                 question_group_name='default', 
                                 question_group_description='default',
                                 id_question_result_group = '', 
                                 order=0  );
         
     
     return dict(success=self.success, message = self.message, project_id=self.project.id_question_project);
Esempio n. 3
0
 def index(self, came_from=lurl('/'), **kw):
     reload(sys).setdefaultencoding("utf-8");
     self.content = model.Content.getByContentType(3,lang=ManageSession.getLanguage())
     return dict(page='service', content = self.content.content,title='Terms of Service') 
 def getContentForHelp(self,**kw):  
     reload(sys).setdefaultencoding("utf-8");  
     self.searchObject = SearchObject(**kw)       
     self.content = model.Content.getByContentType(self.searchObject.idsearch,lang=ManageSession.getLanguage())   
     self.value =""
     if self.content:
         self.value = self.content.content            
     return dict(content = self.value)