This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE users ( | |
name TEXT UNIQUE NOT NULL PRIMARY KEY | |
); | |
CREATE TABLE branches ( | |
name TEXT UNIQUE NOT NULL, | |
owner TEXT NOT NULL REFERENCES users(name), | |
PRIMARY KEY(name, owner) | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask | |
app = Flask(__name__) | |
@app.route('/') | |
def hello_world(): | |
return 'Hello, World!' | |
@app.route('/about') | |
def about(): | |
a = 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask, request, redirect | |
from uuid import uuid4 | |
app = Flask(__name__) | |
# TODO: persist to disk | |
user_state = {} | |
def make_map(): |
OlderNewer