create event
This commit is contained in:
10
app/bot/dialogs/templates/__init__.py
Normal file
10
app/bot/dialogs/templates/__init__.py
Normal file
@@ -0,0 +1,10 @@
|
||||
from pathlib import Path
|
||||
path = Path(__file__).parent
|
||||
|
||||
with open(path / "event.jinja2", encoding="utf-8") as f:
|
||||
event_template = f.read()
|
||||
|
||||
with open(path / "profile.jinja2", encoding="utf-8") as f:
|
||||
profile_template = f.read()
|
||||
|
||||
__all__ = ("event_template", "profile_template")
|
||||
5
app/bot/dialogs/templates/event.jinja2
Normal file
5
app/bot/dialogs/templates/event.jinja2
Normal file
@@ -0,0 +1,5 @@
|
||||
<b>{{ event_obj["title"] }}</b>
|
||||
|
||||
{{ event_obj["description"] }}
|
||||
|
||||
{{ event_obj["start_date"].strftime("%d.%m.%Y") }} - {{ event_obj["end_date"].strftime("%d.%m.%Y") }}
|
||||
4
app/bot/dialogs/templates/profile.jinja2
Normal file
4
app/bot/dialogs/templates/profile.jinja2
Normal file
@@ -0,0 +1,4 @@
|
||||
<b>Профиль</b>
|
||||
|
||||
<b>Имя:</b> {{ user.fullname}}
|
||||
<b>Телефон:</b> {% if user.phone %}+{% endif %}{{user.phone}}
|
||||
Reference in New Issue
Block a user