R
R
Rustam Ismailov2021-10-18 01:04:38
Flask
Rustam Ismailov, 2021-10-18 01:04:38

How to set a specific session to a specific lifetime?

Good afternoon, when executing a project on flask, I ran into the need to set one of the sessions to a different lifetime. Tell me how can this be done? Thanks in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
pcdesign, 2021-10-18
@pcdesign

Can it be like this

from datetime import timedelta
app.config['COOKIE_DURATION'] = timedelta(days=365)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question