This is a Django app that alerts parents when their kids are provided with non-food items. It also keeps track of the items provided whether they are food or non-food items. Here admin can login on admin site and can add a kid and an image.
- DRF: A powerful and flexible toolkit for building Rest APIs with Django
- Database used: SQLite (for development)
- Deployed on Heroku
-
If you wish to run your own build, first ensure you have python3 globally installed in your computer. If not, you can get python here.
-
Download pip and add it to the path
-
Clone the repository
-
Using HTTPS
git clone https://github.com/Pratyush1606/food-classification.git
-
Using SSH
git clone git@github.com:Pratyush1606/food-classification.git
-
-
Change your working directory to the cloned folder
food-classification
cd path/to/food-classification
-
Create a new virtual environment inside
food-classification
directory and activate thatpython -m venv env
NOTE
By default, this will not include any of your existing site packages.For activating or deactivating virtual env, take this for reference.
-
Download all the dependencies
pip install -r requirements.txt
Use
pip3
ifpip
not working -
Make a
.env
file in this directory only and put the followingDJANGO_SECRET_KEY = django-insecure-3a65@ycam887r2c69p=3st-_#s8k26t(-*h8@4ic_f1qo1*ow6 DJANGO_DEBUG = True
-
While putting
DEBUG = False
, remember to modifyALLOWED_HOSTS
(for just quick reference, modify asALLOWED_HOSTS = ['*']
) -
For generating a Django SECRET_KEY, many different sites are there. This site can be used for quick reference.
-
-
For SMTP Server to work, make a gmail id and put the following in the
.env
fileSMTP_EMAIL = <GMAIL created above> SMTP_PASSWORD = <Password>
Make sure to turn on Less secure app access in the settings.
food-classification
├── food_classification
| ├── __init__.py
| ├── settings.py
| ├── asgi.py
| ├── wsgi.py
| └── urls.py
├── food_image_app
├── .env
├── .gitignore
├── manage.py
├── Procfile
├── README.md
└── requirements.txt
-
Migrate to the database
python manage.py makemigrations python manage.py migrate
Use
python3
ifpython
not workingAfter this, you would see a new file named
db.sqlite3
in your parent folder -
Run server
python manage.py runserver