Merge branch 'dev' into preprod
This commit is contained in:
commit
07a5ee4006
|
@ -32,7 +32,8 @@ class User(UserMixin, db.Model):
|
|||
# User type (polymorphic discriminator)
|
||||
type = db.Column(db.String(30))
|
||||
|
||||
# Also a [posts] relationship populated from the Post class.
|
||||
# Other fields populated automatically through relations:
|
||||
# <posts> relationship populated from the Post class.
|
||||
|
||||
__mapper_args__ = {
|
||||
'polymorphic_identity': __tablename__,
|
||||
|
@ -106,6 +107,8 @@ class Member(User):
|
|||
# Relations
|
||||
trophies = db.relationship('Trophy', secondary=TrophyMember,
|
||||
back_populates='owners')
|
||||
topics = db.relationship('Topic')
|
||||
comments = db.relationship('Comment')
|
||||
|
||||
# Displayed title
|
||||
# title_id = db.Column(db.Integer, db.ForeignKey('title.id'))
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
<th>Création</th>
|
||||
<th>Commentaires</th>
|
||||
</tr>
|
||||
{% for t in member.posts if t.type == "topic" %}
|
||||
{% for t in member.topics %}
|
||||
<tr>
|
||||
<td><a href="{{ url_for('forum_topic', f=t.forum, page=(t, 1)) }}">{{ t.title }}</a></td>
|
||||
<td><a href="{{ url_for('forum_page', f=t.forum) }}">{{ t.forum.name }}</a></td>
|
||||
|
|
Loading…
Reference in New Issue