Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Django 1.5 in templates #2

Merged
merged 3 commits into from Jan 13, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 17 additions & 0 deletions kaleo/management/commands/infinite_invites.py
@@ -0,0 +1,17 @@
import sys

from django.core.management.base import BaseCommand

from django.contrib.auth.models import User

from kaleo.models import InvitationStat


class Command(BaseCommand):
help = "Sets invites_allocated to -1 to represent infinite invites."

def handle(self, *args, **kwargs):
for user in User.objects.all():
stat, _ = InvitationStat.objects.get_or_create(user=user)
stat.invites_allocated = -1
stat.save()
4 changes: 2 additions & 2 deletions kaleo/templates/kaleo/_invite_form.html
@@ -1,8 +1,8 @@
{% load bootstrap_tags %}
{% load bootstrap_tags %}{% load url from future %}
<div id="invitation-form-messages"></div>
<div class="invitation_form">
{% if user.invitationstat.can_send %}
<form action="{% url kaleo_invite %}" method="POST" accept-charset="utf-8">
<form action="{% url "kaleo_invite" %}" method="POST" accept-charset="utf-8">
{% csrf_token %}
{{ form|as_bootstrap }}
<div class="form-actions">
Expand Down