I am using django 1.6.0. I am working on a web app with a client \"dashboard\". In the client dashboard there are tabs in the header of the base template. The tabs are dynami
This is doing exactly what you tell it. You've set pages
to be a class attribute of ParentMixin, which means it will also be a class attribute of any view class you mix it in to. Class attributes are shared across all instances of the class within a process, and since a process lasts across many requests, the data will persist across those requests.
You should always set attributes on self
, which means doing it inside a method, in this case probably inside get_context_data
. Django goes to some lengths to ensure that instance data is not shared in class-based views, but this does not apply to class-level data.