<s> from django . core . management . base import NoArgsCommand <EOL> def module_to_dict ( module , omittable = lambda k : k . startswith ( '<STR_LIT:_>' ) ) : <EOL> "<STR_LIT>" <EOL> return dict ( [ ( k , repr ( v ) ) for k , v in module . __dict__ . items ( ) if not omittable ( k ) ] ) <EOL> class Command ( NoArgsCommand ) : <EOL> help = """<STR_LIT>""" <EOL> requires_model_validation = False <EOL> def handle_noargs ( self , ** options ) : <EOL> from django . conf import settings , global_settings <EOL> settings . _setup ( ) <EOL> user_settings = module_to_dict ( settings . _wrapped ) <EOL> default_settings = module_to_dict ( global_settings ) <EOL> output = [ ] <EOL> keys = user_settings . keys ( ) <EOL> keys . sort ( ) <EOL> for key in keys : <EOL> if key not in default_settings : <EOL> output . append ( "<STR_LIT>" % ( key , user_settings [ key ] ) ) <EOL> elif user_settings [ key ] != default_settings [ key ] : <EOL> output . append ( "<STR_LIT>" % ( key , user_settings [ key ] ) ) <EOL> return '<STR_LIT:\n>' . join ( output ) </s>
