From 1945dbe65c2be3a2e943dd5d3eecf195058efe65 Mon Sep 17 00:00:00 2001 From: Logan Hunt Date: Tue, 27 Mar 2018 09:30:24 -0600 Subject: [PATCH] Update login.py --- login.py | 50 +++++++++++++++++++++----------------------------- 1 file changed, 21 insertions(+), 29 deletions(-) diff --git a/login.py b/login.py index 70c4f16..bfe0355 100644 --- a/login.py +++ b/login.py @@ -1,34 +1,26 @@ - -{% block body %} -{% if session['logged_in'] %} -

You're logged in already!

-{% else %} +from sqlalchemy import * +from sqlalchemy import create_engine, ForeignKey +from sqlalchemy import Column, Date, Integer, String +from sqlalchemy.ext.declarative import declarative_base +from sqlalchemy.orm import relationship, backref +engine = create_engine('sqlite:///tutorial.db', echo=True) +Base = declarative_base() -
- -
- -{% endif %} -{% endblock %} +# create tables +Base.metadata.create_all(engine)