Some fixes
This commit is contained in:
		
							
								
								
									
										7
									
								
								main.py
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								main.py
									
									
									
									
									
								
							@@ -5,7 +5,8 @@ import numpy.random as gaussian_rnd
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
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():
 | 
			
		||||
@@ -33,7 +34,7 @@ def index():
 | 
			
		||||
    cols = data['cols']
 | 
			
		||||
    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')
 | 
			
		||||
@@ -42,7 +43,7 @@ def texindex():
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def main():
 | 
			
		||||
    app.run('192.168.51.3', 1488)
 | 
			
		||||
    app.run('thematdev.org', 1488)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
if __name__ == '__main__':
 | 
			
		||||
 
 | 
			
		||||
@@ -12,7 +12,7 @@
 | 
			
		||||
                <p> Тут можно подпись какую-то сделать </p>
 | 
			
		||||
                <p> Ваш IQ: {{ random_number }}</p>
 | 
			
		||||
                <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>
 | 
			
		||||
                    </button>
 | 
			
		||||
                    <button type="button">
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user