From 1f98d945110b7cd467811e784eead280edcdee9e Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Sun, 10 Jan 2016 15:33:52 +0100 Subject: One URL for public/member group view. The group is now always reachable with a consistent URL regardless of membership of the current_user. If the user is no member the public view is rendered with the possibility to join the group. --- models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'models.py') diff --git a/models.py b/models.py index 564c27c..252cb20 100644 --- a/models.py +++ b/models.py @@ -30,7 +30,7 @@ class User(UserMixin, APIMixin, SessionMixin, db.Model): id = column(db.Integer, primary_key=True) name = column(db.String(255), unique=True) email = column(db.String(255)) - last_login = column(db.DateTime(timezone=True), server_default=func.now()) + last_login = column(db.DateTime(timezone=True), default=func.now()) active = column(db.Boolean, default=True, server_default=expression.true()) admin = column(db.Boolean, default=False, @@ -148,7 +148,7 @@ class Pad(APIMixin, SessionMixin, db.Model): id = column(db.Integer, primary_key=True) name = column(db.String(255)) group_id = column(db.Integer, db.ForeignKey('groups.id')) - created = column(db.DateTime(timezone=True), server_default=func.now()) + created = column(db.DateTime(timezone=True), default=func.now()) public = column(db.Boolean, default=False, server_default=expression.false()) password = column(db.String(255), default='', -- cgit v1.2.3-1-g7c22