<s> """<STR_LIT>""" <EOL> import django <EOL> from django . conf import settings <EOL> def get_user_model ( ) : <EOL> if django . VERSION >= ( <NUM_LIT:1> , <NUM_LIT:5> ) : <EOL> from django . contrib . auth import get_user_model <EOL> return get_user_model ( ) <EOL> else : <EOL> from django . contrib . auth . models import User <EOL> return User <EOL> def get_user_model_path ( ) : <EOL> return getattr ( settings , '<STR_LIT>' , None ) or '<STR_LIT>' <EOL> def get_username_field ( ) : <EOL> if django . VERSION >= ( <NUM_LIT:1> , <NUM_LIT:5> ) : <EOL> from django . contrib . auth import get_user_model <EOL> UserModel = get_user_model ( ) <EOL> return getattr ( UserModel , '<STR_LIT>' , '<STR_LIT:username>' ) <EOL> else : <EOL> return '<STR_LIT:username>' <EOL> def become_daemon ( * args , ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> if django . VERSION >= ( <NUM_LIT:1> , <NUM_LIT:10> ) : <EOL> from . daemonize import become_daemon <EOL> else : <EOL> from django . utils . daemonize import become_daemon <EOL> return become_daemon ( * args , ** kwargs ) <EOL> try : <EOL> string_type = basestring <EOL> except NameError : <EOL> string_type = str </s>
