Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Support Django 1.5 in templates #2

Merged
merged 3 commits into from

2 participants

Nathaniel Tucker Patrick Altman
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 10, 2012
  1. Nathaniel Tucker
Commits on Jan 13, 2013
  1. Nathaniel Tucker
  2. Nathaniel Tucker
This page is out of date. Refresh to see the latest.
17 kaleo/management/commands/infinite_invites.py
View
@@ -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 kaleo/templates/kaleo/_invite_form.html
View
@@ -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">
Something went wrong with that request. Please try again.