Changeset 188:19a8aff81d32
- Timestamp:
- Nov 29, 2009 5:41:26 PM (3 years ago)
- Branch:
- default
- Location:
- djangobb/apps/forum
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
djangobb/apps/forum/models.py
r177 r188 2 2 import os 3 3 import os.path 4 4 from markdown import Markdown 5 5 6 6 from django.db import models … … 11 11 from django.utils.translation import ugettext_lazy as _ 12 12 from django.utils.hashcompat import sha_constructor 13 #from django.contrib.markup.templatetags.markup import markdown14 from markdown import Markdown15 13 16 14 from forum.markups import mypostmarkup -
djangobb/apps/forum/templates/forum/topic.html
r186 r188 56 56 {% if "REPUTATION_SUPPORT"|forum_setting %} 57 57 {% ifnotequal request.user post.user.username %} 58 <dd><a href="{% url reputation post.user %}">{% trans "Reputation" %}</a> : <a href="{% url reputation post.user %}?action=plus&topic_id={{ post.topic.id }}"><img src="{{ MEDIA_URL }}forum/img/reputation/warn_add.gif" alt="+" border="0"></a> <strong>{{ post.user.forum_profile.reply_total }} </strong><a href="{% url reputation post.user %}?action=minus&topic_id={{ post.topic.id }}"><img src="{{ MEDIA_URL }}forum/img/reputation/warn_minus.gif" alt="-" border="0"></a></dd>58 <dd><a href="{% url reputation post.user %}">{% trans "Reputation" %}</a> : <a href="{% url reputation post.user %}?action=plus&topic_id={{ post.topic.id }}"><img src="{{ MEDIA_URL }}forum/img/reputation/warn_add.gif" alt="+" border="0"></a> <strong>{{ post.user.forum_profile.reply_total }} </strong><a href="{% url reputation post.user %}?action=minus&topic_id={{ post.topic.id }}"><img src="{{ MEDIA_URL }}forum/img/reputation/warn_minus.gif" alt="-" border="0"></a></dd> 59 59 {% endifnotequal %} 60 60 {% endif %} 61 61 <dd class="usercontacts"><a href="{% url forum_profile post.user %}">{% trans "Profile" %}</a> 62 62 {% ifequal post.user.forum_profile.privacy_permission 0 %} 63 <a href="mailto:{{ post.user.email }}">{% trans "E-mail" %}</a> 64 {% else %}65 {% ifequal post.user.forum_profile.privacy_permission 1 %}63 <a href="mailto:{{ post.user.email }}">{% trans "E-mail" %}</a> 64 {% else %} 65 {% ifequal post.user.forum_profile.privacy_permission 1 %} 66 66 <a href="{% url misc %}?mail_to={{ post.user }}">{% trans "Send e-mail" %}</a> 67 {% endifequal %}67 {% endifequal %} 68 68 {% endifequal %} 69 69 {% if "PM_SUPPORT"|forum_setting %} -
djangobb/apps/forum/views.py
r187 r188 292 292 replies_list = Reputation.objects.filter(to_user__pk__in=users).values('to_user_id').annotate(sign=Sum('sign')) #values_list buggy? 293 293 294 if replies_list: 295 replies = {} 296 for r in replies_list: 297 replies[r['to_user_id']] = r['sign'] 298 299 for post in posts: 300 post.user.forum_profile.reply_total = replies.get(post.user.id, 0) 294 replies = {} 295 for r in replies_list: 296 replies[r['to_user_id']] = r['sign'] 297 298 for post in posts: 299 post.user.forum_profile.reply_total = replies.get(post.user.id, 0) 301 300 302 301 initial = {}
Note: See TracChangeset
for help on using the changeset viewer.
