- theme = area.tags.filter(category='theme')
- theme = theme and theme[0] or None
- thing = area.tags.filter(category='thing')
- thing = thing and thing[0] or None
- return render(request, 'picture/picturearea_short.html', locals())
+ themes = area.tags.filter(category='theme')
+ things = area.tags.filter(category='thing')
+ return render(request, 'picture/picturearea_short.html', {
+ 'area': area,
+ 'theme': themes[0] if themes else None,
+ 'thing': things[0] if things else None,
+ })