get request.session from a model method in django
- by dotty
Hay, is it possible to a get a request.session value from a model method in django?
Here is what i need
def html(self):
Template = loader.get_template("inclusions/Template")
return Template.render(Context({
'user_id':request.session['user'].id
}))
user_id would be request.session['user'].id