예제 #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)