The Goal of this project was the creation of a website that can display a dataset and log all actions to your database. This project uses Bootstrap to beautify the output.
sometimes pip3 and python3 is required instead of pip and python
- Change directory to App (Smart_steel)
- Install requirements in your environment
> cd /dir/to/Smart_steel_App
> pip install --user -r requirements.txt
Python should be installed
make sure that your file is called task_data.csv and is located in data folder data/task_data.csv. Your data should have the following headers in given order and written exact as given:
- id
- timestamp
- temperature
- duration
> python manage.py import_csv_to_db
You can change the input by changing the folowing files to your needs
- webapp/management/commands/import_csv_to_db.py
- webapp/admin.py
- webapp/models.py
- webapp/templates/webapp.html
> python manage.py makemigrations
> python manage.py migrate
> python manage.py runserver
- Go to your browser and insert in address bar
The final result should look like this:
- On navigation you will find
- Display table
- Admin button for admin area
-
Click on Display table
- display the database entries
-
Click on Admin
- Get to admin area, where one can CRUD the entries and display the logs
user: user_name
pw: Smart_steel1