#NEWLINE# def get_context_data( self , **kwargs ) : #NEWLINE# #INDENT# context = AdminViewMixin . get_context_data ( self , ** kwargs ) #NEWLINE# opts = self . schema . _meta #NEWLINE# context . update ( { #NEWLINE# #INDENT# 'title' : ( _ ( 'Add %s' ) % force_unicode ( opts . verbose_name ) ) , #NEWLINE# 'show_save' : True , #NEWLINE# 'show_delete_link' : bool ( self . dotpath ( ) ) , #NEWLINE# 'show_save_and_add_another' : False , #NEWLINE# 'show_save_and_continue' : True , #NEWLINE# 'add' : True , #NEWLINE# 'add_another' : True , #NEWLINE# 'cancel' : False , #NEWLINE# 'change' : False , #NEWLINE# 'delete' : False , #NEWLINE# 'breadcrumbs' : self . get_breadcrumbs ( ) , #NEWLINE# 'dotpath' : self . dotpath ( ) , #NEWLINE# 'tempdoc' : self . get_temporary_store ( ) , #NEWLINE# 'tempdoc_info' : self . get_temporary_store ( ) . _tempinfo , #NEWLINE# 'adminform' : self . create_admin_form ( ) , #NEWLINE# 'inline_admin_formsets' : self . get_inline_admin_formsets ( ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# context [ 'media' ] += context [ 'adminform' ] . form . media #NEWLINE# for inline in context [ 'inline_admin_formsets' ] : #NEWLINE# #INDENT# context [ 'media' ] += inline . media #NEWLINE# context [ 'media' ] += inline . formset . form . media #NEWLINE# #UNINDENT# obj = None #NEWLINE# if hasattr ( self , 'object' ) : #NEWLINE# #INDENT# obj = self . object #NEWLINE# #UNINDENT# context . update ( { #NEWLINE# #INDENT# 'root_path' : getattr ( self . admin_site , 'root_path' , None ) , #NEWLINE# 'app_label' : opts . app_label , #NEWLINE# 'opts' : opts , #NEWLINE# 'original' : obj , #NEWLINE# 'module_name' : force_unicode ( opts . verbose_name_plural ) , #NEWLINE# 'has_add_permission' : self . admin . has_add_permission ( self . request ) , #NEWLINE# 'has_change_permission' : self . admin . has_change_permission ( self . request , obj ) , #NEWLINE# 'has_delete_permission' : self . admin . has_delete_permission ( self . request , obj ) , #NEWLINE# 'has_file_field' : True , #NEWLINE# 'has_absolute_url' : hasattr ( self . document , 'get_absolute_url' ) , #NEWLINE# 'save_as' : self . admin . save_as , #NEWLINE# 'save_on_top' : self . admin . save_on_top , #NEWLINE# #UNINDENT# } ) #NEWLINE# context [ 'object_tools' ] = self . get_object_tools ( context ) #NEWLINE# return context