base setup
This commit is contained in:
10
at_django_boilerplate/user_activity/context_processors.py
Normal file
10
at_django_boilerplate/user_activity/context_processors.py
Normal file
@@ -0,0 +1,10 @@
|
||||
from at_django_boilerplate.user_activity.models import SessionConsentModel
|
||||
|
||||
def user_consent_received(request):
|
||||
consent = SessionConsentModel.objects.filter(
|
||||
session_id=request.session.session_key
|
||||
).first()
|
||||
|
||||
return {
|
||||
'consent_received': consent.consent_received if consent else False
|
||||
}
|
||||
Reference in New Issue
Block a user