Skip to content

Commit

Permalink
✨ add settings as a global variable for templates
Browse files Browse the repository at this point in the history
  • Loading branch information
YousefEZ committed Sep 8, 2024
1 parent bfb1440 commit b902df0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions view/cogs/custom_jinja2.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from jinja2 import FileSystemLoader, ChainableUndefined
from jinja2.environment import Environment

from host import gameplay_settings
from host.base_types import render_currency, render_currency_rate, render_date


Expand All @@ -10,3 +11,4 @@
ENVIRONMENT.filters["currency"] = render_currency
ENVIRONMENT.filters["currency_rate"] = render_currency_rate
ENVIRONMENT.filters["date"] = render_date
ENVIRONMENT.globals["settings"] = gameplay_settings.GameplaySettings

0 comments on commit b902df0

Please sign in to comment.