master
Aevann1 2021-12-21 16:47:38 +02:00
parent 2f9b6af3c1
commit f9f7d3c3f2
3 changed files with 4 additions and 4 deletions

View File

@ -8,7 +8,7 @@ services:
- "./:/service"
environment:
- DATABASE_URL=postgresql://postgres@postgres:5432
- MASTER_KEY=XuxGqp5NyygJrM24b5gt3YgyvFVGdQnwVDwLzLwpu3eQwY
- MASTER_KEY=3435tdfsdudebussylmaoxxt43
- DOMAIN=localhost
- SITE_NAME=Drama
- GIPHY_KEY=3435tdfsdudebussylmaoxxt43

2
env
View File

@ -1,5 +1,5 @@
export DATABASE_URL="postgresql://postgres@localhost:5432"
export MASTER_KEY="XuxGqp5NyygJrM24b5gt3YgyvFVGdQnwVDwLzLwpu3eQwY"
export MASTER_KEY="3435tdfsdudebussylmaoxxt43"
export DOMAIN="localhost"
export SITE_NAME="Drama"
export GIPHY_KEY="3435tdfsdudebussylmaoxxt43"

View File

@ -35,7 +35,7 @@ def feeds_user(sort='hot', t='all'):
for post in posts:
with tag("entry", ("xml:base", request.url)):
with tag("title", type="text"):
text(post.title)
text(post.realtitle(None))
with tag("id"):
text(post.fullname)
@ -61,6 +61,6 @@ def feeds_user(sort='hot', t='all'):
if len(post.body_html) > 0:
with tag("content", type="html"):
doc.cdata(f'''<img alt="{post.title}" loading="lazy" src={image_url}><br>{post.body_html}''')
doc.cdata(f'''<img alt="{post.realtitle(None)}" loading="lazy" src={image_url}><br>{post.body_html}''')
return Response( "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+ doc.getvalue(), mimetype="application/xml")