Commit ea11fcf1 authored by Daniel W Bond's avatar Daniel W Bond
Browse files

added if/else tag example for user's name/username

parent a3daba23
......@@ -26,7 +26,12 @@
{% for student in students %}
<div class="col-sm-3 text-center">
<img class="img-circle img-responsive center center-block" src="{% gravatar_url student.user.email 100 %}" alt="{{ student.user.first_name }} Gravatar picture">
<h4><a href="{{ student.get_absolute_url }}"><strong>{{ student.user.first_name }} {{ student.user.last_name }}</strong></a></h4>
<h4><a href="{{ student.get_absolute_url }}"><strong>
{% if student.user.get_full_name %}
{{ student.user.get_full_name }}
{% else %}
{{ student.user.username }}
{% endif %}</strong></a></h4>
<h5><a href="{{ student.major.get_absolute_url }}"><em>{{ student.major.name }}</em></a></h5>
<h5><a href="{{ student.room.get_absolute_url }}">{{ student.room }}</a></h5>
{% if student.get_flag_count %}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment