Exemple #1
0
 def tag(self, tag=None):
     if tag == None:
         abort(404, "oh t**s")
     
     try:
         c.cur_tag = model.Session.query(Tag).filter(Tag.tag == tag).one()
     except NoResultFound:
         abort(404, 'Tag not found, maybe this should be part of the page')
         
     return render('/search_results.html')
 def view(self, id=None):
     if id == None:
         abort(404, 'ignore file not found')
         
     c.ignore_file = self._get_ignore_by_id(id)
     
     c.ignore_file.views = c.ignore_file.views + 1
     model.Session.commit()
     
     return render('/ignorefile/view.html')
 def view_by_niceurl(self, nice_url=None):
     if(nice_url == None):
         abort(404, 'Sorry not mapped to an ignore file')
     
     try:
          c.ignore_file = model.Session.query(model.objects.IgnoreFile).filter(model.objects.IgnoreFile.nice_url == nice_url).one()
          
          c.ignore_file.views = c.ignore_file + 1
          model.Session.commit()
     except NoResultFound:
         abort(404, 'Sorry not mapped to an ignore file')
         
     return render('/ignorefile/view.html')
Exemple #4
0
 def index(self):
     return render('explore_tag.html')
Exemple #5
0
 def index(self):
     return render('search.html')
Exemple #6
0
 def get_by_latest(self):
     c.ignore_list = model.Session.query(model.objects.IgnoreFile).order_by(desc(model.objects.IgnoreFile.submitted_date))[0:5]
     
     return render('res.html')
Exemple #7
0
 def get_by_views(self):
     c.ignore_list = model.Session.query(model.objects.IgnoreFile).order_by(desc(model.objects.IgnoreFile.views))[0:5]
     
     return render('res.html')
Exemple #8
0
 def index(self):
     c.ignore_list = model.Session.query(model.objects.IgnoreFile).order_by(desc(model.objects.IgnoreFile.submitted_date))[0:5]
     
     return render('home.html')
 def add(self):
     """ Displays the standard form"""
     c.tags =  model.Session.query(model.objects.Tag).all()
                          
     return render('/ignorefile/add.html')