Permalink
Browse files

Merge https://github.com/eldarion/kaleo

  • Loading branch information...
2 parents 6054aba + 1513624 commit a27b4f04b83f6e0f400a5c192132b974bd9be80e @ntucker ntucker committed Jan 13, 2013
Showing with 27 additions and 7 deletions.
  1. +3 −3 docs/conf.py
  2. +1 −0 docs/index.rst
  3. +19 −0 docs/management.rst
  4. +1 −1 kaleo/__init__.py
  5. +3 −3 kaleo/views.py
View
@@ -41,16 +41,16 @@
# General information about the project.
project = u'kaleo'
-copyright = u'2011, Eldarion'
+copyright = u'2013, Eldarion'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
-version = '0.4'
+version = '0.5'
# The full version, including alpha/beta/rc tags.
-release = '0.4'
+release = '0.5'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
View
@@ -22,4 +22,5 @@ Contents
settings
templates
signals
+ management
changelog
View
@@ -0,0 +1,19 @@
+.. _management:
+
+Management Commands
+===================
+
+add_invites
+-----------
+
+Adds invites to all users with 0 invites remaining.
+
+ manage.py add_invites 10 # Adds 10 new invites to all users with 0 invites remaining
+
+
+topoff_invites
+--------------
+
+Makes sure all users have at least a certain number of invites.
+
+ manage.py topoff_invites 10 # Makes sure that all users have at least 10 invites
View
@@ -1,2 +1,2 @@
# following PEP 386
-__version__ = "0.4"
+__version__ = "0.5"
View
@@ -2,16 +2,16 @@
from django.utils import simplejson as json
from django.views.decorators.http import require_http_methods
-from django.contrib.auth.decorators import login_required
-
from account.models import EmailAddress
from kaleo.forms import InviteForm
from kaleo.models import JoinInvitation
-@login_required
@require_http_methods(["POST"])
def invite(request):
+ if not request.user.is_authenticated():
+ data = {"status": "ERROR", "message": "not authenticated"}
+ return http.HttpResponseBadRequest(json.dumps(data), content_type="application/json")
form = InviteForm(request.POST)
if form.is_valid():
email = form.cleaned_data["email_address"]

0 comments on commit a27b4f0

Please sign in to comment.