Пример #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')
Пример #2
0
 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')
Пример #3
0
 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')
Пример #4
0
 def index(self):
     return render('explore_tag.html')
Пример #5
0
 def index(self):
     return render('search.html')
Пример #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')
Пример #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')
Пример #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')
Пример #9
0
 def add(self):
     """ Displays the standard form"""
     c.tags =  model.Session.query(model.objects.Tag).all()
                          
     return render('/ignorefile/add.html')