Commit 77e2ad52 authored by root's avatar root
Browse files

Change user object in invitations template.

parent d6ae71a2
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
{% block body %} {% block body %}
<div class="container"> <div class="container">
<h3>You have {{ user.invitations }} invitation{{ user.invitations|pluralize }} left.</h3> <h3>You have {{ inviter.invitations }} invitation{{ inviter.invitations|pluralize }} left.</h3>
<table class="zebra-striped id-sorted"> <table class="zebra-striped id-sorted">
<thead> <thead>
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
</tbody> </tbody>
</table> </table>
{% if user.invitations %} {% if inviter.invitations %}
<br /> <br />
<h4>Invite someone else:</h4> <h4>Invite someone else:</h4>
<form action="{% url astakos.im.views.invite %}" method="post">{% csrf_token %} <form action="{% url astakos.im.views.invite %}" method="post">{% csrf_token %}
......
...@@ -215,7 +215,7 @@ def invite(request, template_name='invitations.html', extra_context={}): ...@@ -215,7 +215,7 @@ def invite(request, template_name='invitations.html', extra_context={}):
'realname': inv.realname, 'realname': inv.realname,
'is_consumed': inv.is_consumed} 'is_consumed': inv.is_consumed}
for inv in inviter.invitations_sent.all()] for inv in inviter.invitations_sent.all()]
kwargs = {'user': inviter, kwargs = {'inviter': inviter,
'sent':sent} 'sent':sent}
context = get_context(request, extra_context, **kwargs) context = get_context(request, extra_context, **kwargs)
return render_response(template_name, return render_response(template_name,
......
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