The dashboard allows operators to manage all of their data related to qualicharge.
The qualicharge dashboard is available from the url: http://localhost:8030.
./bin/manage <your_command>
Bootstrap dashboard project:
make bootstrap-dashboard
make run-dashboard
Perform a Django migration (manage.py migrate):
make migrate-dashboard-db
Create superuser:
You can connect with username: admin / password: admin. (The credentials are defined in env.d/dashboard.)
make create-dashboard-superuser
Display dashboard logs:
make logs-dashboard
Reset dashboard db:
make drop-dashboard-db
make reset-dashboard-db
For each Django application, the application config label
(present in my_apps.apps.MyAppConfig) must be of type qcd_myapp
.
i.e. for the home
app:
class HomeConfig(AppConfig):
"""Home app config."""
default_auto_field = "django.db.models.BigAutoField"
name = "apps.home"
label = "qcd_home" # prefix app name with 'qcd_'
There is a signal on the creation of a delivery point
(apps.core.models.DeliveryPoint
).
This signal allows the creation of a consent
(apps.consent.models.Consent
)
corresponding to the delivery_point
.
3 different status types exist for consents with different management rules:
Consent awaiting validation by the user.
- Users can change consent without restriction.
Consent validated by the user.
It can only be modified under conditions:
- users cannot modify validated consents,
- administrators can change a validated consent to
REVOKED
, - the updated values are restricted to the
status
,revoked_date
andupdated_at
fields, - validated consent cannot be deleted.
Consent revoked.
- It cannot be modified.
- It cannot be deleted.
This work is released under the MIT License (see LICENSE).