Giter Site home page Giter Site logo

sid86-dev / flask-tutorial Goto Github PK

View Code? Open in Web Editor NEW
12.0 12.0 9.0 400 KB

A complete beginner friendly Python Flask tutorial ๐Ÿ. Learn from basic template rendering to deploying in web servers.

Home Page: https://dev.to/sid86dev/a-complete-beginner-friendly-python-flask-tutorial-learn-from-basic-template-rendering-to-deploying-in-web-servers-5ack

License: MIT License

Python 55.34% HTML 38.42% CSS 4.80% Shell 1.44%
flask flask-application interview jinja2 programming python pythonflask webapp webdevelopment

flask-tutorial's People

Contributors

abinashahir avatar anonymous999-dev avatar apoorvthedude avatar khushi0298 avatar poojahukkire avatar sid86-dev avatar sskkyadav avatar tithigupta25 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

flask-tutorial's Issues

Typos

@Khushi0298 in calculator app.py line 15 and 17, check data spelling

from flask import Flask,render_template,request

app=Flask(__name__)

@app.route('/',methods=['GET','POST'])
def index():
    if request.method == "POST":  
        option  = request.form.get('option')
        num1  = request.form.get('num1')
        num2  = request.form.get('num2')

        if option == "Addition":
            data = num1 + num2
        elif option == "subtraction":
            datd = num1 - num2
        elif option == "Division":
            datd = num1 / num2
        elif option == "Multiplication":
            data = num1 * num2
        return render_template('result.html', data=data)
    return render_template('index.html')

Url variable passing

@app.route("/<username>")
def index(username):
    name=f"Hello I am {username}"
    return f"output is {name}" 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.