コード例 #1
0
def user_movies():

    movies = Movie.from_all()
    print('DEBUG MESSAGE', file=sys.stderr)
    print(movies, file=sys.stderr)
    return render_template('movies.html',
                           movies=movies,
                           email=session['email'])
コード例 #2
0
def register_user():
    email = request.form['email']
    password = request.form['password']

    User.register(email, password)
    movies = Movie.from_all()

    return render_template('movies.html',
                           movies=movies,
                           email=session['email'])
コード例 #3
0
def login_user():
    email = request.form['email']
    password = request.form['password']

    if User.login_valid(email, password):
        print("test")
        User.login(email)
    else:
        session['email'] = None

    movies = Movie.from_all()
    return render_template('movies.html',
                           movies=movies,
                           email=session['email'])
コード例 #4
0
ファイル: user.py プロジェクト: jgratsova/flixation
 def get_movies(self):
     return Movie.from_all()