hello everyone please help how can solve this problem?

this is session  code:-
 if user.password==password and user.role=="Company":
                com=Company.objects.get(user_id=user)
                request.session['id']=user.id
                request.session['role']=user.role
                request.session['company_name']=com.company_name
                request.session['email']=user.email
                return redirect('companyprofilepage')

This is my views.py code:-
def JobPostSubmit(request):
    user=UserMaster.objects.get(id=request.session.id)  
    if user.role == "Comapny":
        comp = Company.objects.get(user_id=user)        
        jobname=request.POST['jobname']
        comname=request.POST['comn']
        comemail=request.POST['come']
        comaddress=request.POST['comadd']
        comcontact=request.POST['comco']
        qualifications=request.POST['quli']
        responsblities=request.POST['resp']
        salary=request.POST['salary']
        experience=request.POST['exep']
        jobdesc=request.POST['jobdesc']
        weburl=request.POST['weburl']
        comlogo=request.FILES['comlogo']
        
jps=JobDetails.objects.create(company_id=comp,jobname=jobname,company_name=comname,jobdesc=jobdesc,qulifications=qualifications,resposiilites=responsblities,location=comaddress,companywebsite=weburl,companyemail=comemail,companycontact=comcontact,salarypackage=salary,experience=experience,logo=comlogo)
        message="Job Post Successfully"
        return redirect('jobpostsubmit',{'msg':message})


[image: image.jpeg]

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5cbd8bee-7089-466a-8b61-7d7e3f59bb5en%40googlegroups.com.

Reply via email to