connect database

This commit is contained in:
2025-09-27 09:13:20 +03:00
parent 5982351dd2
commit 1a49545fff
16 changed files with 180 additions and 38 deletions

View File

@@ -4,17 +4,17 @@ from aiogram_dialog.widgets.text import Const, Format
from app.bot.dialogs.flows.events.dialogs import EventsSG
from app.bot.dialogs.flows.profile.dialogs import ProfileSG
from app.bot.dialogs.widgets.getters import is_admin, username_getter
from app.bot.dialogs.widgets.getters import is_admin_getter, user_getter
from .states import StartSG
start_dialog = Dialog(
Window(
Format("Привет, {username}"),
Format("Привет, {user.fullname}"),
Start(Const("события"), id="events", state=EventsSG.events_list),
Button(Const("создать событие"), id="create_event", when="is_admin"),
Start(Const("профиль"), id="profile", state=ProfileSG.profile),
getter=[username_getter, is_admin],
getter=[user_getter, is_admin_getter],
state=StartSG.start,
)
)