adds route to recieve registrations status icon

This commit is contained in:
pluja 2020-09-26 15:01:12 +02:00
parent 55116c3aab
commit e9710af05b
3 changed files with 8 additions and 1 deletions

View File

@ -598,6 +598,13 @@ def register():
return render_template('register.html', title='Register', registrations=REGISTRATIONS, form=form, config=config) 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/<errno>') @app.route('/error/<errno>')
def error(errno): def error(errno):

BIN
app/static/img/close.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
app/static/img/open.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB