ref #218: ops, change default profile template (read only)

This commit is contained in:
slav0nic 2012-04-26 10:35:09 +03:00
parent 6eb292573d
commit 30199706e7
2 changed files with 2 additions and 3 deletions

View file

@ -25,9 +25,7 @@
{% if request.user.is_superuser %} {% if request.user.is_superuser %}
<a href="{% url admin:user_change_password profile.id %}">{% trans "Change password" %}</a> <a href="{% url admin:user_change_password profile.id %}">{% trans "Change password" %}</a>
{% else %} {% else %}
{% if request.user == user %} <a href="{% url auth_password_change %}">{% trans "Change password" %}</a>
<a href="{% url auth_password_change %}">{% trans "Change password" %}</a>
{% endif %}
{% endif %} {% endif %}
</p> </p>
</div> </div>

View file

@ -387,6 +387,7 @@ def user(request, username, section='essentials', action=None, template='djangob
'form': form, 'form': form,
}) })
else: else:
template = 'djangobb_forum/user.html'
topic_count = Topic.objects.filter(user__id=user.id).count() topic_count = Topic.objects.filter(user__id=user.id).count()
if user.forum_profile.post_count < forum_settings.POST_USER_SEARCH and not request.user.is_authenticated(): if user.forum_profile.post_count < forum_settings.POST_USER_SEARCH and not request.user.is_authenticated():
return HttpResponseRedirect(reverse('user_signin') + '?next=%s' % request.path) return HttpResponseRedirect(reverse('user_signin') + '?next=%s' % request.path)