コード例 #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)