Questions tagged [django-cookies]
17 questions
0
votes
0 answers
Django printing variable in template that has been passed to it in python
I am trying to get 'date' which can be eg 2023/01/29 to print in my template file.
def time_booking(request):
if 'date' in request.COOKIES:
context = {
'date':request.COOKIES['date'],
}
print("Run Run")
…

hw777644
- 13
- 3
0
votes
0 answers
What is the difference between response.COOKIES and request.session to handle cookies in DJango?
Disclaimer: I am a beginner, following the Django for everybody course on Coursera and I've looked around for explanations on Google but I can't wrap my head around this.
I'm confused; request.COOKIES.get('foo', 0) and response.set_cookie('foo',…

ben757
- 1