<filename>auth.py<gh_stars>1-10
# -*- coding: utf-8 -*-

import cherrypy
from db.user import User

def check_password(realm, user, password):

    session = cherrypy.request.db
    query = session.query(User).filter(User.email==user)
    u = query.first()

    if u.password == password:
        print("Authorized")
        return True
    else:
        print("Not Authorized")
        return False

<filename>auth.py<gh_stars>1-10
# -*- coding: utf-8 -*-

import cherrypy
from db.user import User

def check_password(realm, user, password):

    session = cherrypy.request.db
    query = session.query(User).filter(User.email==user)
    u = query.first()

    if u.password == password:
        print("Authorized")
        return True
    else:
        print("Not Authorized")
        return False

# -*- coding: utf-8 -*-