bruvellu / cifonauta

Marine biology image database by CEBIMar/USP
http://cifonauta.cebimar.usp.br
GNU General Public License v3.0
21 stars 5 forks source link

Replace `Media.is_video` by check on `Media.datatype` #262

Closed bruvellu closed 7 months ago

bruvellu commented 8 months ago

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' %}.