(random improvements on texts)
This commit is contained in:
parent
3ee3794818
commit
d50b58cd24
|
@ -73,6 +73,6 @@
|
|||
descr: "CreativeCalc est l'association qui gère Planète Casio."
|
||||
privs: access-assoc-board
|
||||
-
|
||||
name: No login
|
||||
css: "color: #888888;"
|
||||
descr: "Compte dont l'accès au site est désactivé."
|
||||
name: No login
|
||||
css: "color: #888888;"
|
||||
descr: "Compte dont l'accès au site est désactivé."
|
||||
|
|
|
@ -20,7 +20,8 @@ class Forum(db.Model):
|
|||
lazy=True, foreign_keys=parent_id)
|
||||
|
||||
# Other fields populated automatically through relations:
|
||||
# <topics> List of topics in this exact forum (of type Topic)
|
||||
# <sub_forums> Children forums
|
||||
# <topics> List of topics in this exact forum (of type Topic)
|
||||
|
||||
# Some configuration
|
||||
TOPICS_PER_PAGE = 30
|
||||
|
|
|
@ -9,6 +9,8 @@ class Topic(Post):
|
|||
|
||||
__mapper_args__ = {
|
||||
'polymorphic_identity': __tablename__,
|
||||
# Because there is an extra relation to Post (promotion), SQLAlchemy
|
||||
# cannot guess which Post we inherit from; specify here.
|
||||
'inherit_condition': id == Post.id
|
||||
}
|
||||
|
||||
|
|
|
@ -20,11 +20,11 @@ import os
|
|||
|
||||
|
||||
class User(UserMixin, db.Model):
|
||||
""" Website user that performs actions on the post """
|
||||
""" Any website user, logged in (Member) or not (Guest) """
|
||||
|
||||
__tablename__ = 'user'
|
||||
|
||||
# User ID, should be used to refer to any user. Thea actual user can either
|
||||
# User ID, should be used to refer to any user. The actual user can either
|
||||
# be a guest (with IP as key) or a member (with this ID as key).
|
||||
id = db.Column(db.Integer, primary_key=True)
|
||||
# User type (polymorphic discriminator)
|
||||
|
@ -55,7 +55,7 @@ class Guest(User):
|
|||
# ID of the [User] entry
|
||||
id = db.Column(db.Integer, db.ForeignKey('user.id'), primary_key=True)
|
||||
# Reusable username, cannot be chosen as the name of a member
|
||||
# but will be distinguished at rendering time if a member take it later
|
||||
# but will be distinguished at rendering time if a member takes it later
|
||||
name = db.Column(db.Unicode(User.NAME_MAXLEN))
|
||||
|
||||
def __init__(self, name):
|
||||
|
@ -66,7 +66,7 @@ class Guest(User):
|
|||
|
||||
|
||||
class Member(User):
|
||||
""" Registered user with full access to the website's services """
|
||||
""" Registered user with full access to the site's features """
|
||||
|
||||
__tablename__ = 'member'
|
||||
__mapper_args__ = {'polymorphic_identity': __tablename__}
|
||||
|
@ -116,10 +116,6 @@ class Member(User):
|
|||
programs = db.relationship('Program')
|
||||
comments = db.relationship('Comment')
|
||||
|
||||
# Displayed title
|
||||
# title_id = db.Column(db.Integer, db.ForeignKey('title.id'))
|
||||
# title = db.relationship('Title', foreign_keys=title_id)
|
||||
|
||||
# Other fields populated automatically through relations:
|
||||
# <notifications> List of unseen notifications (of type Notification)
|
||||
# <polls> Polls created by the member (of class Poll)
|
||||
|
@ -152,6 +148,8 @@ class Member(User):
|
|||
db.session.delete(self)
|
||||
db.session.commit()
|
||||
|
||||
# Privilege checks
|
||||
|
||||
def priv(self, priv):
|
||||
"""Check whether the member has the specified privilege."""
|
||||
if SpecialPrivilege.query.filter_by(mid=self.id, priv=priv).first():
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
<p>
|
||||
Bienvenue sur le forum de Planète Casio ! Vous pouvez créer des
|
||||
nouveaux sujets ou poster des réponses avec un compte
|
||||
{% if not current_user.is_authenticated %}
|
||||
{%- if not current_user.is_authenticated %}
|
||||
ou en postant en tant qu'invité
|
||||
{% endif %}
|
||||
{%- endif -%}
|
||||
.
|
||||
</p>
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
{% if c.date_created != c.date_modified %}
|
||||
<div>Modifié le {{ c.date_modified|date }}</div>
|
||||
{% endif %}
|
||||
<div><a href="{{ request.path }}#{{ c.id }}">Permalink</a></div>
|
||||
<div><a href="{{ request.path }}#{{ c.id }}">Permalien</a></div>
|
||||
<div><a href="{{ url_for('edit_post', postid=c.id, r=request.path) }}">Modifier</a></div>
|
||||
<div><a href="{{ url_for('delete_post', postid=c.id, csrf_token=csrf_token()) }}" onclick="return confirm('Le message sera supprimé')">Supprimer</a></div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue