data = asyncio.run(parse_function())
только так себе идея Хотелось бы сделать так, чтобы поле не было обязательным и на ум пришло толькоа доки почитать на ум не пришло? https://wtforms.readthedocs.io/en/3.0.x/fields/#fi... или у гугла спросить "wtforms field not required"
Или же SQLAlchemy настолько непробиваем что не о чем беспокоиться?"непробиваемых" не существует, но фактически про любой достаточно популярный ORM можно сказать, что он очень хорошо защищен он инъекций, что можно не беспокоится. Конечно бывает что находят уязвимые места, обычно это какие-то косвенные места, а не часто используемый функционал.
file_loader = FileSystemLoader('templates')
env = Environment(loader=file_loader)
tm = env.get_template('/index.html')
msg = tm.render(persons=persons)
print(msg)
First, it looks for the language prefix in the requested URL. This is only performed when you are using the i18n_patterns function in your root URLconf. See Internationalization: in URL patterns for more information about the language prefix and how to internationalize URL patterns.
Failing that, it looks for a cookie.
The name of the cookie used is set by the LANGUAGE_COOKIE_NAME setting. (The default name is django_language.)
Failing that, it looks at the Accept-Language HTTP header. This header is sent by your browser and tells the server which language(s) you prefer, in order by priority. Django tries each language in the header until it finds one with available translations.
Failing that, it uses the global LANGUAGE_CODE settin
А если проще, то мне надо установить у него флажок "visibility = False".не нужно устанавливать этот флажок, он легко вычисляется, когда ты дату окончания акции сравнишь с текущей