commit 8322c1d13ae3d86227b5690249042d4a87c66b10
parent 2e7d41db686c0480d0b735d14ed33cf5f2182f68
Author: Friedel Schön <[email protected]>
Date: Thu, 19 May 2022 11:35:23 +0200
edited readme + add location
Diffstat:
4 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/add-user.py b/add-user.py
@@ -15,6 +15,8 @@ address = 'Kerklaan 69\n9876XY Groningen'
hashed_password = bcrypt.generate_password_hash('hallo').decode('utf-8')
+db.create_all()
+
for typ, name, email in users:
phone = '06-' + str(randint(10000000, 99999999))
user = User(
diff --git a/readme.md b/readme.md
@@ -16,7 +16,23 @@ $ git clone https://github.com/friedelschoen/muizenval.tk/
$ pip3 install flask wtforms flask_sqlalchemy flask-wtf email_validator flask-bcrypt flask-login pillow flask_socketio simple-websocket
```
+**Is de database leeg? Test-gebruikers toevoegen:**
+```
+$ python3 add-user.py
+```
+
+Volgende gebuikers worden toegevoegd:
+| E-Mail | Wachtwoord | Rechten |
+| ------------------ | ---------- | ------- |
+| [email protected] | `hallo` | cliënt ||
+| [email protected] | `hallo` | admin |
+
**De server runnen:**
```
-$ python run-server.py
+$ python3 run-server.py
+```
+
+**Geen muizenval bij de hand? Interactieve test-muizenval proberen:**
```
+$ python3 test-client.py
+```
+\ No newline at end of file
diff --git a/server/models.py b/server/models.py
@@ -36,6 +36,8 @@ class Trap(db.Model):
caught = db.Column(db.Boolean, nullable=False, default=False)
owner = db.Column(db.Integer, db.ForeignKey('user.id'))
connect_expired = db.Column(db.DateTime)
+ location_lat = db.Column(db.Float)
+ location_lon = db.Column(db.Float)
def pretty_mac(self):
upper = self.mac.upper()
diff --git a/server/site.db b/server/site.db
Binary files differ.