diff --git a/profiles/models.py b/profiles/models.py index 535c7c9..11c0dc5 100644 --- a/profiles/models.py +++ b/profiles/models.py @@ -41,6 +41,29 @@ class Website(models.Model): return self.name +class Place(models.Model): + ''' A real-life place ''' + + name = models.CharField(max_length=256) + address = models.CharField(max_length=512) + lat = models.FloatField('Latitude', blank=True) + lon = models.FloatField('Longitude', blank=True) + + def __str__(self): + return self.name + + +class Event(models.Model): + ''' A real-life event (protests, meeting, ...) ''' + + name = models.CharField(max_length=256) + date = models.DateTimeField() + place = models.ForeignKey(Place, on_delete=models.CASCADE) + + def __str__(self): + return self.name + + class BrowserFingerprint(models.Model): ''' A browser fingerprint, containing things like a user agent '''