Skip to content

Instantly share code, notes, and snippets.

@yarogniew

yarogniew/run.py Secret

Last active October 25, 2022 16:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yarogniew/08e09415df7a7d31f4dc9fb9f6b4a1ed to your computer and use it in GitHub Desktop.
Save yarogniew/08e09415df7a7d31f4dc9fb9f6b4a1ed to your computer and use it in GitHub Desktop.
prosta strona zbudowana w oparciu o flask do projektu-flask-test
# https://www.youtube.com/watch?v=Js1oQoyLeig
from flask import Flask, render_template
app = Flask(__name__)
print (__name__)
# @app.route('/')
# def main():
# return 'Witaj Świecie!'
@app.route('/')
def home():
return render_template('index.html', zmienna='https://arduino.net.pl')
@app.route('/innastrona')
def innastrona():
return 'Witaj na nowej stronie!'
@app.route('/klient/<numer>')
def klient(numer):
print(f'Przekazano numer klienta: {numer}')
return f'Przekazano numer klienta: {numer}'
@app.route('/dodaj/<numer1>+<numer2>')
def dodaj(numer1,numer2):
wynik = int(numer1) + int(numer2)
return f'Wynik: {wynik}'
if __name__ == '__main__':
app.run(debug=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment