lin

删除自发帖子时遇到的错误

  •  
  •   lin · Dec 30, 2011 · 7660 views
    This topic created in 5267 days ago, the information mentioned may be changed or developed.
    在我网站 http://www.geekaa.com 删除一个帖子时返回:

    Traceback (most recent call last):
    File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/webapp/_webapp25.py", line 701, in __call__
    handler.get(*groups)
    File "/base/data/home/apps/geekaa3/1.355717407538880391/topic.py", line 1048, in get
    if member.level == 0 and (str(member.created_ts) == str(t)):
    AttributeError: 'Member' object has no attribute 'created_ts'

    topic.py 我是copy @Livid 在github上的文件。
    3 replies    1970-01-01 08:00:00 +08:00
    Livid
        1
    Livid  
    MOD
    PRO
       Dec 30, 2011
    你如果只是更新部分文件的话,你需要同时更新一下 v2ex/babel/__init__.py 里的数据模型定义。
    lin
        2
    lin  
    OP
       Dec 30, 2011
    @Livid 是这样的,我每次都是运行 git merge 来修改,可能之前我的 topic.py 有问题,结果每次发帖都错误,所以我单独copy了你这个文件。
    lin
        3
    lin  
    OP
       Dec 31, 2011
    @Livid 抱歉,这个是我疏忽,我改的时候漏了一段

    @property
    def username_lower_md5(self):
    return hashlib.md5(self.username_lower).hexdigest()

    @property
    def created_ts(self):
    return self.created.strftime("%s")

    但是现在虽然能弹出确认删除的对话框,但是问题是:
    点击后返回首页但是要删除的帖子还在。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5612 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 08:39 · PVG 16:39 · LAX 01:39 · JFK 04:39
    ♥ Do have faith in what you're doing.