session

Django session variables not saving when back button clicked

Django session variables not saving when back button clicked Question: On my page i am trying to implement a recently viewed section on my home page. The problem is when I append a new item to request.session["recently-viewed"], the item i just viewed gets deleted from the list when i load a new page. The item …

Total answers: 1

Flask session object does not persist between requests despite hardcoded secret key

Flask session object does not persist between requests despite hardcoded secret key Question: I am currently running into an issue deploying a Flask app on Amazon’s EB2 service. The Flask app works locally. When it is deployed, however, it only works for the first person who clicks the link. After that it throws the following …

Total answers: 1

Telethon find .session file phone number

Telethon find .session file phone number Question: I have already authorized .session file I forgot his number, tried adding other account to contact, tried changing privacy so I can see from other accs, all with no success.. any suggestions ? Asked By: Bali Cali || Source Answers: Log in to the Telethon .session file normally …

Total answers: 1

How to test api with session in django

How to test api with session in django Question: I am currently building an auth app that provides register, login, logout … functionalities. Everything seems to work fine, however when I log the user in, I cannot logout, I get an Anonymous user error instead. After searching on the internet I came to the conclusion …

Total answers: 1

How to use existing session with Seleniumbase?

How to use existing session with Seleniumbase? Question: I would like seleniumbase to use my existing session when it launches vs starting a clean one. How do I start selenium using an existing session? webdriver: driver = webdriver.Chrome(‘/snap/bin/chromium.chromedriver’, options=option) UPDATE: This is marked as a duplicate which it is not. Dear @TodorMinakov this code here …

Total answers: 1

Timeout within session while sending requests

Timeout within session while sending requests Question: I’m trying to learn how I can use timeout within a session while sending requests. The way I’ve tried below can fetch the content of a webpage but I’m not sure this is the right way as I could not find the usage of timeout in this documentation. …

Total answers: 2

Django – Session expiration renewal

Django – Session expiration renewal Question: I’m struggling with a question about sessions. I wonder how to make a session expire if the user has not tried to connect to the website in a certain period of time (15 days for example). In other words, I would like to renew the expiration date of a …

Total answers: 4

Generating signed session cookie value used in Flask

Generating signed session cookie value used in Flask Question: I’m proxying a Flask server with another Flask server that needs to inject items into the session. Both servers have the same secret key so the cryptographic signature will be the same. When using Flask and a session, the http response contains a Set-Cookie header with …

Total answers: 1

SQLAlchemy: engine, connection and session difference

SQLAlchemy: engine, connection and session difference Question: I use SQLAlchemy and there are at least three entities: engine, session and connection, which have execute method, so if I e.g. want to select all records from table I can do this engine.execute(select([table])).fetchall() and this connection.execute(select([table])).fetchall() and even this session.execute(select([table])).fetchall() – the results will be the same. …

Total answers: 3