This logic needs to check if the sum of `medias_by_slugname.cdphotothread|length` and `medias_by_slugname.imgur|length` is greater than 1.

I think the correct syntax is `medias_by_slugname.cdphotothread|add:medias_by_slugname.imgur|length > 1`, but you should double check.

See https://docs.djangoproject.com/en/dev/ref/templates/builtins/#add