simplified syntax in auth.wiki @///function

This commit is contained in:
mdipierro
2012-08-18 18:10:22 -05:00
parent 49a5b3025b
commit 3d1dcd063b
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -4653,7 +4653,7 @@ class Wiki(object):
page = db.wiki_page(slug=slug)
if not (page and self.can_edit(page)): return self.not_authorized(page)
self.auth.db.wiki_media.id.represent = lambda id,row:\
SPAN('@{////%i/%s.%s}' % \
SPAN('@////%i/%s.%s' % \
(id,IS_SLUG.urlify(row.title.split('.')[0]),
row.file.split('.')[-1]))
self.auth.db.wiki_media.wiki_page.default = page.id
@@ -4676,7 +4676,7 @@ class Wiki(object):
return dict(content=form)
def pages(self):
if not self.can_manage(): return self.not_authorized()
self.auth.db.wiki_page.id.represent = lambda id,row:SPAN('@{////%s}' % row.slug)
self.auth.db.wiki_page.id.represent = lambda id,row:SPAN('@////%s' % row.slug)
self.auth.db.wiki_page.title.represent = lambda title,row: \
A(title,_href=URL(args=row.slug))
content=SQLFORM.grid(