<s> if request . is_local : <EOL> db = DAL ( '<STR_LIT>' , check_reserved = [ '<STR_LIT:all>' ] ) <EOL> else : <EOL> db = DAL ( '<STR_LIT>' , check_reserved = [ '<STR_LIT:all>' ] ) <EOL> response . generic_patterns = [ '<STR_LIT:*>' ] if request . is_local else [ ] <EOL> from gluon . tools import Auth , Crud , Service , PluginManager , prettydate <EOL> auth = Auth ( db ) <EOL> crud , service , plugins = Crud ( db ) , Service ( ) , PluginManager ( ) <EOL> auth . settings . extra_fields [ '<STR_LIT>' ] = [ <EOL> Field ( "<STR_LIT>" , "<STR_LIT>" , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT:address>" , "<STR_LIT:string>" , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT>" , "<STR_LIT:string>" , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT>" , "<STR_LIT:string>" , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT>" , "<STR_LIT:string>" , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT>" , "<STR_LIT:string>" , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT>" , "<STR_LIT:string>" , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT>" , "<STR_LIT:string>" , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT>" , "<STR_LIT:string>" , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT>" , "<STR_LIT:string>" , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT>" , "<STR_LIT:text>" , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( '<STR_LIT>' , '<STR_LIT>' , default = False ) <EOL> ] <EOL> auth . define_tables ( username = True ) <EOL> auth . settings . login_userfield = '<STR_LIT:email>' <EOL> auth . settings . on_failed_authorization = URL ( c = '<STR_LIT:default>' , f = '<STR_LIT>' ) <EOL> auth . settings . logged_url = URL ( c = '<STR_LIT:user>' , f = '<STR_LIT>' ) <EOL> mail = auth . settings . mailer <EOL> auth . settings . registration_requires_verification = False <EOL> auth . settings . registration_requires_approval = False <EOL> auth . settings . reset_password_requires_verification = True <EOL> if session . auth_with == '<STR_LIT>' : <EOL> import facebook_account <EOL> auth . settings . login_form = facebook_account . FaceBookAccount ( globals ( ) , db ) <EOL> from datetime import * <EOL> db . define_table ( "<STR_LIT>" , <EOL> Field ( "<STR_LIT:status>" , "<STR_LIT>" , default = False ) <EOL> ) <EOL> db . define_table ( "<STR_LIT>" , <EOL> Field ( "<STR_LIT>" , "<STR_LIT>" , uploadfolder = request . folder + '<STR_LIT>' , autodelete = True , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT>" , "<STR_LIT>" , uploadfolder = request . folder + '<STR_LIT>' , autodelete = True , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT>" , "<STR_LIT>" , uploadfolder = request . folder + '<STR_LIT>' , autodelete = True , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT>" , "<STR_LIT>" , uploadfolder = request . folder + '<STR_LIT>' , autodelete = True , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT>" , "<STR_LIT>" , uploadfolder = request . folder + '<STR_LIT>' , autodelete = True , label = T ( '<STR_LIT>' ) ) <EOL> ) <EOL> db . define_table ( "<STR_LIT>" , <EOL> Field ( '<STR_LIT>' , '<STR_LIT:string>' , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( '<STR_LIT>' , '<STR_LIT:string>' , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( '<STR_LIT>' , '<STR_LIT:string>' , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( '<STR_LIT>' , '<STR_LIT:string>' , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( '<STR_LIT>' , '<STR_LIT:string>' , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( '<STR_LIT>' , '<STR_LIT>' , label = T ( '<STR_LIT>' ) ) <EOL> ) <EOL> db . define_table ( "<STR_LIT>" , <EOL> Field ( '<STR_LIT>' , '<STR_LIT:string>' , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( '<STR_LIT>' , '<STR_LIT:text>' , label = T ( '<STR_LIT>' ) ) <EOL> ) <EOL> db . define_table ( "<STR_LIT>" , <EOL> Field ( '<STR_LIT>' , '<STR_LIT:string>' , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( '<STR_LIT>' , '<STR_LIT:string>' , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( '<STR_LIT>' , '<STR_LIT>' , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( '<STR_LIT>' , '<STR_LIT:string>' , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( '<STR_LIT>' , '<STR_LIT:string>' , label = T ( '<STR_LIT>' ) ) <EOL> ) <EOL> db . define_table ( "<STR_LIT>" , <EOL> Field ( '<STR_LIT>' , '<STR_LIT:string>' , label = T ( '<STR_LIT>' ) , requires = IS_IN_SET ( [ <EOL> ( '<STR_LIT>' , T ( '<STR_LIT>' ) ) , <EOL> ( '<STR_LIT>' , T ( '<STR_LIT>' ) ) , <EOL> ( '<STR_LIT>' , T ( '<STR_LIT>' ) ) , <EOL> ( '<STR_LIT>' , T ( '<STR_LIT>' ) ) , <EOL> ( '<STR_LIT>' , T ( '<STR_LIT>' ) ) , <EOL> ( '<STR_LIT>' , T ( '<STR_LIT>' ) ) , <EOL> ] ) ) , <EOL> Field ( '<STR_LIT>' , '<STR_LIT:string>' , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( '<STR_LIT>' , '<STR_LIT:string>' , label = T ( '<STR_LIT>' ) ) , <EOL> ) <EOL> db . define_table ( "<STR_LIT>" , <EOL> Field ( '<STR_LIT>' , '<STR_LIT>' , label = T ( '<STR_LIT>' ) , requires = IS_IN_SET ( [ ( '<STR_LIT:1>' , T ( '<STR_LIT>' ) ) , ( '<STR_LIT:0>' , T ( '<STR_LIT>' ) ) ] ) ) , <EOL> Field ( '<STR_LIT>' , '<STR_LIT:string>' , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( '<STR_LIT>' , '<STR_LIT:string>' , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( '<STR_LIT>' , '<STR_LIT>' , label = T ( '<STR_LIT>' ) , requires = IS_IN_SET ( [ ( '<STR_LIT:1>' , T ( '<STR_LIT>' ) ) , ( '<STR_LIT:0>' , T ( '<STR_LIT>' ) ) ] ) ) , <EOL> Field ( '<STR_LIT>' , '<STR_LIT:string>' , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( '<STR_LIT>' , '<STR_LIT:string>' , label = T ( '<STR_LIT>' ) ) <EOL> ) <EOL> db . define_table ( "<STR_LIT>" , <EOL> Field ( "<STR_LIT>" , "<STR_LIT:string>" , label = T ( '<STR_LIT>' ) ) <EOL> ) <EOL> db . define_table ( "<STR_LIT>" , <EOL> Field ( "<STR_LIT>" , "<STR_LIT:string>" , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT>" , compute = lambda row : IS_SLUG ( ) ( row . project_name ) [ <NUM_LIT:0> ] ) , <EOL> Field ( "<STR_LIT>" , "<STR_LIT>" , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT>" , "<STR_LIT>" , default = <NUM_LIT:0.0> , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT>" , "<STR_LIT>" , default = <NUM_LIT:0> , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT>" , db . project_categories , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT:description>" , "<STR_LIT:text>" , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT>" , "<STR_LIT:text>" , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT>" , "<STR_LIT:string>" , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT>" , "<STR_LIT:string>" , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT>" , "<STR_LIT:string>" , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT>" , "<STR_LIT:string>" , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT>" , "<STR_LIT:string>" , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT:image>" , "<STR_LIT>" , uploadfolder = request . folder + '<STR_LIT>' , autodelete = True , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT>" , "<STR_LIT>" , default = False , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT>" , db . auth_user , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT:status>" , "<STR_LIT>" , default = False , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT>" , "<STR_LIT:string>" , default = T ( '<STR_LIT>' ) , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT>" , "<STR_LIT>" , default = False , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT>" , "<STR_LIT>" , default = False , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT>" , "<STR_LIT:date>" , default = date . today ( ) , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT>" , "<STR_LIT:date>" , default = date . today ( ) , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT>" , "<STR_LIT:date>" , default = date . today ( ) , label = T ( '<STR_LIT>' ) ) <EOL> ) <EOL> db . project . project_value . requires = IS_NOT_EMPTY ( error_message = T ( '<STR_LIT>' ) ) <EOL> db . project . project_name . requires = IS_LENGTH ( maxsize = <NUM_LIT> , minsize = <NUM_LIT:1> , error_message = T ( '<STR_LIT>' ) ) <EOL> db . project . description . requires = IS_NOT_EMPTY ( error_message = T ( '<STR_LIT>' ) ) <EOL> db . project . id_category . requires = IS_IN_DB ( db , '<STR_LIT>' , '<STR_LIT>' , zero = T ( '<STR_LIT>' ) , error_message = T ( '<STR_LIT>' ) ) <EOL> db . project . website . requires = IS_NULL_OR ( IS_URL ( error_message = T ( '<STR_LIT>' ) ) ) <EOL> db . project . facebook . requires = IS_NULL_OR ( IS_URL ( error_message = T ( '<STR_LIT>' ) ) ) <EOL> db . project . video . requires = IS_NULL_OR ( IS_MATCH ( '<STR_LIT>' , strict = True , error_message = T ( '<STR_LIT>' ) ) ) <EOL> db . project . short_description . requires = IS_LENGTH ( maxsize = <NUM_LIT> , minsize = <NUM_LIT:1> , error_message = T ( '<STR_LIT>' ) ) <EOL> db . project . terms_of_use . requires = IS_NOT_EMPTY ( error_message = T ( '<STR_LIT>' ) ) <EOL> db . define_table ( "<STR_LIT>" , <EOL> Field ( "<STR_LIT>" , "<STR_LIT:text>" , default = None ) <EOL> ) <EOL> db . define_table ( "<STR_LIT>" , <EOL> Field ( "<STR_LIT>" , "<STR_LIT>" , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT>" , "<STR_LIT>" , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT>" , "<STR_LIT>" , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT>" , "<STR_LIT>" , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT:status>" , "<STR_LIT>" , default = False , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT>" , "<STR_LIT:string>" , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT>" , "<STR_LIT:string>" , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT>" , "<STR_LIT:date>" , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT>" , "<STR_LIT>" , default = True , label = T ( '<STR_LIT>' ) ) <EOL> ) <EOL> db . define_table ( "<STR_LIT>" , <EOL> Field ( "<STR_LIT>" , "<STR_LIT>" , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT>" , "<STR_LIT>" , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT>" , "<STR_LIT>" , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT>" , "<STR_LIT:text>" , label = T ( '<STR_LIT>' ) ) <EOL> ) <EOL> db . define_table ( "<STR_LIT>" , <EOL> Field ( "<STR_LIT>" , "<STR_LIT>" , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT>" , "<STR_LIT>" , label = T ( '<STR_LIT>' ) ) <EOL> ) <EOL> db . define_table ( "<STR_LIT>" , <EOL> Field ( "<STR_LIT>" , "<STR_LIT>" , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT>" , "<STR_LIT:string>" , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT>" , "<STR_LIT:text>" , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT>" , "<STR_LIT>" , default = False ) , <EOL> ) <EOL> db . define_table ( "<STR_LIT>" , <EOL> Field ( "<STR_LIT>" , "<STR_LIT>" , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT>" , "<STR_LIT>" , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT:title>" , "<STR_LIT:string>" , label = T ( '<STR_LIT>' ) ) , <EOL> Field ( "<STR_LIT>" , "<STR_LIT:text>" , label = T ( '<STR_LIT>' ) ) , <EOL> auth . signature <EOL> ) </s>
