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'])
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'])
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'])
def get_movies(self): return Movie.from_all()