Workout Diary APP made on Flask
Welcome! This is my first Flask project. It is a web application to scheduling yor workouts. I used modifided by me Mobiscroll Calendar with all CRUD functions. Enjoy!
- Registartion on the site
- Activtion code is sended via email, is valid 30 minutes
- Full password recovery by token
- Password changing
- Account delete
- CRUD Calendar (Create, Read, Update, Delete)
- Python3
- Flask
- Mobiscroll Calendar (https://demo.mobiscroll.com/eventcalendar/create-read-update-delete-CRUD) ( It is 10 days trial)
- Google ReCapatcha (https://www.google.com/recaptcha/about/)
- Gmail
Clone repository from GitHub or download it.
Install extra libraries from requirements.txt. Open your terminal in project folder and type:
pip install -r requirements.txt
Creating global database, open python console and type:
from app import db, app
db.create_all(app=app)
Start application:
Unix Bash (Linux, Mac):
$ export FLASK_DEBUG=1
$ export FLASK_APP=app
$ flask run
Windows CMD:
> set FLASK_DEBUG=1
> set FLASK_APP=app
> flask run
Windows PowerShell:
> $env:FLASK_DEBUG=1
> $env:FLASK_APP="app"
> flask run
FLASK_DEBUG=1 is not necessary. It allows to restart the server automatically after code changes.
I used ReCaptcha to prevent my site from bots. First you need to register your site on Google and get keys from them.
My program is able to send activations code on emails. First you need to create evironment variables to keep your data safe.
I recommend this Corey's video how to do that on Windows, Mac and Linux. (https://www.youtube.com/watch?v=IolxqkL7cD8)
In my code i created variables just like bellow. You can name it however you like, but you need to sure, that variables are named the same in python and your OS. Those variables are in constans.py file. If variables returns None, I recommend to restart computer after adding those variables.
Terms to registrate :
- Valid e-mail format
- E-mail not used
- Nick not used
- Strong password format
- Both passwords are the same
- ReCaptcha prove
If everything is fine, program sends email with verification code, which is activ 30 minutes.
You can log in with nick or email.
If you forgott a password, program can send you token to your email. It is 30 minutes valid:
Mail with token:
Token's link:
Mobiscroll calendar was modified by me for my purpopses. This is how it looks like:
And inputs fields:
These are just standart options like password changing and account deleting.
ENJOY!
Sebastian Szymański - sebastian.szymanski.t5@gmail.com