Skip to content

Instantly share code, notes, and snippets.

View revado's full-sized avatar
💭
Looking for a job

noahsss revado

💭
Looking for a job
View GitHub Profile
@kphretiq
kphretiq / Flask-SqlAlchemy-Many-to-Many.py
Last active March 16, 2024 17:18
A (hopefully) simple demo of how to do many-to-many relationships using Flask-SQLAlchemy
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from flask import Flask, url_for
from flask_sqlalchemy import SQLAlchemy
"""
Flask-SQLAlchemy many-to-many relationship using helper table
http://flask-sqlalchemy.pocoo.org/2.1/models/
Hippies love their dogs.