Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 386 Bytes

html.md

File metadata and controls

24 lines (16 loc) · 386 Bytes

HTML and Django templates

Contents:

Prefer object properties to hard-coded comparisons

Instead of:

{% if obj.channel == "FIELD_SALES" %}
    ...
{% endif %}

add a property to the model/class to allow:

{% if obj.is_field_sales %}
    ...
{% endif %}