opendata-stuttgart / feinstaub-api

Django project to store sensor pushed via REST api
62 stars 28 forks source link

Neue Datenbank-Felder #7

Closed the-infinity closed 7 years ago

the-infinity commented 7 years ago

V.a. die E-Mail ist wichtig, wenn es darum geht, die Nutzer der Sensoren zu informieren und ein Loginsystem aufzubauen.

michael-k commented 7 years ago

The User model (owner) already has an email field.

Database migrations are missing.

the-infinity commented 7 years ago

User is not really used at the moment, better said: User is used somehow as as a Group at the moment. So this was a pragmatic way to get a node-mailaddress relationship (instead of writing e-mail, address and much more in description).

And I did not provide an migration because I make an external application for managing some values. I don't want to destroy anything your system, so I left this up to you.

ricki-z commented 7 years ago

The email field in the user model is for the django users. The email field in the node model is the owner of the node. We need this to inform sensor owners about problems with their node.

You can create the missing migrations with '../bin/python ./manage.py makemigrations' in directory feinstaub. Changes to database will be done with '../bin/python ./manage.py migrate'