html is longtext, no empty_flash items in json
This commit is contained in:
parent
bbe377ea4b
commit
0f4565b8ab
3 changed files with 7 additions and 3 deletions
|
@ -25,6 +25,7 @@
|
|||
|
||||
# Allow every exposed function to be called as json,
|
||||
# tg.allow_json = False
|
||||
tg.empty_flash = False
|
||||
|
||||
# List of Widgets to include on every page.
|
||||
# for exemple ['turbogears.mochikit']
|
||||
|
|
|
@ -50,7 +50,10 @@ WHERE %s ORDER BY %s""" % \
|
|||
item = ArchiveItem.get(m[0])
|
||||
if not max_score:
|
||||
max_score = m[1] / 100
|
||||
item.score = m[1] / max_score
|
||||
if max_score:
|
||||
item.score = m[1] / max_score
|
||||
else:
|
||||
item.score = m[1]
|
||||
result.append(item)
|
||||
return result
|
||||
|
||||
|
@ -63,7 +66,7 @@ class ArchiveItem(SQLObject):
|
|||
author = UnicodeCol()
|
||||
authorSort = UnicodeCol(default = '')
|
||||
description = UnicodeCol() # text(for rss)
|
||||
html = UnicodeCol() #(for page, contains javascript)
|
||||
html = UnicodeCol(length = 2**25) #(for page, contains javascript)
|
||||
text = UnicodeCol(length = 2**25) #Fulltext
|
||||
relDate = DateTimeCol() #timestamp (item released)
|
||||
pubDate = DateTimeCol() #timestamp (item published)
|
||||
|
|
|
@ -158,7 +158,7 @@ if search['length'] > search['o'] + search['n']:
|
|||
</div>
|
||||
<div id="shadowTop"></div>
|
||||
<div id="main_content">
|
||||
<div py:if="tg_flash" class="flash" py:content="tg_flash"></div>
|
||||
<div py:if="defined('tg_flash') and tg_flash" class="flash" py:content="tg_flash"></div>
|
||||
|
||||
<div py:replace="[item.text]+item[:]"/>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue