Skip to content

Instantly share code, notes, and snippets.

@mostafabahri
Last active December 16, 2017 08:42
Show Gist options
  • Save mostafabahri/7f4cc17a8d09999c18a0d4fea082c7b5 to your computer and use it in GitHub Desktop.
Save mostafabahri/7f4cc17a8d09999c18a0d4fea082c7b5 to your computer and use it in GitHub Desktop.
Django trickery
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/2.8.0/css/flag-icon.min.css">
{% for agency in agencies %}
<div class="section">
<span class="flag-icon flag-icon-{{ agency.country|lower }}"></span> # here
<div class="info rtl">
<h5>{{ agency.country.name }}</h5>
<h5>{{ agency.agent_name }}</h5>
<h5>{{ agency.email }}</h5>
</div>
</div>
{% endfor %}
# add 'django_countres' to INSTALLED_APPS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment