<s> from django . contrib . auth . models import User <EOL> from django . core . validators import MaxLengthValidator <EOL> NEW_USERNAME_LENGTH = <NUM_LIT> <EOL> def monkey_patch_username ( model , field ) : <EOL> username = model . _meta . get_field ( field ) <EOL> username . max_length = NEW_USERNAME_LENGTH <EOL> for v in username . validators : <EOL> if isinstance ( v , MaxLengthValidator ) : <EOL> v . limit_value = NEW_USERNAME_LENGTH <EOL> monkey_patch_username ( User , '<STR_LIT:username>' ) </s>
