Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hard mode minus css framework #4

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@

## Hard Mode with the framework

calc_css.py is the app code and index.html is the html with the css framework.


# Web calculator

## Description
Expand Down
18 changes: 18 additions & 0 deletions calc_css.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from flask import Flask, url_for
from flask import render_template
from flask import request

app = Flask(__name__)

@app.route("/")
def index():
return render_template('index.html')

@app.route('/index',methods=['POST'])
def results():
return render_template("index.html",
calc=eval(request.form['op1']+ request.form['operator']+ request.form['op2'] ))


if __name__ == "__main__":
app.run(debug=True)
Loading