News app
* adds news app for future implementations
This commit is contained in:
16
news/models.py
Normal file
16
news/models.py
Normal file
@@ -0,0 +1,16 @@
|
||||
from django.db import models
|
||||
|
||||
from konova.enums import ServerMessageImportance
|
||||
from konova.models import BaseResource
|
||||
|
||||
|
||||
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))
|
||||
Reference in New Issue
Block a user