Commits

Richard Jones committed ddb1bb9

better construction of entries entry summary

  • Participants
  • Parent commits 8d19a69

Comments (0)

Files changed (2)

File pyweek/challenge/templates/challenge/entries.html

   {% endif %}
  {% endfor %}
 {% autoescape off %}
-{{ entry.description }}
+{% with entry.entry as e %}
+  {% if e.description %}
+   {{ e.description|safe }}<br>
+  {% endif %}
+  {% if e.is_team %}
+   {% for user in e.users.all %}
+    <a href="{% url 'user_display' user.username %}">{{ user.username }}</a>
+   {% endfor %}
+  {% else %}
+   <a href="{% url 'user_display' e.user.username %}">{{ e.user.username }}</a>
+  {% endif %}
+{% endwith %}
 {% endautoescape %}
 </td>
 {% if entry.thumb %}

File pyweek/challenge/views/entry.py

         if shots: thumb = shots[0]
 
         # generate entry description
-        description = entry_description(entry)
+        # description = entry_description(entry)
 
         info = {
+            'entry': entry,
             'name': entry.name,
             'title': entry.title,
-            'description': description,
+            # 'description': description,
             'files': files,
             'sortname': random.random(),
             'may_rate': False,