0

I need to have a few variables accessible on almost every view. I think I can see how to do it either using a context processor and "extra context" values, or by using session variables. Are there advantages and disadvantages? Which approach should I use? Are there meaningful differences? I see that to access session variables in a template, I have to enable django.core.context_processors.request

mb52089
  • 872
  • 2
  • 10
  • 24

1 Answers1

0

Sessions is a good way to store variables for that you can use on other pages in your website. Nothing wrong with using sessions.

Jordi Kroon
  • 2,607
  • 3
  • 31
  • 55