Django, Why does the system automatically generate an empty session? every time the request is made?

I saved the user"s login information in session, the django_ session table, but I found that every time a request is made, if the current session does not exist, the system automatically generates an empty session, like this: ![![] [1] [1]

I saved the above item manually, no problem, but the lower one is automatically saved by the system, so the session_data field is blank. Is there any way to prevent the system from automatically generating session??


is not very clear about your situation. Can you tell me what results you expect to see under what actions? And are you sure you know what session is for? In general, there is no need for you to manually modify the session table in django. If the sessionID in the cookie of your two requests is the same, two new session should not be created.