示例#1
0
文件: admin.py 项目: theorm/apfa
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)
示例#2
0
文件: admin.py 项目: theorm/apfa
def photosets():
	context = ctx.get_for_path(['Photo','All'])
	context['photosets'] = db.photo_sets()
	return render_template('photosets.html', **context)