From e9710af05bba7581656e880efed2cde2c112b2bf Mon Sep 17 00:00:00 2001 From: pluja Date: Sat, 26 Sep 2020 15:01:12 +0200 Subject: [PATCH] adds route to recieve registrations status icon --- app/routes.py | 9 ++++++++- app/static/img/close.png | Bin 0 -> 4510 bytes app/static/img/open.png | Bin 0 -> 5835 bytes 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 app/static/img/close.png create mode 100644 app/static/img/open.png diff --git a/app/routes.py b/app/routes.py index c1d4a11..180c472 100644 --- a/app/routes.py +++ b/app/routes.py @@ -597,7 +597,14 @@ def register(): return redirect(url_for('login')) return render_template('register.html', title='Register', registrations=REGISTRATIONS, form=form, config=config) - + +@app.route('/registrations_status') +def registrations_status(): + count = db.session.query(User).count() + if count >= config['maxInstanceUsers'] or config['maxInstanceUsers'] == 0: + return url_for('static',filename='img/close.png') + else: + return url_for('static',filename='img/open.png') @app.route('/error/') def error(errno): diff --git a/app/static/img/close.png b/app/static/img/close.png new file mode 100644 index 0000000000000000000000000000000000000000..82fe0c025c85f6da1e26fdd6456821b351cda4ee GIT binary patch literal 4510 zcmaJ_XEfZ=xBY1oM2#eRh?XeB7=4H~YP9H`(R(MNj}jz0i8h32(Z%RQ34%nFAc!(r ziay$8bWi^8%X=T*J8PZ0@7?#Dv-Vy0uJhr(c%rRJNzOzL005=Bnv&i%KKtjSpzBe} zUVP#jh@BL)6ab(;<>t8!$@QAuPEAh>0D^e{02u=Sr`Hs69RLC#0I-Pw09ZBv(0k{# z>&jejfNV8Xm9FvHPT(C8*Ffg2X6gq3RDJ)PV9=}F{+hhuudbzhW0jl@xJScckGL*L zeWtFYVDM~iCqKxW<$L~ML|undaIlI;Z0L~PD`G3`<2Mcc zoF`;(hGi*M+7IEVjn&e_e5n_=Q28WW_g|<93mYZIyN-YToMyp(B*3XO7e~5exSu5- zP_U3V1Q6?I@5bKVSlEC}uUOW2xPEqEO+JYoFdF|$L7vFHJ65;)u2$s|&m)T`BM z-%uI%K~Q~jVZH;)D-Tp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