关于迷你站点的三个小问题 - 1) 内容类型; 2)内容重量; 3)一点错误 - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
FRHong
V2EX    Project Babel

关于迷你站点的三个小问题 - 1) 内容类型; 2)内容重量; 3)一点错误

  •  
  •   FRHong 2010-11-20 04:22:32 +08:00 5136 次点击
    这是一个创建于 5458 天前的主题,其中的信息可能已经有所发展或是发生改变。
    问题 (1)&(2)如图:



    问题(3),按照图中的设置,得到以下错误信息。我已经下载了最新版本的 PB 了。希望各位指点一下。谢谢

    ===================================================
    Traceback (most recent call last):
    File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/webapp/__init__.py", line 511, in __call__
    handler.get(*groups)
    File "/base/data/home/apps/testing123/1.346334734333315687/main.py", line 867, in get
    template_values['page_title'] = site.title + u' ' + page.minisite.title.decode('utf-8') + u' ' + page.title.decode('utf-8')
    File "/base/python_runtime/python_dist/lib/python2.5/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
    UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-1: ordinal not in range(128)
    ===================================================
    13 条回复    1970-01-01 08:00:00 +08:00
    FRHong
        1
    FRHong  
    OP
       2010-11-20 04:25:11 +08:00
    PS. 问题(3),如果把网页内容改成“独立式”的话。就不会出现这样的问题了。
    n2n3
        2
    n2n3  
       2010-11-20 06:39:28 +08:00
    3) 页面标题暂时只能是字母。

    1)
    text/js;charset=
    text/xml;charset=
    text/css;charset=
    FRHong
        3
    FRHong  
    OP
       2010-11-20 06:58:23 +08:00
    谢谢。现在连站点都回去不了了。

    刚刚试着在后台把话题修改一下,加了一个 “ 提问:#51ad19 ” 现在出现以下错误。怎么弄都回不去。甚至把整个程序下载,重新上传,还是回不去。

    ===========================================================
    Traceback (most recent call last):
    File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/webapp/__init__.py", line 511, in __call__
    handler.get(*groups)
    File "/base/data/home/apps/testing123/1.346337167061806542/main.py", line 60, in get
    site = GetSite()
    File "/base/data/home/apps/testing123/1.346337167061806542/v2ex/babel/da/__init__.py", line 127, in GetSite
    site = q[0]
    File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/db/__init__.py", line 1968, in __getitem__
    results = self.fetch(1, arg)
    File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/db/__init__.py", line 1858, in fetch
    return [self._model_class.from_entity(e) for e in raw]
    File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/db/__init__.py", line 1239, in from_entity
    instance = cls(None, _from_entity=True, **entity_values)
    File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/db/__init__.py", line 813, in __init__
    prop.__set__(self, value)
    File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/db/__init__.py", line 542, in __set__
    value = self.validate(value)
    File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/db/__init__.py", line 2799, in validate
    value = super(IntegerProperty, self).validate(value)
    File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/db/__init__.py", line 569, in validate
    raise BadValueError('Property %s is required' % self.name)
    BadValueError: Property topic_reply_level is required
    ============================================================
    n2n3
        4
    n2n3  
       2010-11-20 07:27:01 +08:00
    只能去后台 Datastore Viewer

    Edit Entity: Site

    topic_create_level, topic_reply_level:
    type: int; value: 1000

    topic_view_level:
    value: -1; type: int
    FRHong
        5
    FRHong  
    OP
       2010-11-20 07:33:26 +08:00
    超级感谢, 终于恢复了!!

    这些改了之后, 需要改回原来的设定吗?

    之前topic这个功能都不能用的, 按照你的修改之后就可以了.
    n2n3
        6
    n2n3  
       2010-11-20 07:35:30 +08:00
    主题类型有设置的话就不能改了
    FRHong
        7
    FRHong  
    OP
       2010-11-20 07:44:35 +08:00
    您的意思是如果设置了主题(如下图)的话, 就得按照你那样的设置, 不能再改回之前的设定了是不是?
    http://img.ly/2sUr


    我搞不清楚的地方就是为什么之前默认的设定无法用 话题 这个功能.
    如果现在全新注册一个GAE ID, 然后上传一个 PB, 在后台设置话题, enable之后. 如果不按照你的方法修改 Datastore Viewer 的话, 应该大部分会出现错误.

    我这样理解, 是否正确?
    FRHong
        8
    FRHong  
    OP
       2010-11-20 07:45:39 +08:00
    另一个问题. 在mini site 那里我把标题设置为英文之后,还是出现了同样的错误信息.
    n2n3
        9
    n2n3  
       2010-11-20 08:12:51 +08:00
    主题类型需要设置那些属性,新建应用的话有默认设置的
    apple
        10
    apple  
       2010-11-20 14:44:22 +08:00
    貌似嵌入式页面,当前还不可用,至少我没成功创建过。
    FRHong
        11
    FRHong  
    OP
       2010-11-20 16:44:24 +08:00
    那看来目前这个嵌入式页面页面还不可用,等 @Livid 过来确认一下。
    Livid
        12
    Livid  
    MOD
    PRO
       2010-11-21 01:59:31 +08:00
    @FRHong 嵌入式页面可用的,下面这里就是一个例子:

    http://v2ex.appspot.com/cn/index.html

    不过这个功能确实还需要更多的测试。

    GAE SDK 的 django.template 包貌似对 UTF-8 实体的支持有问题。
    FRHong
        13
    FRHong  
    OP
       2010-11-21 02:07:18 +08:00
    恩,我知道 /cn/index.html 是用嵌入式的。可是自己测试了一下之后总是出现那个错误,any ideas? 先谢谢了。
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     5988 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 27ms UTC 02:19 PVG 10:19 LAX 19:19 JFK 22:19
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86