]> git.parisson.com Git - pdfannotator.git/commitdiff
rename tags
authorGuillaume Pellerin <guillaume.pellerin@parisson.com>
Wed, 2 Jul 2025 14:12:27 +0000 (16:12 +0200)
committerGuillaume Pellerin <guillaume.pellerin@parisson.com>
Wed, 2 Jul 2025 14:12:27 +0000 (16:12 +0200)
pdfannotator/templates/pdfannotator/pdfannotator.html
pdfannotator/templatetags/pdfannotator.py [deleted file]
pdfannotator/templatetags/pdfannotator_tags.py [new file with mode: 0644]

index 1dac1727121f13286f8b2c98384079829c4d14f5..c1e8b6cfd3a115cb95f1010820f962e22749e531 100644 (file)
@@ -1,5 +1,5 @@
 {% load static %}
-{% load pdfannotator %}
+{% load pdfannotator_tags %}
 
 <div class="toolbar">
     {% if not readonly %}
diff --git a/pdfannotator/templatetags/pdfannotator.py b/pdfannotator/templatetags/pdfannotator.py
deleted file mode 100644 (file)
index bf40662..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-from django import template
-
-register = template.Library()
-
-@register.inclusion_tag('pdfannotator/pdfannotator.html', takes_context=True)
-def pdfannotator(context, url, uuid):
-    request = context['request']
-    user = request.user
-    readonly = True
-    if user.professor.all() or user.is_superuser or user.quotas.all():
-        readonly = False   
-    return {
-        'url':url,
-        'uuid': uuid,
-        'username':user.username,
-        'is_admin':user.is_superuser,
-        'readonly':readonly
-    }
diff --git a/pdfannotator/templatetags/pdfannotator_tags.py b/pdfannotator/templatetags/pdfannotator_tags.py
new file mode 100644 (file)
index 0000000..bf40662
--- /dev/null
@@ -0,0 +1,18 @@
+from django import template
+
+register = template.Library()
+
+@register.inclusion_tag('pdfannotator/pdfannotator.html', takes_context=True)
+def pdfannotator(context, url, uuid):
+    request = context['request']
+    user = request.user
+    readonly = True
+    if user.professor.all() or user.is_superuser or user.quotas.all():
+        readonly = False   
+    return {
+        'url':url,
+        'uuid': uuid,
+        'username':user.username,
+        'is_admin':user.is_superuser,
+        'readonly':readonly
+    }