added button to dupplicate a post

This commit is contained in:
2022-05-19 16:45:24 +02:00
parent 9c61a8e98b
commit f018b418c0
14 changed files with 59 additions and 19 deletions

View File

@@ -13,7 +13,7 @@ from sqlalchemy.orm import relationship
from webhelpers2.text import urlify #<- will generate slugs
from webhelpers2.date import distance_of_time_in_words #<- human friendly dates
import unidecode
class BlogRecord(Base):
__tablename__ = 'entries'
@@ -30,7 +30,9 @@ class BlogRecord(Base):
@property
def slug(self):
return urlify(self.title)
# remove ascents
title = unidecode.unidecode(self.title)
return urlify(title)
@property
def created_in_words(self):