Skip to content

Commit e344848

Browse files
author
App Generator
committed
Minor Improvements
1 parent e9523e7 commit e344848

File tree

3 files changed

+64
-58
lines changed

3 files changed

+64
-58
lines changed

README.md

Lines changed: 22 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Flask Material Kit
1+
# [Flask Material Kit](https://appseed.us/apps/flask-apps/flask-material-kit)
22

33
Open-Source **Flask** starter coded with basic modules, database, ORM, and deployment scripts on top of **Material Kit** (free version). For newcomers, Material Kit is a Free Bootstrap 4 UI Kit with a fresh, new design inspired by Google's material design. This simple Flask project can be used to code beautiful websites with a modern design.
44

@@ -18,9 +18,27 @@ Open-Source **Flask** starter coded with basic modules, database, ORM, and deplo
1818

1919
> Links
2020
21-
- [Flask Material Kit](https://appseed.us/boilerplate-code/flask-boilerplate) - product page
21+
- [Flask Material Kit](https://appseed.us/apps/flask-apps/flask-material-kit) - product page
2222
- [Flask Material Kit](https://flask-material-kit.appseed-srv1.com) - LIVE Demo
23-
- [Flask Material Kit](https://docs.appseed.us/products/flask-apps/material-kit) - product documentation
23+
24+
<br />
25+
26+
## Quick Start in [Docker](https://www.docker.com/)
27+
28+
> Get the code
29+
30+
```bash
31+
$ git clone https://github.com/app-generator/flask-material-kit.git
32+
$ cd flask-material-kit
33+
```
34+
35+
> Start the app in Docker
36+
37+
```bash
38+
$ docker-compose up --build
39+
```
40+
41+
Visit `http://localhost:85` in your browser. The app should be up & running.
2442

2543
<br />
2644

@@ -169,30 +187,6 @@ The generated file is saved in `static/assets/css` directory.
169187

170188
The app is provided with a basic configuration to be executed in [Docker](https://www.docker.com/), [Heroku](https://www.heroku.com/), [Gunicorn](https://gunicorn.org/), and [Waitress](https://docs.pylonsproject.org/projects/waitress/en/stable/).
171189

172-
<br />
173-
174-
### [Docker](https://www.docker.com/) execution
175-
---
176-
177-
The application can be easily executed in a docker container. The steps:
178-
179-
> Get the code
180-
181-
```bash
182-
$ git clone https://github.com/app-generator/flask-material-kit.git
183-
$ cd flask-material-kit
184-
```
185-
186-
> Start the app in Docker
187-
188-
```bash
189-
$ sudo docker-compose pull && sudo docker-compose build && sudo docker-compose up -d
190-
```
191-
192-
Visit `http://localhost:85` in your browser. The app should be up & running.
193-
194-
<br />
195-
196190
### [Heroku](https://www.heroku.com/)
197191
---
198192

@@ -279,4 +273,4 @@ Visit `http://localhost:8001` in your browser. The app should be up & running.
279273
<br />
280274

281275
---
282-
Flask Material Kit - Provided by **AppSeed** [App Generator](https://appseed.us/app-generator).
276+
[Flask Material Kit](https://appseed.us/apps/flask-apps/flask-material-kit) - Provided by **AppSeed** [App Generator](https://appseed.us/app-generator).

app/templates/accounts/register.html

Lines changed: 41 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -34,37 +34,49 @@ <h4 class="text-white font-weight-bolder text-center mt-2 mb-0">
3434
</div>
3535
</div>
3636
<div class="card-body">
37-
<form role="form" method="post" action="">
3837

39-
{{ form.hidden_tag() }}
38+
{% if not success %}
39+
40+
<form role="form" method="post" action="">
41+
42+
{{ form.hidden_tag() }}
43+
44+
<div class="input-group input-group-outline mb-3">
45+
<label class="form-label">Username</label>
46+
{{ form.username(class="form-control") }}
47+
</div>
48+
<div class="input-group input-group-outline mb-3">
49+
<label class="form-label">Email</label>
50+
{{ form.email(class="form-control", type="email") }}
51+
</div>
52+
<div class="input-group input-group-outline mb-3">
53+
<label class="form-label">Password</label>
54+
{{ form.password(class="form-control", type="password") }}
55+
</div>
56+
<div class="form-check form-check-info text-start ps-0">
57+
<input class="form-check-input" type="checkbox" value="" id="flexCheckDefault" checked>
58+
<label class="form-check-label" for="flexCheckDefault">
59+
I agree the <a href="javascript:;" class="text-dark font-weight-bolder">Terms and Conditions</a>
60+
</label>
61+
</div>
62+
<div class="text-center">
63+
<button type="submit" name="register"
64+
class="btn btn-lg bg-gradient-primary btn-lg w-100 mt-4 mb-0">Sign Up</button>
65+
</div>
66+
<p class="mt-4 text-sm text-center">
67+
Already have an account?
68+
<a href="{{ url_for('login') }}" class="text-primary text-gradient font-weight-bold">Sign IN</a>
69+
</p>
70+
</form>
71+
72+
{% else %}
73+
74+
<p class="mt-4 text-sm text-center">
75+
<a href="{{ url_for('login') }}" class="text-primary text-gradient font-weight-bold">Sign IN</a>
76+
</p>
77+
78+
{% endif %}
4079

41-
<div class="input-group input-group-outline mb-3">
42-
<label class="form-label">Username</label>
43-
{{ form.username(class="form-control") }}
44-
</div>
45-
<div class="input-group input-group-outline mb-3">
46-
<label class="form-label">Email</label>
47-
{{ form.email(class="form-control", type="email") }}
48-
</div>
49-
<div class="input-group input-group-outline mb-3">
50-
<label class="form-label">Password</label>
51-
{{ form.password(class="form-control", type="password") }}
52-
</div>
53-
<div class="form-check form-check-info text-start ps-0">
54-
<input class="form-check-input" type="checkbox" value="" id="flexCheckDefault" checked>
55-
<label class="form-check-label" for="flexCheckDefault">
56-
I agree the <a href="javascript:;" class="text-dark font-weight-bolder">Terms and Conditions</a>
57-
</label>
58-
</div>
59-
<div class="text-center">
60-
<button type="submit" name="register"
61-
class="btn btn-lg bg-gradient-primary btn-lg w-100 mt-4 mb-0">Sign Up</button>
62-
</div>
63-
<p class="mt-4 text-sm text-center">
64-
Already have an account?
65-
<a href="{{ url_for('login') }}" class="text-primary text-gradient font-weight-bold">Sign IN</a>
66-
</p>
67-
</form>
6880
</div>
6981
</div>
7082
</div>

app/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def register():
6767

6868
user.save()
6969

70-
msg = 'User created, please <a href="' + url_for('login') + '">login</a>'
70+
msg = 'User created, please login'
7171
success = True
7272

7373
else:

0 commit comments

Comments
 (0)