Skip to content

Commit f29599a

Browse files
committed
Cleanup.
2 parents cf2a8cf + d833958 commit f29599a

File tree

18 files changed

+140
-86
lines changed

18 files changed

+140
-86
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 Hackers and Slackers
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Pipfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ verify_ssl = true
99
Flask = "*"
1010
Flask-WTF = "*"
1111
python-dotenv = "*"
12+
email_validator = "*"
1213

1314
[requires]
1415
python_version = "3.7"

Pipfile.lock

Lines changed: 23 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
![Flask-WTF Tutorial](https://res-1.cloudinary.com/hackers/image/upload/q_auto:best/v1/2019/11/flask-wtforms.jpg)
1212

13-
Source code for the accompanying tutorial found here: https://hackersandslackers.com/guide-to-building-forms-in-flask/
13+
Source code for the accompanying tutorial found here: https://hackersandslackers.com/flask-wtforms-forms/
1414

1515

1616
## Installation

application/routes.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
@app.route('/')
77
def home():
8-
return render_template('index.html',
8+
return render_template('index.jinja2',
99
template='home-template')
1010

1111

@@ -14,7 +14,7 @@ def contact():
1414
form = ContactForm()
1515
if form.validate_on_submit():
1616
return redirect(url_for('success'))
17-
return render_template('contact.html',
17+
return render_template('contact.jinja2',
1818
form=form,
1919
template='form-template')
2020

@@ -24,12 +24,12 @@ def signup():
2424
form = SignupForm()
2525
if form.validate_on_submit():
2626
return redirect(url_for('success'))
27-
return render_template('signup.html',
27+
return render_template('signup.jinja2',
2828
form=form,
2929
template='form-template')
3030

3131

3232
@app.route('/success', methods=('GET', 'POST'))
3333
def success():
34-
return render_template('success.html',
34+
return render_template('success.jinja2',
3535
template='success-template')
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<script type="text/javascript">
2+
var _gauges = _gauges || [];
3+
(function() {
4+
var t = document.createElement('script');
5+
t.type = 'text/javascript';
6+
t.async = true;
7+
t.id = 'gauges-tracker';
8+
t.setAttribute('data-site-id', '5eb6bab25292fb79acffe181');
9+
t.setAttribute('data-track-path', 'https://track.gaug.es/track.gif');
10+
t.src = 'https://d2fuc4clr7gvcn.cloudfront.net/track.js';
11+
var s = document.getElementsByTagName('script')[0];
12+
s.parentNode.insertBefore(t, s);
13+
})();
14+
</script>

application/templates/contact.html renamed to application/templates/contact.jinja2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% extends 'layout.html' %}
1+
{% extends 'layout.jinja2' %}
22

33
{% block styles %}
44
<link rel="stylesheet" href="{{ url_for('static', filename='css/forms.css') }}" rel="stylesheet" type="text/css">

application/templates/index.html renamed to application/templates/index.jinja2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% extends 'layout.html' %}
1+
{% extends 'layout.jinja2' %}
22

33
{% block styles %}
44
<link rel="stylesheet" href="{{ url_for('static', filename='css/home.css') }}" rel="stylesheet" type="text/css">

application/templates/layout.html

Lines changed: 0 additions & 19 deletions
This file was deleted.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<!DOCTYPE html>
2+
3+
<html lang="en">
4+
5+
<head>
6+
<meta charset="utf-8"/>
7+
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
8+
<title>{{ title }}</title>
9+
<meta name="HandheldFriendly" content="True"/>
10+
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover"/>
11+
<meta name="theme-color" content="#5eb9d7"/>
12+
<link rel="shortcut icon" href="{{ url_for('static', filename='dist/img/favicon.png') }}" type="image/x-icon"/>
13+
{% block styles %}{% endblock %}
14+
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}" rel="stylesheet" type="text/css">
15+
<script src="https://kit.fontawesome.com/e3deaeba31.js" crossorigin="anonymous"></script>
16+
<link href="https://fonts.googleapis.com/css?family=Poppins:200,300,500" rel="stylesheet">
17+
</head>
18+
19+
<body class="{{ template }}">
20+
<div class="container">
21+
{% block content %}{% endblock %}
22+
</div>
23+
{% include 'analytics.jinja2' %}
24+
</body>
25+
26+
</html>

0 commit comments

Comments
 (0)