refactor: Un peu de nettoyage (debugging prints, routes, …)
This commit is contained in:
parent
34bc74b8e5
commit
ec73177f48
|
@ -61,11 +61,6 @@ def login():
|
|||
@app.route('/deconnexion')
|
||||
@login_required
|
||||
def logout():
|
||||
try:
|
||||
print(request.referrer)
|
||||
except Exception as e:
|
||||
print('No referrer:', e)
|
||||
|
||||
logout_user()
|
||||
flash('Déconnexion réussie', 'info')
|
||||
if request.referrer:
|
||||
|
|
|
@ -24,7 +24,6 @@ def delete_notification(id=None):
|
|||
|
||||
if type(id) == int:
|
||||
notification = Notification.query.get(id)
|
||||
print(">", notification)
|
||||
if notification:
|
||||
# Only current user or admin can delete notifications
|
||||
if notification.owner_id == current_user.id:
|
||||
|
|
|
@ -35,8 +35,6 @@ def adm_edit_account(user_id):
|
|||
setattr(GroupForm, "user_groups", [f'g{g.id}' for g in user.groups])
|
||||
group_form = GroupForm(prefix="group")
|
||||
|
||||
print(group_form.__dict__.items())
|
||||
|
||||
if form.submit.data:
|
||||
if form.validate_on_submit():
|
||||
newname = form.username.data
|
||||
|
|
|
@ -34,8 +34,6 @@ def forum_page(f):
|
|||
or ("/actus" not in f.url and not f.sub_forums)) and (
|
||||
V5Config.ENABLE_GUEST_POST or current_user.is_authenticated):
|
||||
|
||||
print("User can post topic")
|
||||
|
||||
# First create the thread, then the comment, then the topic
|
||||
th = Thread()
|
||||
db.session.add(th)
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
{% block content %}
|
||||
<section class="form">
|
||||
<a href="/user/{{ user.name }}">Visiter la page de profil de {{ user.name }}</a>
|
||||
<a href="{{ url_for('user', username=user.name) }}">Visiter la page de profil de {{ user.name }}</a>
|
||||
<form action="{{ url_for('adm_edit_account', user_id=user.id) }}" method="post" enctype="multipart/form-data">
|
||||
{{ form.hidden_tag() }}
|
||||
<h2>Informations</h2>
|
||||
|
|
Loading…
Reference in New Issue