Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Behavior of immutable attributes #237

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions extra_views/advanced.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from copy import deepcopy

from django.contrib import messages
from django.forms.formsets import all_valid
from django.views.generic.base import ContextMixin
Expand Down Expand Up @@ -47,7 +49,7 @@ def get_inlines(self):
"""
Returns the inline formset classes
"""
return self.inlines
return deepcopy(self.inlines)

def forms_valid(self, form, inlines):
"""
Expand Down Expand Up @@ -191,7 +193,7 @@ def get_inlines_names(self):
"""
Returns a list of names of context variables for each inline in `inlines`.
"""
return self.inlines_names
return deepcopy(self.inlines_names)

def get_context_data(self, **kwargs):
"""
Expand Down