{% for photo in photos %}
{% if not photo.private or user.is_authenticated %}
{% include "photo-preview.html" %}
{% endif %}
{% endfor %}
{% for photo in results %}
{% if not photo.private or user.is_authenticated %}
{% include "photo-preview.html" %}
{% endif %}
{% endfor %}
{% for album in albums %}
{% if not album.private or user.is_authenticated %}
{% include "album-preview.html" %}
{% endif %}
{% endfor %}