The main idea for this project was that each user can maintain his diet diary so as to analyze his/her diet. On the main page via an API all the food items that are present on the company's website will be displayed as shown below:
On clicking the “Admin Login” button, admin_page() function is called and it renders the admin_login.html file; redirects to Admin Login page.
On clicking the “Login” button, admin_login() function is called. If the Admin Id or Password is wrong, an error message is shown: “Invalid Admin or Password”; if the data is correct, it renders the fm_table.html file.
After successful login to admin page, the food master table appears which contains data fetched from MySQL central database.
When “Add New Food” is clicked on Food Master Table, this webpage is shown. Several input fields are shown.
When “Add New CSV File” is clicked on Food Master Table, this webpage is shown. Several input fields are shown.
When “Edit” is clicked on Food Master Table, this webpage is shown by rendering update_form.html. Several input fields are shown. All the fields which are allowed to modify can be modified from here.
Redirects to the User Food Log Charts. The webpage has date inputs which shows calories consumption from dates recorded in database.
Userfoodlogchart() accepts input from “Select From Date”, “Select To Date” and “Select Meal Type”; when “Submit” button is pressed, a line graph is shown representing the calories consumption between the selected date range and selected meal type. Comparison with average calorie consumption for men and women is also shown.
Redirects to the Consume Comparison page. This page shows 2 analysis graphs. First graph is a pie-chart which shows distribution of quantities of nutrients consumed in present day. Second graph is a line chart which shows various line graphs.
When Purchase Comparison is clicked, it calls the purchaseComparison() function which renders the purchaseComparison.html file and redirects to Purchase Comparison page. This page has 3 graphs:
- Pie-chart that shows nutrient wise distribution of food items purchased today.
- Pie-chart that shows nutrient based distribution of food items purchased in last 7 recorded days.
- A bar graph that shows comparison b/w User Intake, Overall Intake and Average Intake of nutrients for that particular day.
On filling the above fields. And clicking the Submit button, function Adds individual food to Pan-care
On clicking the Submit button, function batch uploads food to Pan-care
Redirects to a form to add food to purchase table.
Redirects to a form to update food items in purchase table,
-- Created the Admin Control for the project. Created various fully functional web interfaces that perform CRUD operations on connected databases. Created comparative charts using Google Charts API that draws date-wise comparison between the nutrition intake of user and with other users. Tech Used: Python, Django, HTML, CSS, Javascript, MySQL