You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Disclaimer: I'm not an expert yet in the Django middleware, signals, or this project's history so forgive me if this comes off totally ignorant.
Is there a way to tie a RequestEvent to CRUDEvent(s)? I've been wondering whether this library would be great to be able to track user activity by each request a user makes and what they changed or read from each. But I don't know if there is anything existing (or even possible) to pass a RequestEvent.id or maybe a new .request_uuid to the CRUDEvents object creation to match them together? Maybe a m2m entity between them? just spitballing.
The text was updated successfully, but these errors were encountered:
I did some digging and saw that there isn't a direct way to pass or receive the request object using signals. I noticed that the request object can be accessed in the _threads_local variable. I could see that in being able to use the request object in tying entities together.
The examples in this section import the SessionStore object directly from the django.contrib.sessions.backends.db backend. In your own code, you should consider importing SessionStore from the session engine designated by SESSION_ENGINE, as below:
An API is available to manipulate session data outside of a view:
>>>fromdjango.contrib.sessions.backends.dbimportSessionStore>>>s=SessionStore()
>>># stored as seconds since epoch since datetimes are not serializable in JSON.>>>s['last_login'] =1376587691>>>s.create()
>>>s.session_key'2b1189a188b44ad18c35e113ac6ceead'>>>s=SessionStore(session_key='2b1189a188b44ad18c35e113ac6ceead')
>>>s['last_login']
1376587691
Disclaimer: I'm not an expert yet in the Django middleware, signals, or this project's history so forgive me if this comes off totally ignorant.
Is there a way to tie a
RequestEvent
toCRUDEvent
(s)? I've been wondering whether this library would be great to be able to track user activity by each request a user makes and what they changed or read from each. But I don't know if there is anything existing (or even possible) to pass aRequestEvent.id
or maybe a new.request_uuid
to theCRUDEvents
object creation to match them together? Maybe a m2m entity between them? just spitballing.The text was updated successfully, but these errors were encountered: