Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/errors/127.0.0.1.2010-07-08.15-14-07.3795a611-89e5-4715-a7c6-2b21e64b3cd4
blob: 7b3c72eebcf1c43c107bed94ef5f222633176a3a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
(dp1
S'output'
p2
S''
sS'layer'
p3
S'/home/jboisture/Desktop/web2py/applications/turtlesite/models/db.py'
p4
sS'code'
p5
S'if request.env.web2py_runtime_gae:\n    db = DAL(\'gae\')\n    session.connect(request,response,db=db)\nelse:db = DAL("sqlite://storage.db")\n\ndb.define_table(\'image\',\n   Field(\'file\', \'upload\', requires=[IS_NOT_EMPTY(error_message="Please select a file to upload"), IS_UPLOAD_FILENAME(extension=\'ta\', error_message="Must be a Turtle Art file")]),\n   Field(\'title\', requires=[IS_NOT_EMPTY(error_message="You must include a title"), IS_NOT_IN_DB(db, \'image.title\', error_message="Title is already taken"),IS_EXPR(\'str(value).count("*") == 0\', error_message="Title can not contain \'*\'")]),\n   Field(\'image_id\'),\n   Field(\'creator\', requires=IS_NOT_EMPTY(error_message="You must include your name")),\n   Field(\'description\', \'text\'),\n   Field(\'newimage\', \'upload\', requires=[IS_NOT_EMPTY(error_message="Please select a image to upload"), IS_UPLOAD_FILENAME(extension=\'png\', error_message="Must be a PNG image")]))\n\ndb.define_table(\'comment\',\n   Field(\'image_id\', db.image),\n   Field(\'comment_id\')\n   Field(\'author\'),\n   Field(\'body\', \'text\'))\n\nfrom gluon.tools import Auth\nauth = Auth(globals(),db)\nauth_table = db.define_table(\n    auth.settings.table_user_name,\n    Field(\'username\', length=128, default="", unique = True),\n    Field(\'email\', length=128, default="", unique=True),\n    Field(\'password\', \'password\', length=256,\n          readable=False, label=\'Password\'),\n    Field(\'registration_key\', length=128, default= "",\n          writable=False, readable=False))\n\ndb.comment.image_id.requires = IS_IN_DB(db, db.image.image_id, \'%(title)s\')\ndb.comment.author.requires = IS_NOT_EMPTY()\ndb.comment.body.requires = IS_NOT_EMPTY()\n\nauth_table.username.requires = [IS_EXPR(\'str(value).count(" ") == 0\', error_message=\'Username must be one word\'), IS_NOT_IN_DB(db, auth_table.username)]\nauth_table.password.requires = [IS_STRONG(), CRYPT()]\nauth_table.email.requires = [\n  IS_EMAIL(error_message=auth.messages.invalid_email),\n  IS_NOT_IN_DB(db, auth_table.email)]\nauth.settings.table_user = auth_table\nauth.define_tables()\n'
p6
sS'traceback'
p7
S'Traceback (most recent call last):\n  File "/home/jboisture/Desktop/web2py/gluon/restricted.py", line 176, in restricted\n    ccode = compile2(code,layer)\n  File "/home/jboisture/Desktop/web2py/gluon/restricted.py", line 163, in compile2\n    return compile(code.rstrip().replace(\'\\r\\n\',\'\\n\')+\'\\n\', layer, \'exec\')\n  File "/home/jboisture/Desktop/web2py/applications/turtlesite/models/db.py", line 17\n    Field(\'author\'),\n        ^\nSyntaxError: invalid syntax\n'
p8
s.