SessionStore object has no attribute id @video6

‘SessionStore’ object has no attribute ‘id’ at video-6. Please help

                                                             **Views.py**

def JobPostPage(request,pk):
user = UserMaster.objects.get(pk=pk)
comp = Company.objects.get(user_id=user)
return render(request,“app/company/jobpost.html”,{‘user’:user,‘comp’:comp})

def JobDetailSubmit(request,pk):
user = UserMaster.objects.get(pk=pk)
if user.role ==“Company”:
comp = Company.objects.get(user_id=user)
jobname = request.POST[‘jobname’]
companyname = request.POST[‘companyname’]
companyaddress = request.POST[‘companyaddress’]
jobdescription = request.POST[‘jobdescription’]
qualification = request.POST[‘qualification’]
responsibilites = request.POST[‘responsibilites’]
location = request.POST[‘location’]
companywebsite = request.POST[‘companywebsite’]
companyemail = request.POST[‘companyemail’]
companycontact = request.POST[‘companycontact’]
salarypackage = request.POST[‘salarypackage’]
experience = request.POST[‘experience’]
logo_pic = request.FILES[‘logopic’]

    newjob = Jobdetailspost.objects.create(company_id=comp,jobname=jobname,companyname=companyname,companyaddress=companyaddress,
                                            jobdescription=jobdescription,qualification=qualification,responsibilites=responsibilites,
                                            location=location,companywebsite=companywebsite,companyemail=companyemail,
                                            companycontact=companycontact,salarypackage=salarypackage,experience=experience,
                                            logo_pic=logo_pic)

    message = "Job Post Successfully"
    return render(request,"app/company/jobpost.html",{'msg':message})






                                                  ***urls.py***

path(“jobpostpage/int:pk”,views.JobPostPage,name=‘jobpostpage’),
path(“jobpost/int:pk”,views.JobDetailSubmit,name=‘jobpost’),

1 Like

Thank you, code is Working, but can’t fetch from databases.