From 97a9c7951a2fce702d9c0ebc961747d7c320aa64 Mon Sep 17 00:00:00 2001 From: j Date: Fri, 19 Nov 2021 15:39:44 +0100 Subject: [PATCH] more youtube fixes --- app/event/models.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/event/models.py b/app/event/models.py index 83397f4..09de647 100644 --- a/app/event/models.py +++ b/app/event/models.py @@ -21,7 +21,6 @@ class Event(models.Model): media = models.TextField(blank=True, null=True) media_caption = models.TextField(blank=True, null=True, default='') - data = models.JSONField(default=dict, blank=True, editable=False) def __str__(self): @@ -39,7 +38,7 @@ class Event(models.Model): else: url = self.media if 'youtube.com/watch' in url: - url = url.replace('/watch', '/embed') + url = url.replace('/watch?=v', '/embed/') html += '' % url if self.media_caption: html = '
%s
%s
' % (html, self.media_caption)