diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2020-02-26 11:27:31 +0100 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2020-02-26 11:27:31 +0100 |
commit | 62b3afeeedfe054345f86093e2d243e956c1e3c9 (patch) | |
tree | bbd58f5c8c07f5d87b1c1cca73fa1d5af6178f48 /src/web/models/tag.py | |
parent | Updated Python dependencies. (diff) | |
download | newspipe-62b3afeeedfe054345f86093e2d243e956c1e3c9.tar.gz newspipe-62b3afeeedfe054345f86093e2d243e956c1e3c9.tar.bz2 newspipe-62b3afeeedfe054345f86093e2d243e956c1e3c9.zip |
The project is now using Poetry.
Diffstat (limited to 'src/web/models/tag.py')
-rw-r--r-- | src/web/models/tag.py | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/src/web/models/tag.py b/src/web/models/tag.py deleted file mode 100644 index 76467c0b..00000000 --- a/src/web/models/tag.py +++ /dev/null @@ -1,36 +0,0 @@ -#! /usr/bin/env python -# -*- coding: utf-8 -*- - -from bootstrap import db - - -class ArticleTag(db.Model): - text = db.Column(db.String, primary_key=True, unique=False) - - # foreign keys - article_id = db.Column(db.Integer, db.ForeignKey('article.id', ondelete='CASCADE'), - primary_key=True) - - # relationships - article = db.relationship('Article', back_populates='tag_objs', - foreign_keys=[article_id]) - - def __init__(self, text): - self.text = text - - -class BookmarkTag(db.Model): - id = db.Column(db.Integer, primary_key=True) - text = db.Column(db.String, unique=False) - - # foreign keys - user_id = db.Column(db.Integer, db.ForeignKey('user.id', ondelete='CASCADE')) - bookmark_id = db.Column(db.Integer, db.ForeignKey('bookmark.id', ondelete='CASCADE')) - - # relationships - bookmark = db.relationship('Bookmark', back_populates='tags', - cascade="all,delete", foreign_keys=[bookmark_id]) - - # def __init__(self, text, user_id): - # self.text = text - # self.user_id = user_id |