Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

cookies in django

# views.py
def viewdata(request):
  #  html file index.html
    response = render(request,"index.html")
  # Set Cookies
    response.set_cookie('mefiz', 'mefiz.com') 
	# Get Cookies
    value = request.COOKIES.get("mefiz")
    print(value)
    # Return Responce
    return response
 
PREVIOUS NEXT
Tagged: #cookies #django
ADD COMMENT
Topic
Name
6+1 =