diff options
Diffstat (limited to 'app/models.py')
-rw-r--r-- | app/models.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/models.py b/app/models.py index ef26bbd..2487e73 100644 --- a/app/models.py +++ b/app/models.py @@ -731,6 +731,15 @@ class Thread(db.Model): watchers = db.relationship("User", secondary=watchers, lazy="subquery", \ backref=db.backref("watching", lazy=True)) + + def getSubscribeURL(self): + return url_for("thread_subscribe_page", + id=self.id) + + def getUnsubscribeURL(self): + return url_for("thread_unsubscribe_page", + id=self.id) + def checkPerm(self, user, perm): if not user.is_authenticated: return not self.private |