html is longtext, no empty_flash items in json

This commit is contained in:
j 2007-04-06 12:53:50 +00:00
parent bbe377ea4b
commit 0f4565b8ab
3 changed files with 7 additions and 3 deletions

View file

@ -25,6 +25,7 @@
# Allow every exposed function to be called as json, # Allow every exposed function to be called as json,
# tg.allow_json = False # tg.allow_json = False
tg.empty_flash = False
# List of Widgets to include on every page. # List of Widgets to include on every page.
# for exemple ['turbogears.mochikit'] # for exemple ['turbogears.mochikit']

View file

@ -50,7 +50,10 @@ WHERE %s ORDER BY %s""" % \
item = ArchiveItem.get(m[0]) item = ArchiveItem.get(m[0])
if not max_score: if not max_score:
max_score = m[1] / 100 max_score = m[1] / 100
if max_score:
item.score = m[1] / max_score item.score = m[1] / max_score
else:
item.score = m[1]
result.append(item) result.append(item)
return result return result
@ -63,7 +66,7 @@ class ArchiveItem(SQLObject):
author = UnicodeCol() author = UnicodeCol()
authorSort = UnicodeCol(default = '') authorSort = UnicodeCol(default = '')
description = UnicodeCol() # text(for rss) 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 text = UnicodeCol(length = 2**25) #Fulltext
relDate = DateTimeCol() #timestamp (item released) relDate = DateTimeCol() #timestamp (item released)
pubDate = DateTimeCol() #timestamp (item published) pubDate = DateTimeCol() #timestamp (item published)

View file

@ -158,7 +158,7 @@ if search['length'] > search['o'] + search['n']:
</div> </div>
<div id="shadowTop"></div> <div id="shadowTop"></div>
<div id="main_content"> <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 py:replace="[item.text]+item[:]"/>
</div> </div>