Skip to content

Commit d6eafb3

Browse files
committed
site-python
1 parent 89aeff5 commit d6eafb3

File tree

11 files changed

+114
-0
lines changed

11 files changed

+114
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
desktop.ini

proyectos/site-python/Procfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
web: gunicorn index:app

proyectos/site-python/index.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
from flask import Flask, render_template
2+
3+
app = Flask(__name__)
4+
5+
# Creating simple Routes
6+
@app.route('/test')
7+
def test():
8+
return "Home Page"
9+
10+
@app.route('/test/about/')
11+
def about_test():
12+
return "About Page"
13+
14+
# Routes to Render Something
15+
@app.route('/')
16+
def home():
17+
return render_template("home.html")
18+
19+
@app.route('/about', strict_slashes=False)
20+
def about():
21+
return render_template("about.html")
22+
23+
# Make sure this we are executing this file
24+
if __name__ == '__main__':
25+
app.run(debug=True)

proyectos/site-python/readme.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Website Python
2+
3+
* Backend Python-Flask
4+
5+
[Code](./index.py)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Click==7.0
2+
Flask==1.0.2
3+
gunicorn==19.9.0
4+
itsdangerous==1.1.0
5+
Jinja2==2.10
6+
MarkupSafe==1.1.0
7+
Werkzeug==0.14.1

proyectos/site-python/runtime.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
python-3.9.0
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
body {
2+
background: #000;
3+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
console.log('Hello World');
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!DOCTYPE html>
2+
{% extends "layout.html" %}
3+
4+
{% block title %}About{% endblock %}
5+
6+
{% block content %}
7+
8+
<div class="jumbotron">
9+
<h1 class="display-4">About</h1>
10+
<p class="lead">This is a simple site | zzJust_Mezz</p>
11+
<hr class="my-4">
12+
<p>click here</p>
13+
<a class="btn btn-primary btn-lg" href="#" role="button">Learn more</a>
14+
</div>
15+
16+
{% endblock%}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{% extends "layout.html" %}
2+
3+
{% block title %}Home{% endblock %}
4+
5+
{% block content %}
6+
7+
<div class="jumbotron">
8+
<h1 class="display-4">Hello, world!!</h1>
9+
<p class="lead">This is a simple site | zzJust_Mezz</p>
10+
<hr class="my-4">
11+
<p>click here</p>
12+
<a class="btn btn-primary btn-lg" href="#" role="button">Learn more</a>
13+
</div>
14+
15+
{% endblock%}

0 commit comments

Comments
 (0)