From 71b40842ddf9c72d34921cae0c294bcc9f0c4672 Mon Sep 17 00:00:00 2001 From: Akarys42 Date: Sat, 19 Oct 2019 12:38:18 +0200 Subject: Add a jump-url field in the reminder model --- pydis_site/apps/api/models/bot/reminder.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'pydis_site/apps/api/models') diff --git a/pydis_site/apps/api/models/bot/reminder.py b/pydis_site/apps/api/models/bot/reminder.py index decc9391..026d3a3a 100644 --- a/pydis_site/apps/api/models/bot/reminder.py +++ b/pydis_site/apps/api/models/bot/reminder.py @@ -15,6 +15,11 @@ class Reminder(ModelReprMixin, models.Model): "If not, it has been sent out to the user." ) ) + jump_url = models.CharField( + help_text=( + "The jump url to the message that created the reminder" + ) + ) author = models.ForeignKey( User, on_delete=models.CASCADE, -- cgit v1.2.3 From 2d20f4ab8d3202e668e3e78c4bb6e8b6703ef5f9 Mon Sep 17 00:00:00 2001 From: Akarys42 Date: Sat, 19 Oct 2019 13:22:27 +0200 Subject: Add max_lengh for reminder.jump_url --- pydis_site/apps/api/models/bot/reminder.py | 1 + 1 file changed, 1 insertion(+) (limited to 'pydis_site/apps/api/models') diff --git a/pydis_site/apps/api/models/bot/reminder.py b/pydis_site/apps/api/models/bot/reminder.py index 026d3a3a..3b174252 100644 --- a/pydis_site/apps/api/models/bot/reminder.py +++ b/pydis_site/apps/api/models/bot/reminder.py @@ -16,6 +16,7 @@ class Reminder(ModelReprMixin, models.Model): ) ) jump_url = models.CharField( + max_length=88, help_text=( "The jump url to the message that created the reminder" ) -- cgit v1.2.3 From 8ea0a1dc088d1ff0b5cfc2c79d01d4559580bf9a Mon Sep 17 00:00:00 2001 From: Akarys42 Date: Mon, 21 Oct 2019 16:42:23 +0200 Subject: Change reminder.jump_url field to URLField This make sure that the data receivied is valid --- pydis_site/apps/api/models/bot/reminder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pydis_site/apps/api/models') diff --git a/pydis_site/apps/api/models/bot/reminder.py b/pydis_site/apps/api/models/bot/reminder.py index 3b174252..d53fedb5 100644 --- a/pydis_site/apps/api/models/bot/reminder.py +++ b/pydis_site/apps/api/models/bot/reminder.py @@ -15,7 +15,7 @@ class Reminder(ModelReprMixin, models.Model): "If not, it has been sent out to the user." ) ) - jump_url = models.CharField( + jump_url = models.URLField( max_length=88, help_text=( "The jump url to the message that created the reminder" -- cgit v1.2.3