Skip to content

Latest commit

 

History

History
23 lines (16 loc) · 385 Bytes

html.md

File metadata and controls

23 lines (16 loc) · 385 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 %}