I am using session foreign key in my table.
class ClientJob(models.Model): #models.py
.....................................
sess = models.ForeignKey(Session)
And in order to save its value in database, I used ,.
def add_job(request) #views.py
...................................
if not request.session.exists(request.session.session_key):
request.session.create()
profile.sess = request.session.session_key
profile.save()
But when I execute my form and click on submit button, I get error as :
```Cannot assign "'b593c61453d7aad199078c66b9ad6b30'":
"ClientJob.sess" must be a "Session" instance.````
I am a bit unclear about using sessions in django, so be a little elaborative.
Thank you.
--
Sandeep Kaur
E-Mail: [email protected]
Blog: sandymadaan.wordpress.com
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.