return 0
def _add_to_rep(self, value):
- if (self.user.reputation + value < 1) and not settings.ALLOW_NEGATIVE_REPUTATION:
+ if int(self.user.reputation + value) < 1 and not settings.ALLOW_NEGATIVE_REPUTATION:
return 0
else:
return models.F('reputation') + value
{% load humanize %}
{% load question_list_tags %}
{% block usercontent %}
-
+ <div id="questionsBlock" class="userSection">
<a name="questions"></a>
{% spaceless %}
<h2>
href="{{ view_user.get_asked_url }}?type=rss" title="{% trans "subscribe to question RSS feed" %}"></a>
</h2>
{% endspaceless %}
- <div>{{ questions.paginator.sort_tabs }}</div>
+ <div id="questionTabs">{{ questions.paginator.sort_tabs }}</div>
<div id="listA" class="user-stats-table">
{% for question in questions.paginator.page %}
{% question_list_item question favorite_count=yes signature_type=badges %}
<br clear="all"/>
<div class="pager">{{ questions.paginator.page_numbers }}</div>
<br clear="all"/>
+ </div>
+ <div id="answersBlock" class="userSection">
<a name="answers"></a>
{% spaceless %}
<h2>
{% endblocktrans %}
</h2>
{% endspaceless %}
- <div>{{ answers.paginator.sort_tabs }}</div>
+ <div id="answerTabs">{{ answers.paginator.sort_tabs }}</div>
<div class="user-stats-table">
{% for answer in answers.paginator.page %}
<div class="answer-summary">
<br clear="all"/>
<div class="pager">{{ answers.paginator.page_numbers }}</div>
<br clear="all"/>
+ </div>
+
+
<a name="votes"></a>
{% spaceless %}
<h2>