diff options
author | James Boisture <jboisture@jboisture-laptop.(none)> | 2010-07-20 03:15:23 (GMT) |
---|---|---|
committer | James Boisture <jboisture@jboisture-laptop.(none)> | 2010-07-20 03:15:23 (GMT) |
commit | b817158f554f7b3342ecfe3ce24d04e91abed3c3 (patch) | |
tree | 632bc4515e4feb5440714acb3b893aaa9b22a91d /errors/127.0.0.1.2010-07-07.11-24-37.0cac9768-5458-4dd7-947f-db23a93abe91 |
The initial commit of the turtleartsite
Diffstat (limited to 'errors/127.0.0.1.2010-07-07.11-24-37.0cac9768-5458-4dd7-947f-db23a93abe91')
-rw-r--r-- | errors/127.0.0.1.2010-07-07.11-24-37.0cac9768-5458-4dd7-947f-db23a93abe91 | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/errors/127.0.0.1.2010-07-07.11-24-37.0cac9768-5458-4dd7-947f-db23a93abe91 b/errors/127.0.0.1.2010-07-07.11-24-37.0cac9768-5458-4dd7-947f-db23a93abe91 new file mode 100644 index 0000000..e94dfd5 --- /dev/null +++ b/errors/127.0.0.1.2010-07-07.11-24-37.0cac9768-5458-4dd7-947f-db23a93abe91 @@ -0,0 +1,17 @@ +(dp1 +S'output' +p2 +S'' +sS'layer' +p3 +S'/home/jboisture/Desktop/web2py/applications/turtlesite/controllers/default.py' +p4 +sS'code' +p5 +S'import os\n\ndef index():\n if "page" in request.vars.keys(): page = int(request.vars["page"]) - 1\n else: page = 0\n table = []\n comments = db().select(db.comment.ALL)\n i = 0\n row = []\n count = 0\n for comment in comments:\n if count > page * 12 and page*12+13 > count:\n if i == 4:\n table.append(row)\n row = []\n i = 0\n i += 1\n row.append(comment)\n count += 1\n table.append(row)\n pages = count / 12\n if count%12 > 0: pages += 1\n page += 1\n return dict(comments=table, pages=pages, page=page)\n\ndef profile():\n if "user" in request.vars.keys(): user = request.vars["user"]\n else: redirect(URL(r=request, f=\'index\')) \n if "page" in request.vars.keys(): page = int(request.vars["page"]) - 1\n else: page = 0\n table = []\n comments = db().select(db.comment.ALL)\n for comment in comments:\n if comment.creator != user: comments.remove(comment)\n i = 0\n row = []\n count = 0\n for comment in comments:\n if count > page * 12 and page*12+13 > count:\n if i == 4:\n table.append(row)\n row = []\n i = 0\n i += 1\n row.append(comment)\n count += 1\n table.append(row)\n pages = count / 12\n if count%12 > 0: pages += 1\n page += 1\n return dict(comments=table, pages=pages, page=page, user=user)\n\ndef upload():\n form = SQLFORM(db.comment, fields = [\'title\', \'file\', \'newimage\', \'description\'])\n if form.accepts(request.vars, session):\n session.new_image_title = form.vars.title\n print auth.user.username\n db(db.comment.title==session.new_image_title).update(creator = auth.user.username)\n redirect(URL(r=request, f=\'index\')) \n return dict(form=form)\n\n\ndef image():\n comment = db(db.comment.title==request.vars["title"]).select().first()\n return dict(comment = comment)\n \n \ndef testimage():\n\treturn db(db.comment.title=="hellotest")\n\ndef user(): \n return dict(form=auth())\n\t\n\ndef adminpage():\n db.comment.truncate()\n redirect(\'index.html\')\n \ndef download():\n return response.download(request, db)\n\nresponse._vars=response._caller(profile)\n' +p6 +sS'traceback' +p7 +S'Traceback (most recent call last):\n File "/home/jboisture/Desktop/web2py/gluon/restricted.py", line 178, in restricted\n exec ccode in environment\n File "/home/jboisture/Desktop/web2py/applications/turtlesite/controllers/default.py", line 82, in <module>\n File "/home/jboisture/Desktop/web2py/gluon/globals.py", line 96, in <lambda>\n self._caller = lambda f: f()\n File "/home/jboisture/Desktop/web2py/applications/turtlesite/controllers/default.py", line 34, in profile\n if comment.creator != user: comments.remove(comment)\nAttributeError: \'Rows\' object has no attribute \'remove\'\n' +p8 +s.
\ No newline at end of file |