aboutsummaryrefslogtreecommitdiff
path: root/src/web/models
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2017-05-23 21:24:04 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2017-05-23 21:24:04 +0200
commitec30925914fba06ba73a748d745c1a7356f2e53d (patch)
tree31063d7fff39852b16dc70d529eddb8c0dd737e4 /src/web/models
parentFixed conflicts. (diff)
downloadnewspipe-ec30925914fba06ba73a748d745c1a7356f2e53d.tar.gz
newspipe-ec30925914fba06ba73a748d745c1a7356f2e53d.tar.bz2
newspipe-ec30925914fba06ba73a748d745c1a7356f2e53d.zip
Improved display of bookmark's tags. And fixed some remainings merge related bugs.
Diffstat (limited to 'src/web/models')
-rw-r--r--src/web/models/__init__.py7
-rw-r--r--src/web/models/article.py8
2 files changed, 9 insertions, 6 deletions
diff --git a/src/web/models/__init__.py b/src/web/models/__init__.py
index 1fc0c3e0..45bfb096 100644
--- a/src/web/models/__init__.py
+++ b/src/web/models/__init__.py
@@ -32,9 +32,12 @@ from .user import User
from .article import Article
from .icon import Icon
from .category import Category
-from .tag import Tag
+from .tag import BookmarkTag
+from .tag import ArticleTag
+from .bookmark import Bookmark
-__all__ = ['Feed', 'Role', 'User', 'Article', 'Icon', 'Category', 'Tag']
+__all__ = ['Feed', 'Role', 'User', 'Article', 'Icon', 'Category',
+ 'Bookmark', 'ArticleTag', 'BookmarkTag']
import os
diff --git a/src/web/models/article.py b/src/web/models/article.py
index 87ad1a9a..f5ef619e 100644
--- a/src/web/models/article.py
+++ b/src/web/models/article.py
@@ -52,10 +52,10 @@ class Article(db.Model, RightMixin):
category_id = db.Column(db.Integer(), db.ForeignKey('category.id'))
# relationships
- tag_objs = db.relationship('Tag', back_populates='article',
- cascade='all,delete-orphan',
- lazy=False,
- foreign_keys='[Tag.article_id]')
+ tag_objs = db.relationship('ArticleTag', back_populates='article',
+ cascade='all,delete-orphan',
+ lazy=False,
+ foreign_keys='[ArticleTag.article_id]')
tags = association_proxy('tag_objs', 'text')
# index
bgstack15