feat: format posts in markdown

This commit is contained in:
2025-07-20 07:58:36 +02:00
parent e1f0014898
commit 84acc3c76e
2 changed files with 11 additions and 1 deletions

View File

@@ -0,0 +1,8 @@
### {{ adoption_notice.name }}
📍 {{ adoption_notice.location }}
{{ adoption_notice.description }}
{{ adoption_notice.get_full_url}}

View File

@@ -1,5 +1,6 @@
import logging
import requests
from django.template.loader import render_to_string
from fellchensammlung.models import SocialMediaPost, PlatformChoices
from notfellchen import settings
@@ -81,7 +82,8 @@ class FediClient:
def post_an_to_fedi(adoption_notice):
client = FediClient(settings.fediverse_access_token, settings.fediverse_api_base_url)
status_text = adoption_notice.name
context = {"adoption_notice": adoption_notice}
status_text = render_to_string("fellchensammlung/misc/fediverse/an-post.md", context)
images = adoption_notice.get_photos()
if images is not None: