"""OLDNESS ------------------------------------------------------------------"""
if not ical:
if p.template_prefix:
t = template_loader.select_template(["places/%s_detail" % p.template_prefix, "places/detail"])
else:
t = template_loader.get_template('places/detail')
else:
if p.template_prefix:
t = template_loader.select_template(["places/%s_detail_ical" % p.template_prefix, "places/detail_ical"])
else:
t = template_loader.get_template('places/detail_ical')
"""NEWNESS (with added 'year' functionality ---------------------------------"""
tt = "places/%(prfx)sdetail%(year)s%(ical)s" # Template template
tv = {'prfx': p.template_prefix and "%s_" % p.template_prefix or '',
'year': year and "_year" or '',
'ical': ical and "_ical" or ''
}
t = template_loader.select_template([tt % tv, 'places/detail'])
Comments