Add get_extra_context method to ExtraContextMixin
This commit is contained in:
@@ -273,9 +273,12 @@ class MayanPermissionCheckMixin(object):
|
||||
class ExtraContextMixin(object):
|
||||
extra_context = {}
|
||||
|
||||
def get_extra_context(self):
|
||||
return self.extra_context
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super(ExtraContextMixin, self).get_context_data(**kwargs)
|
||||
context.update(self.extra_context)
|
||||
context.update(self.get_extra_context())
|
||||
return context
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user