diff options
author | tilly-Q <nattilypigeonfowl@gmail.com> | 2013-08-29 17:31:19 -0400 |
---|---|---|
committer | tilly-Q <nattilypigeonfowl@gmail.com> | 2013-08-29 17:31:19 -0400 |
commit | 1bb367f6136ae4cbcdf6dd86af65eb613913dbd8 (patch) | |
tree | c3565801fcf21de1383b5bdb764208b3a98c8e49 /mediagoblin/db/models.py | |
parent | dfd66b789cd6cc9470c2a98bcbda9ee5e0f3ad0f (diff) | |
download | mediagoblin-1bb367f6136ae4cbcdf6dd86af65eb613913dbd8.tar.lz mediagoblin-1bb367f6136ae4cbcdf6dd86af65eb613913dbd8.tar.xz mediagoblin-1bb367f6136ae4cbcdf6dd86af65eb613913dbd8.zip |
This is a quick commit. I gave admins the ability to ban or unban users
straight from the moderation.users_detail page. I also changed the
UserBan.expiration_date type from DateTime into Date. I also began work on the
Terms of Service, pulled from another website (which will be cited clearly
before I'm done). I added new tests as well for the ban/unbanning. Lastly,
I added a few `user_not_banned` decorators to relevant views, so banned users
cannot access any pages.
Diffstat (limited to 'mediagoblin/db/models.py')
-rw-r--r-- | mediagoblin/db/models.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mediagoblin/db/models.py b/mediagoblin/db/models.py index dd2cd3e9..1e8d0a0c 100644 --- a/mediagoblin/db/models.py +++ b/mediagoblin/db/models.py @@ -23,7 +23,7 @@ import datetime from sqlalchemy import Column, Integer, Unicode, UnicodeText, DateTime, \ Boolean, ForeignKey, UniqueConstraint, PrimaryKeyConstraint, \ - SmallInteger + SmallInteger, Date from sqlalchemy.orm import relationship, backref, with_polymorphic from sqlalchemy.orm.collections import attribute_mapped_collection from sqlalchemy.sql.expression import desc @@ -777,7 +777,7 @@ class UserBan(Base): user_id = Column(Integer, ForeignKey(User.id), nullable=False, primary_key=True) - expiration_date = Column(DateTime) + expiration_date = Column(Date) reason = Column(UnicodeText, nullable=False) |