adds route to recieve registrations status icon
This commit is contained in:
parent
55116c3aab
commit
e9710af05b
@ -597,7 +597,14 @@ def register():
|
|||||||
return redirect(url_for('login'))
|
return redirect(url_for('login'))
|
||||||
|
|
||||||
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
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
BIN
app/static/img/open.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.7 KiB |
Reference in New Issue
Block a user