def catalogRSSAll():
  items = db.session.query(Item).order_by(db.desc(Item.changed)).all()
  url = "192.168.1.180:5000"
  latest = items[0].changed.strftime('%d %B %Y %X')
  return render_template('rsscatalog.rss', items=items, url=url, latest=latest)
def catalogRSSCategory(category):
  category = db.session.query(Category).filter_by(name = category).first()
  items = db.session.query(Item).filter_by(category_id=category.id).order_by(db.desc(Item.changed)).all()
  url = FullURL
  latest = items[0].changed.strftime('%d %B %Y %X')
  return render_template('rsscategory.rss', category=category, items=items, url=url, latest=latest)
def catalogListHome():
   # Latest 5 Items
    items = db.session.query(Item).join('category').order_by(db.desc(Item.changed)).limit(5)
    category = db.session.query(Category).all()
    itemcount = db.session.query(Item)
    return render_template('home.html', items = items, category = category, itemcount = itemcount)