views.py
def edit_report(request, report_id):
user = request.user
if 'report_id' in request.session:
del request.session['report_id']
try:
member = Members.objects.get(member=user)
account_user = member.user
except:
account_user = user.id
request.session['report_id'] = report_id
request.session['account_user'] = account_user
request.session["edit_report"] = True
return redirect('method_name')
In my application on clicking a button,it takes to edit_report method and if the application is run through that method request.session["edit_report"]
the session becomes True it is mentioned in views like this request.session["edit_report"] = True
.I want to check in javascript that if that session is true i want to open a hidden div(make div display inline).How to do it using django.