#NEWLINE# def delete_model( self , model ) : #NEWLINE# #INDENT# '\n        Deletes a model from the database.\n        ' #NEWLINE# for field in model . _meta . local_many_to_many : #NEWLINE# #INDENT# if field . remote_field . through . _meta . auto_created : #NEWLINE# #INDENT# self . delete_model ( field . remote_field . through ) #NEWLINE# #UNINDENT# #UNINDENT# self . execute ( ( self . sql_delete_table % { #NEWLINE# #INDENT# 'table' : self . quote_name ( model . _meta . db_table ) , #NEWLINE# #UNINDENT# } ) )