I defined a model that contains all the attributes stored in the MySQL table. Then I created two forms, one for the submission and another to get the details of the checkout time. In helpers.py file, there are two functions defined mainly, one to craete template and all necessary details for sending sms and another is to create template for sending mail to host. It also takes care of certain errors and exceptions. Then used HTML, Bootstrap for the frontend integrated with the backend.
- Flask
- Twilio API
- SMTP library for Mail services
- Mysql (For Database Purpose)
- Jinja2 (Templating Engine)
- Bootstrap
-
Clone this repository by
git clone https://github.com/pawangeek/Innovacer-Intern.git
-
Change directory by
cd Innovaccer-Intern
-
Install
python 3.7
on your local machine -
Install Mysql 5.5 Client on you machine
-
Create
Virtual Environment
and activate it -
Use
pip install -r requirements.txt
to install dependencies -
Create Account on twilio to get auth_id and token
-
Create a Phone number for machine based sms to mobile from twilio. Check them at
https://www.twilio.com/console/
-
Create database
myflaskapp
using mysql client bycreate database myflaskapp;
-
Create table
visitors2
afteruse myflaskapp;
and you able to create something like this
-
Set your mysql cresentials and an email+password for smtplib. After completion of all these steps you will see something like this
-
Start the sever fo to
http://127.0.0.1:5000/
and you will see something like this
-
Navigate to Register page and fill all necessary checkin details there
-
After filling Details under Register Section. Host will get mail and message regarding visitor's checkin like this
-
Further you can checkout from this software leaving deatials about host to visitor via mail and message
- Name: Pawan Kumar Jain
- Phone: +91 9079250835
- Email: pawanjain.432@gmail.com
- altEmail: 17ucs108@lnmiit.ac.in