Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hydr0nium/waste_watcher_webserver
https://github.com/hydr0nium/waste_watcher_webserver
arduino bootstrap django python
Last synced: 6 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/hydr0nium/waste_watcher_webserver
- Owner: hydr0nium
- Created: 2024-05-20T10:22:14.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-07-10T14:47:29.000Z (4 months ago)
- Last Synced: 2024-07-11T13:12:29.497Z (4 months ago)
- Topics: arduino, bootstrap, django, python
- Language: Python
- Homepage:
- Size: 102 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Waste watcher
All of the server is located in the `watch_watcher` folder. The respective main files for the server are found in the subfolder with the same name. HTML and CSS files can be found in the `templates` and `static` folder respectively. The main functionality is found in the `views.py` file. `urls.py` implements the routes that can be accessed by the webbrowser and linkes them to the `views.py`. `models.py` contains the blueprints for the models that are used as database tables. The source code of the microcontroller can be found in the `src_microcontroller`.
To start the server run: `python manage.py runserver` or `python manage.py runserver 0.0.0.0:8000` for running it on all interfaces (You might need to install django via pip `pip install django`)
Also if the server doesn't work try running `python manage.py makemigrations` and `python manage.py migrate`
# Testing
You can access a control panel at `/api/controls`. The access on the webserver is managed through Caddy and thus not part of this repo.
# Githooks
To use the githooks to run tests before push please use this command:
`git config core.hooksPath .githooks/windows` for Windows
`git config core.hooksPath .githooks/linux` for linux
# Dependencies:
`pip install -r requirements.txt`
If you are running the server locally then push notifications only work on chromium based browsers and need to be added under chrome://flags and "Insecure origins treated as secure" needs to be enabled.