Hide regions with no attorneys in them
This commit is contained in:
parent
4c84c30285
commit
eaae3c346d
@ -1,9 +1,11 @@
|
||||
{% extends 'base.html' %}
|
||||
{% load charter_members_extra %}
|
||||
|
||||
{% block body %}
|
||||
<div class="container-fluid bg-dark-primary py-3">
|
||||
<div class="container">
|
||||
{% for region in region %}
|
||||
{% if attorneys|filter_region:region|length > 0 %}
|
||||
<div class="row bg-white mb-5">
|
||||
<div class="col-12 pt-3">
|
||||
<h2 class="text-dark-primary">{{ region }}</h2>
|
||||
@ -25,6 +27,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if other %}
|
||||
<div class="row bg-white mb-5">
|
||||
|
0
charter_members/templatetags/__init__.py
Normal file
0
charter_members/templatetags/__init__.py
Normal file
9
charter_members/templatetags/charter_members_extra.py
Normal file
9
charter_members/templatetags/charter_members_extra.py
Normal file
@ -0,0 +1,9 @@
|
||||
from django import template
|
||||
|
||||
|
||||
register = template.Library()
|
||||
|
||||
|
||||
@register.filter
|
||||
def filter_region(things, args):
|
||||
return things.filter(region=args)
|
Loading…
Reference in New Issue
Block a user