Purge taglist.json when tags are updated
authorMagnus Hagander <magnus@hagander.net>
Thu, 16 Jul 2020 13:29:41 +0000 (15:29 +0200)
committerMagnus Hagander <magnus@hagander.net>
Thu, 16 Jul 2020 13:29:41 +0000 (15:29 +0200)
Clearly forgotten back when tags were first added.

pgweb/news/models.py

index 79108396b3aace52d5837485f93584a26b0bccbe..c246621d01ad501c1ce5f8eaf22e989c83b75086 100644 (file)
@@ -11,6 +11,9 @@ class NewsTag(models.Model):
                                           help_text="Organisations allowed to use this tag")
     sortkey = models.IntegerField(null=False, blank=False, default=100)
 
+    def purge_urls(self):
+        yield '/about/news/taglist.json/'
+
     def __str__(self):
         return self.name