diff --git a/participate.py b/participate.py index 3833763..3561855 100755 --- a/participate.py +++ b/participate.py @@ -1062,9 +1062,8 @@ def print_users(): if session['is_admin']: page = str(request.url_rule) menu = get_menu(page) - #~ staffs = Tetawebapp_staffs.query(Tetawebapp_staffs.user_id).distinct() staffers = Tetawebapp_users.query.filter(Tetawebapp_users.is_admin==0, Tetawebapp_users.link_id==None).order_by(Tetawebapp_users.name).all() - #~ sstaffers = [staffer for staffer in staffers if staffer.id in staffs] + data = render_template('list_users_txt.html', staffers=staffers) return staffers # User is not admin return render_template('login_or_register.html', message="Utilisateur ou mot de passe invalide") diff --git a/templates/list_users_txt.html b/templates/list_users_txt.html new file mode 100644 index 0000000..3ca7fac --- /dev/null +++ b/templates/list_users_txt.html @@ -0,0 +1,3 @@ +{% for staffer in staffers %} +{{staffer.name}},{{staffer.phone}},{{staffer.mail}},{{staffer.diet}} +{% endfor %}