Landing page

* started to implement a landing page
* started news implementation
This commit is contained in:
mipel
2021-07-05 14:49:32 +02:00
parent f654826003
commit 7968d7d355
12 changed files with 213 additions and 75 deletions
+13
View File
@@ -11,6 +11,8 @@ from django.contrib.auth.models import User
from django.contrib.gis.db.models import MultiPolygonField
from django.db import models
from konova.enums import ServerMessageImportance
class BaseResource(models.Model):
"""
@@ -69,3 +71,14 @@ class Geometry(BaseResource):
"""
geom = MultiPolygonField(null=True, blank=True)
class ServerMessage(BaseResource):
"""
Holds messages, which can be displayed on the user's dashboard
"""
subject = models.CharField(max_length=500, null=False, blank=False)
body = models.TextField()
is_active = models.BooleanField(default=True)
publish_on = models.DateTimeField()
unpublish_on = models.DateTimeField()
importance = models.CharField(max_length=100, choices=ServerMessageImportance.as_choices(drop_empty_choice=True))