Some fixes

This commit is contained in:
thematdev 2021-01-12 21:16:56 +03:00
parent d10580a0ee
commit 12dbf836bd
2 changed files with 5 additions and 4 deletions

View File

@ -5,7 +5,8 @@ import numpy.random as gaussian_rnd
app = Flask(__name__, subdomain_matching=True) app = Flask(__name__, subdomain_matching=True)
app.config['SERVER_NAME'] = '192.168.51.3:1488' app.config['SERVER_NAME'] = 'thematdev.org:1488'
SOCKET = 'thematdev.org:1488'
def generate_iq(): def generate_iq():
@ -33,7 +34,7 @@ def index():
cols = data['cols'] cols = data['cols']
projects = data['projects'] projects = data['projects']
return render_template('index.html', random_number=generate_iq(), projects=projects) return render_template('index.html', random_number=generate_iq(), projects=projects, texlink=f"tex.{SOCKET}")
@app.route('/', subdomain='tex') @app.route('/', subdomain='tex')
@ -42,7 +43,7 @@ def texindex():
def main(): def main():
app.run('192.168.51.3', 1488) app.run('thematdev.org', 1488)
if __name__ == '__main__': if __name__ == '__main__':

View File

@ -12,7 +12,7 @@
<p> Тут можно подпись какую-то сделать </p> <p> Тут можно подпись какую-то сделать </p>
<p> Ваш IQ: {{ random_number }}</p> <p> Ваш IQ: {{ random_number }}</p>
<div class="btn-container"> <div class="btn-container">
<button onclick="location.href='http://tex.thematdev.local:22837'" type="button" class="btn-tex"> <button onclick="location.href='http://{{texlink}}'" type="button" class="btn-tex">
<p> TeX </p> <p> TeX </p>
</button> </button>
<button type="button"> <button type="button">