コード例 #1
0
 def post(self):
     if self.user:
         url = self.request.get('url')
         points = gmp_rules.worth_points(url, self.user)
         rating = self.store_rating_data()
         self.gain_points(points)
         gmp_rules.worth_points(url, self.user, True)  #update cache
         self.render('submitted_review.html', item=rating)
     else:
         self.render('welcome.html')
コード例 #2
0
ファイル: evaluate.py プロジェクト: acs6610987/CredibleWeb
 def post(self): 
     if self.user:
         url = self.request.get('url')
         points = gmp_rules.worth_points(url, self.user)
         rating = self.store_rating_data()
         self.gain_points(points)
         gmp_rules.worth_points(url, self.user, True)   #update cache
         self.render('submitted_review.html',
                     item = rating)
     else:
         self.render('welcome.html')
コード例 #3
0
ファイル: evaluate.py プロジェクト: acs6610987/CredibleWeb
 def get(self):
     if self.user:
         url = self.request.get('url')
         permit = self.check_X_Frame_Options(url)
         points = gmp_rules.worth_points(url, self.user)
         url_info = URLStorage.gql('WHERE url = :1', url).get()
         expertise_rmds = recommendAlg.expertiseRecommend(self.user.user_id)
         sparse_rmds = recommendAlg.sparseRecommend(self.user.user_id)
         diff_rmds = recommendAlg.diffRecommend(self.user.user_id)
         self.render('evaluate.html',
                     url = url,
                     permit = permit,
                     points = points,
                     url_info = url_info,
                     expertise_rmds = expertise_rmds,
                     sparse_rmds = sparse_rmds,
                     diff_rmds = diff_rmds)
     else:
         self.render('welcome.html')
コード例 #4
0
 def get(self):
     if self.user:
         url = self.request.get('url')
         permit = self.check_X_Frame_Options(url)
         points = gmp_rules.worth_points(url, self.user)
         url_info = URLStorage.gql('WHERE url = :1', url).get()
         expertise_rmds = recommendAlg.expertiseRecommend(self.user.user_id)
         sparse_rmds = recommendAlg.sparseRecommend(self.user.user_id)
         diff_rmds = recommendAlg.diffRecommend(self.user.user_id)
         self.render('evaluate.html',
                     url=url,
                     permit=permit,
                     points=points,
                     url_info=url_info,
                     expertise_rmds=expertise_rmds,
                     sparse_rmds=sparse_rmds,
                     diff_rmds=diff_rmds)
     else:
         self.render('welcome.html')
コード例 #5
0
ファイル: basichandler.py プロジェクト: zicofish/CredibleWeb
def get_reward_points(url, user):
    return gmp_rules.worth_points(url, user)
コード例 #6
0
def get_reward_points(url, user):
    return gmp_rules.worth_points(url, user)