def photoset(slug): photoset = db.photoset_by_slug(slug) if not photoset: raise NotFound('No such photo set.') set_type = 'Stories' if photoset['type'] == 0 else 'Galleries' context = ctx.get_for_path(['Photo',set_type,photoset['title']]) context['photoset'] = photoset context['photoset_types'] = photoset_types print context return render_template('photoset.html',**context)
def photosets(): context = ctx.get_for_path(['Photo','All']) context['photosets'] = db.photo_sets() return render_template('photosets.html', **context)