#NEWLINE# def get_context_data( self , **kwargs ) : #NEWLINE# #INDENT# 'Add into the context some useful information for base templates' #NEWLINE# context = super ( CommonViewMixin , self ) . get_context_data ( ** kwargs ) #NEWLINE# if hasattr ( self , 'title' ) : #NEWLINE# #INDENT# context [ 'title' ] = self . title #NEWLINE# #UNINDENT# if hasattr ( self , 'nav_active_item' ) : #NEWLINE# #INDENT# context [ 'nav_active_item' ] = self . nav_active_item #NEWLINE# #UNINDENT# if hasattr ( self , 'dd_active_item' ) : #NEWLINE# #INDENT# context [ 'dd_active_item' ] = self . dd_active_item #NEWLINE# #UNINDENT# if hasattr ( self , 'breadcrumbs' ) : #NEWLINE# #INDENT# context [ 'breadcrumbs' ] = self . breadcrumbs #NEWLINE# #UNINDENT# if hasattr ( self , 'messages' ) : #NEWLINE# #INDENT# for message in self . messages : #NEWLINE# #INDENT# messages . add_message ( self . request , message [ 'type' ] , message [ 'message' ] ) #NEWLINE# #UNINDENT# #UNINDENT# return context