Skip to content
Snippets Groups Projects
Commit ca28d892 authored by MikaelKrats's avatar MikaelKrats
Browse files

merge conflict manual fixes

parent c2f694ab
No related branches found
No related tags found
1 merge request!29profile page
Pipeline #14875 passed
......@@ -140,7 +140,7 @@ def logout():
"""
logout_user()
flash("You have been logged out.")
return redirect(url_for('index'))
return redirect(url_for('views.index'))
@bp.route('/profile', defaults={'email': 'me'})
......
......@@ -61,8 +61,6 @@ class Item(db.Document):
]}
]}
title = StringField(max_length=100, required=True)
description = StringField(max_length=2000, required=True)
......@@ -87,3 +85,10 @@ class Item(db.Document):
self.image.replace(output.getvalue(), content_type='image/jpeg')
super().save(*args, **kwargs)
@property
def is_open(self) -> bool:
"""
Return whether the item is open for bidding.
"""
return self.closes_at > datetime.utcnow()
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment