aboutsummaryrefslogtreecommitdiff
path: root/src/web/controllers/category.py
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2016-02-03 07:11:37 +0100
committerCédric Bonhomme <cedric@cedricbonhomme.org>2016-02-03 07:11:37 +0100
commitda929a367c3f1fe5f3546be82e47111c2fa84ad3 (patch)
tree89380f41b802256d8fdbf724e7d9e63b48209b4a /src/web/controllers/category.py
parentMerge pull request #30 from jaesivsm/master (diff)
parentwriting a bit of doc, moving crawler together (diff)
downloadnewspipe-da929a367c3f1fe5f3546be82e47111c2fa84ad3.tar.gz
newspipe-da929a367c3f1fe5f3546be82e47111c2fa84ad3.tar.bz2
newspipe-da929a367c3f1fe5f3546be82e47111c2fa84ad3.zip
Merge pull request #31 from jaesivsm/master
redoing UI
Diffstat (limited to 'src/web/controllers/category.py')
-rw-r--r--src/web/controllers/category.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/web/controllers/category.py b/src/web/controllers/category.py
new file mode 100644
index 00000000..fef5ca81
--- /dev/null
+++ b/src/web/controllers/category.py
@@ -0,0 +1,12 @@
+from .abstract import AbstractController
+from web.models import Category
+from .feed import FeedController
+
+
+class CategoryController(AbstractController):
+ _db_cls = Category
+
+ def delete(self, obj_id):
+ FeedController(self.user_id).update({'category_id': obj_id},
+ {'category_id': None})
+ return super().delete(obj_id)
bgstack15