Commit 91dcc369 authored by David Haynes's avatar David Haynes 🙆

Merge branch '78-alert-overhaul' into '2.2-dev'

Resolve "Alerts should have subjects and bodies and URL's"

Closes #78 and #75

See merge request !48
parents ea24b5f4 e09d69ef
Pipeline #3722 passed with stage
in 1 minute and 4 seconds
version: "3"
services:
db:
image: mysql:5.7
......
......@@ -508,7 +508,9 @@ class Alert(TimeStampedModel):
)
# The text that is displayed that describes the Alert
message = models.CharField(max_length=140)
subject = models.CharField(max_length=130)
body = models.TextField()
url = models.URLField(max_length=200)
# The date + time that the alert will be start being served
start_datetime = models.DateTimeField()
......@@ -528,4 +530,5 @@ class Alert(TimeStampedModel):
"""
String representation of an Alert object.
"""
return "%s" % (self.message)
return "{0} \n {1} \n {3}".format(self.subject, self.body, self.url)
# Returns the subject, body, and url fields
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment