Skip to content

Commit

Permalink
Fix 18 rename metadata engine to template engine (#31)
Browse files Browse the repository at this point in the history
* rename self.content to self.body in content method

---------

Co-authored-by: Clément <[email protected]>
  • Loading branch information
ClmntBcqt and Clément authored Jul 8, 2024
1 parent 0748417 commit e13eb97
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jssg/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def content(self) -> str:


if "template_engine" in self.metadata.keys() and self.metadata["template_engine"] == "django" :
return Template(self.content).render(
return Template(self.body).render(
Context(
{
"posts": sorted(
Expand All @@ -101,7 +101,7 @@ def content(self) -> str:
)
)
else :
return engines["jinja2"].from_string(self.content).render(
return engines["jinja2"].from_string(self.body).render(
{
"posts": sorted(
Post.load_glob(), key=lambda p: p.timestamp, reverse=True
Expand Down

0 comments on commit e13eb97

Please sign in to comment.