from django import template

register = template.Library()


@register.filter
def units_ratio(units_list):
    return 7 - len(units_list) / 4

@@ -100,16 +100,64 @@
 _list):%0A
+    if len(units_list) %3E 20:%0A        return 0.5%0A
     retu
@@ -185,6 +185,6 @@
 ) / 
-4
+3
 %0A

corrige unidades na tela do curso