Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Dazirez/Mentii
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Zheng authored and Daniel Zheng committed Jul 25, 2020
2 parents 773a1ec + 047dff7 commit a047e93
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions flask-backend/main.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
import flask
from flask_sqlalchemy import SQLAlchemy


app = flask.Flask("__main__")
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:////test.db'
db = SQLAlchemy(app)

class Streamer(db.Model):
id = db.Column(db.Integer, primary_key=True)
username = db.Column(db.String(80), unique=True, nullable=False)
title = db.Column(db.String(80), nullable=False)
avi = db.Column(db.String(20), nullable=False, default ='default.jpg')

def __repr__(self):
return '<User %r>' % self.username

@app.route("/")
def my_index():
flask.render_template("index.html", token="Mentii"))
flask.render_template("index.html", token="Mentii")

app.run(debug=True)

app.run(debug=True)
Binary file added flask-backend/main.pyc
Binary file not shown.

0 comments on commit a047e93

Please sign in to comment.