Skip to content
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
34 changes: 27 additions & 7 deletions app.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,32 @@
from flask import Flask, render_template
from __future__ import division
from flask import Flask #don't forget localhost:5000
from flask import render_template
app = Flask(__name__) #

app = Flask(__name__)
@app.route('/')
def index():
return render_template('bootDic.html', name = {'david': 68, 'monicas': 62, 'hector': 100})


@app.route('/', methods=['GET'])
def main():
return render_template('index.html')
# @app.route('/')
# def index():
# return render_template('bootDic.html', name = ["monica","david","hector"])

@app.route('/add/<int:num1>/<int:num2>')
def add(num1, num2):
return '{} + {} = {}'.format(num1, num2, float(num1 + num2))

if __name__ == '__main__':
app.run()
@app.route('/substract/<int:num1>/<int:num2>')
def substract(num1, num2):
return '{} - {} = {}'.format(num1, num2, float(num1 - num2))

@app.route('/divide/<int:num1>/<int:num2>')
def divide(num1, num2):
return '{} / {} = {}'.format(num1, num2, float(num1 / num2))

@app.route('/multiply/<int:num1>/<int:num2>')
def multiply(num1, num2):
return '{} x {} = {}'.format(num1, num2, float(num1 * num2))

if __name__ == "__main__":
app.run(debug=True)
Binary file added static/EDITED.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions templates/bootDic.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{% extends "meDic.html" %}
{% block content %}
<h1> hello boot</h1>
{%endblock%}
217 changes: 0 additions & 217 deletions templates/index.html

This file was deleted.

42 changes: 42 additions & 0 deletions templates/meDic.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<!DOCTYPE html>
<html>
<head>
<title> Me2 </title>
</head>
<style>
body{
background-color: #9bddff;
}
h1{
color: pink;

</style>
<body>

<h1> H E C T O R F O R E R O {{ name}} </h1>
<img src= "{{url_for('static', filename='EDITED.jpg')}}"/>

/* <img src='image/EDITED.jpg' height '5%' width'4%'> */
<div>
<ul>
{% for key, value in name.items() %}
{% if value < 65 %}
<strong>{{key}}</strong>
{% else %}
<i>{{key}}</i>
{% endif %}
{% endfor %}
</ul>
<div>

{% block content %}
{% endblock %}

<h1> I love this class </h1>
<p> The members of my team are David and Monica </p>
<form>
<label for = "pretty?"> pretty? </label>
<input type = "text" name = "name" id="name">
</form>
</body>
</html>