Skip to content

Instantly share code, notes, and snippets.

View mercy-thuyle's full-sized avatar
🎯
Focusing Thesis

WhiTExB3AR mercy-thuyle

🎯
Focusing Thesis
  • VNUHCM - UIT
  • Ho Chi Minh City, Viet Nam
View GitHub Profile
@crearo
crearo / foreignKeyFlaskAlchemy.py
Last active May 8, 2024 23:12
A flask sqlalchemy database with foreign key references and integrity constraints
from flask import Flask, jsonify, request, make_response
from flask.ext.httpauth import HTTPBasicAuth
from flask_sqlalchemy import SQLAlchemy
from flask import render_template, redirect, url_for
from sqlalchemy import UniqueConstraint, exc
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///memes.db'
app.config['SECRET_KEY'] = 'HALO'