diff --git a/royalnet/database/tables/wikipages.py b/royalnet/database/tables/wikipages.py index 914a59b8..0ea21aea 100644 --- a/royalnet/database/tables/wikipages.py +++ b/royalnet/database/tables/wikipages.py @@ -3,6 +3,7 @@ from sqlalchemy import Column, \ String from sqlalchemy.dialects.postgresql import UUID from sqlalchemy.ext.declarative import declared_attr +from royalnet.web.shortcuts import to_urluuid class WikiPage: @@ -31,3 +32,7 @@ class WikiPage: @declared_attr def css(self): return Column(String) + + @property + def page_short_id(self): + return to_urluuid(self.page_id) diff --git a/royalnet/web/royalprints/wikiview/templates/wikiview_index.html b/royalnet/web/royalprints/wikiview/templates/wikiview_index.html index 84a2bcb0..fe8a9969 100644 --- a/royalnet/web/royalprints/wikiview/templates/wikiview_index.html +++ b/royalnet/web/royalprints/wikiview/templates/wikiview_index.html @@ -19,7 +19,7 @@ {% endif %}