]> git.0d.be Git - chloro.git/blobdiff - chloro/phyll/models.py
a11y: add lang attribute to <html>
[chloro.git] / chloro / phyll / models.py
index 1f9914b53ca154238a78c964276874cfa38a2006..3723f6b646303503e24e7dc6fbd8a552995e8860 100644 (file)
@@ -35,3 +35,8 @@ class Note(models.Model):
 
     def get_absolute_url(self):
         return '/%s/' % self.slug
+
+    def lang(self):
+        if self.tags.filter(name='lang-en').exists():
+            return 'en'
+        return 'fr'