Use {% load url from future %} in team templates
Using https://github.com/futurecolors/django-future-url
This commit is contained in:
parent
41aab58d7b
commit
b2f41b81f4
1 changed files with 10 additions and 7 deletions
|
@ -1,5 +1,8 @@
|
|||
{% extends "site_base.html" %}
|
||||
|
||||
{% load url from future %}
|
||||
|
||||
|
||||
{% load bootstrap_tags %}
|
||||
|
||||
{% block head_title %}{{ team.name }}{% endblock %}
|
||||
|
@ -9,21 +12,21 @@
|
|||
<div class="span12">
|
||||
<div class="pull-right">
|
||||
{% if can_join %}
|
||||
<form method="post" action="{% url team_join team.slug %}">
|
||||
<form method="post" action="{% url 'team_join' team.slug %}">
|
||||
{% csrf_token %}
|
||||
<input type="submit" class="btn btn-primary" value="join">
|
||||
</form>
|
||||
{% endif %}
|
||||
|
||||
{% if can_leave %}
|
||||
<form method="post" action="{% url team_leave team.slug %}">
|
||||
<form method="post" action="{% url 'team_leave' team.slug %}">
|
||||
{% csrf_token %}
|
||||
<input type="submit" class="btn" value="leave">
|
||||
</form>
|
||||
{% endif %}
|
||||
|
||||
{% if can_apply %}
|
||||
<form method="post" action="{% url team_apply team.slug %}">
|
||||
<form method="post" action="{% url 'team_apply' team.slug %}">
|
||||
{% csrf_token %}
|
||||
<input type="submit" class="btn btn-primary" value="apply">
|
||||
</form>
|
||||
|
@ -44,7 +47,7 @@
|
|||
<tr>
|
||||
<td>{{ membership.user.email }}{% if user == membership.user %} <span class="label label-info">you</span>{% endif %}</td>
|
||||
<td>
|
||||
<form style="margin: 0;" method="post" action="{% url team_demote membership.pk %}">{% csrf_token %}<button type="submit" class="btn btn-mini">demote</button></form>
|
||||
<form style="margin: 0;" method="post" action="{% url 'team_demote' membership.pk %}">{% csrf_token %}<button type="submit" class="btn btn-mini">demote</button></form>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
@ -57,7 +60,7 @@
|
|||
<tr>
|
||||
<td>{{ membership.user.email }}{% if user == membership.user %} <span class="label label-info">you</span>{% endif %}</td>
|
||||
<td>
|
||||
<form style="margin: 0;" method="post" action="{% url team_promote membership.pk %}">{% csrf_token %}<button type="submit" class="btn btn-mini">promote</button></form>
|
||||
<form style="margin: 0;" method="post" action="{% url 'team_promote' membership.pk %}">{% csrf_token %}<button type="submit" class="btn btn-mini">promote</button></form>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
@ -70,8 +73,8 @@
|
|||
<tr>
|
||||
<td>{{ membership.user.email }}</td>
|
||||
<td>
|
||||
<form style="margin: 0; float: left;" method="post" action="{% url team_accept membership.pk %}">{% csrf_token %}<button type="submit" class="btn btn-mini">accept</button></form>
|
||||
<form style="margin: 0; float: left;" method="post" action="{% url team_reject membership.pk %}">{% csrf_token %}<button type="submit" class="btn btn-mini">reject</button></form>
|
||||
<form style="margin: 0; float: left;" method="post" action="{% url 'team_accept' membership.pk %}">{% csrf_token %}<button type="submit" class="btn btn-mini">accept</button></form>
|
||||
<form style="margin: 0; float: left;" method="post" action="{% url 'team_reject' membership.pk %}">{% csrf_token %}<button type="submit" class="btn btn-mini">reject</button></form>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
|
Loading…
Reference in a new issue