diff --git a/LeraFoxQueen/database.py b/LeraFoxQueen/database.py index 2629a27..a826268 100644 --- a/LeraFoxQueen/database.py +++ b/LeraFoxQueen/database.py @@ -17,11 +17,15 @@ class DatingOrm(Model): id: Mapped[int] = mapped_column(primary_key=True, unique=True, autoincrement=True) sessionkey: Mapped[str] = mapped_column(unique=True) theme_name: Mapped[str] + sender_looking_relationship: Mapped[str] sender_name: Mapped[str] sender_sex: Mapped[str] sender_age: Mapped[int] sender_city: Mapped[str] telegram_name: Mapped[str] + sender_relationship: Mapped[str] + sender_having_kids: Mapped[str] + sender_want_to_have_kids: Mapped[str] interests_in_school_university: Mapped[str] interests_in_sports: Mapped[str] interests_in_work: Mapped[str] diff --git a/LeraFoxQueen/repository.py b/LeraFoxQueen/repository.py index e4022ae..2cf0e4b 100644 --- a/LeraFoxQueen/repository.py +++ b/LeraFoxQueen/repository.py @@ -5,15 +5,19 @@ from .schemas import SDatingAdd, SDating class DatingRepository: @classmethod - async def add_dating(cls, dating: SDatingAdd) -> int: + async def add_dating(cls, dating: SDatingAdd) -> int | None: async with new_session() as session: - data = dating.model_dump() - new_dating = DatingOrm(**data) + try: + data = dating.model_dump() + new_dating = DatingOrm(**data) - session.add(new_dating) - await session.flush() - await session.commit() - return new_dating.id + session.add(new_dating) + await session.flush() + await session.commit() + return new_dating.id + except Exception as e: + print(e) + return None @classmethod async def get_datings(cls) -> list[SDating]: diff --git a/LeraFoxQueen/schemas.py b/LeraFoxQueen/schemas.py index fee4bea..0140cd4 100644 --- a/LeraFoxQueen/schemas.py +++ b/LeraFoxQueen/schemas.py @@ -5,11 +5,15 @@ from pydantic import BaseModel, ConfigDict class SDatingAdd(BaseModel): sessionkey: str theme_name: str + sender_looking_relationship: str sender_name: str sender_sex: str sender_age: int sender_city: str telegram_name: str + sender_relationship: str + sender_having_kids: str + sender_want_to_have_kids: str interests_in_school_university: str interests_in_sports: str interests_in_work: str diff --git a/push.sh b/push.sh index dd47cba..d653dec 100755 --- a/push.sh +++ b/push.sh @@ -20,6 +20,10 @@ else fi fi +if [ -f ".git/index.lock" ]; then + rm ".git/index.lock" +fi + git add . git commit -m "Update" git push $git diff --git a/templates/index.html b/templates/index.html index 54f8808..4d61b53 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,1785 +1,1812 @@ - + - - - - - - - LeraFoxQueen : Найдём свою любовь вместе - - - - - - + + + + + + + LeraFoxQueen : Найдём свою любовь вместе + + + + + + - - - - - - - - + + + + + + + + - + .w-100 { + width: 100%; + } + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +

Сравнение возможностей

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Секс за деньгиСекс без обязательствДружбаСерьёзные отношения
Встречи + + + + + + + +
Прогулки + + + + + + + +
Дружеские объятия + + + + + + + +
+ Психологическая необременительная поддержка + + + + + + + + +
+ Нематериальная необременительная помощь + + + + + + + + +
Цветы + + + +
Подарки + + + +
Оплата такси + + + +
Оплата кафе, ресторанов + + + +
Оплата кино + + + +
Держаться за руки + + + +
Объятия возлюбленных + + + +
Поцелуи + + + +
+ Планирование совместной жизни, развития, доходов, расходов + + + + +
Секс + + + + + + + + + + + +
Планирование детей + + + +
+ Покупка туристических путёвок + + + + +
Покупка машины + + + +
Покупка квартиры + + + +
+ Покупка земельного участка и дома + + + + +
+
+ + - - - + - const toastLiveUUID = document.getElementById("liveToastUUID"); - const toastLiveUUID_js = new bootstrap.Toast(toastLiveUUID); - const toastLiveUUID_body = - toastLiveUUID.querySelector(".toast-body"); + - + console.log({ + responseData, + }); + + let telegram_name = document.getElementById("telegram_name").value; + + var message = ""; + + if(responseData.id === null) { + message = + 'Ошибка отправления. Возможно что была попытка отпавить анкету повторно. Свяжись с разработчиком LeraFoxQueen'; + } else { + message = `Сообщение отправлено. Если оно заинтересует, с тобой свяжутся по указанному контакту: ${telegram_name}`; + } + + exampleModal_js.toggle(); + toastLive_body.innerHTML = message; + toastLive_js.show(); + + } catch (error) { + console.error(error); + } + }; + + document + .querySelector("form[name='profile_send']") + .addEventListener("submit", handleFormSubmit); + }); + +