#NEWLINE# def handle_app( self , app , **options ) : #NEWLINE# #INDENT# locale = options . get ( 'locale' , None ) #NEWLINE# if locale : #NEWLINE# #INDENT# from django.utils import translation #NEWLINE# translation . activate ( locale ) #NEWLINE# #UNINDENT# excludes = [ ] #NEWLINE# exclude_filename = options . get ( 'exclude_filename' , None ) #NEWLINE# if exclude_filename : #NEWLINE# #INDENT# f = open ( exclude_filename ) #NEWLINE# for line in f : #NEWLINE# #INDENT# excludes . append ( line . strip ( ) ) #NEWLINE# #UNINDENT# #UNINDENT# from django.db import models #NEWLINE# from simpleadmindoc.generate import generate_model_doc , generate_app_doc #NEWLINE# path = options . get ( 'path' ) #NEWLINE# generate_app_doc ( app ) #NEWLINE# for model in models . get_models ( app ) : #NEWLINE# #INDENT# if ( ( '%s.%s' % ( model . _meta . app_label , model . __name__ ) ) not in excludes ) : #NEWLINE# #INDENT# generate_model_doc ( model , path )