class Book(models.Model):
author = models.ForeignKey(User)
name = models.CharField(max_length=100)
def view(request):
book = Book.objects.get(pk=1)
request.session['selected_book'] = book
Is it a good practice to store Objects in Session instead of their id ?
Will it be "picklable" enough to be used in templates for example ?
<div>{{ request.session.book.author.name }}</div>