The is_video method is re-checking something that has already been established: the datatype. The field should be used whenever we need to check the type of file. In the templates, the code needs to be adapted from {% if media.is_video %} to {% if media.datatype == 'video' %}.
The
is_video
method is re-checking something that has already been established: thedatatype
. The field should be used whenever we need to check the type of file. In the templates, the code needs to be adapted from{% if media.is_video %}
to{% if media.datatype == 'video' %}
.