]> git.parisson.com Git - pdfannotator.git/commitdiff
re-add tag master
authorGuillaume Pellerin <guillaume.pellerin@parisson.com>
Wed, 2 Jul 2025 14:16:42 +0000 (16:16 +0200)
committerGuillaume Pellerin <guillaume.pellerin@parisson.com>
Wed, 2 Jul 2025 14:17:19 +0000 (16:17 +0200)
pdfannotator/templatetags/pdfannotator_tags.py

index bf40662879a15aaf4cca1e3aea3a8e6aaadb68b4..eba8397bcc1cf2cd4d179a1ffe96ceb17be36662 100644 (file)
@@ -16,3 +16,15 @@ def pdfannotator(context, url, uuid):
         'is_admin':user.is_superuser,
         'readonly':readonly
     }
         'is_admin':user.is_superuser,
         'readonly':readonly
     }
+
+
+class PDFAnnotatorVersionNode(template.Node):
+    def render(self, context):
+        from pdfannotator import __version__
+        return __version__
+
+
+@register.tag
+def pdfannotator_version(parser, token):
+    "Get PDFAnnotator version number"
+    return PDFAnnotatorVersionNode()
\ No newline at end of file