Updated the db.py file
Merge pull request #3 from kleyow/master

Worked on templates.
Merge pull request #4 from JonCooperWorks/queries

Updated the db.py file
Added queries for admin panel.