<s> """<STR_LIT>""" <EOL> from flask_marshmallow import base_fields <EOL> from flask_restplus_patched import Schema , ModelSchema <EOL> from . models import User <EOL> class BaseUserSchema ( ModelSchema ) : <EOL> """<STR_LIT>""" <EOL> class Meta : <EOL> model = User <EOL> fields = ( <EOL> User . id . key , <EOL> User . username . key , <EOL> User . first_name . key , <EOL> User . middle_name . key , <EOL> User . last_name . key , <EOL> ) <EOL> dump_only = ( <EOL> User . id . key , <EOL> ) <EOL> class DetailedUserSchema ( BaseUserSchema ) : <EOL> """<STR_LIT>""" <EOL> class Meta ( BaseUserSchema . Meta ) : <EOL> fields = BaseUserSchema . Meta . fields + ( <EOL> User . email . key , <EOL> User . created . key , <EOL> User . updated . key , <EOL> User . is_active . fget . __name__ , <EOL> User . is_readonly . fget . __name__ , <EOL> User . is_admin . fget . __name__ , <EOL> ) <EOL> class UserSignupFormSchema ( Schema ) : <EOL> recaptcha_server_key = base_fields . String ( required = True ) </s>
