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/category.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/category.py')
-rw-r--r-- | src/web/models/category.py | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/src/web/models/category.py b/src/web/models/category.py deleted file mode 100644 index 2da7809a..00000000 --- a/src/web/models/category.py +++ /dev/null @@ -1,29 +0,0 @@ -#! /usr/bin/env python -# -*- coding: utf-8 -*- - -from bootstrap import db -from sqlalchemy import Index -from web.models.right_mixin import RightMixin - - -class Category(db.Model, RightMixin): - id = db.Column(db.Integer(), primary_key=True) - name = db.Column(db.String()) - - # relationships - user_id = db.Column(db.Integer, db.ForeignKey('user.id')) - feeds = db.relationship('Feed', cascade='all,delete-orphan') - articles = db.relationship('Article', - cascade='all,delete-orphan') - - # index - idx_category_uid = Index('user_id') - - # api whitelists - @staticmethod - def _fields_base_read(): - return {'id', 'user_id'} - - @staticmethod - def _fields_base_write(): - return {'name'} |