Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixing the template_name

  • Loading branch information...
commit a4bcae5772721670dec24447336dc98f950feee3 1 parent 5af4f1b
Mike Krieger authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 greetings/views.py
View
6 greetings/views.py
@@ -225,9 +225,10 @@ def make_greeting(request):
print request.POST
json_response = dict()
try:
- if check_request_parameters(request, ("from_user_id", "to_people_phones") ):
+ if check_request_parameters(request, ("template_name", "from_user_id", "to_people_phones") ):
new_card = Card()
- new_card.from_person = Person.objects.get(pk=request.REQUEST['from_user_id'])
+ new_card.from_person = Person.objects.get(pk=request.REQUEST['from_user_id'])
+ new_card.template_name = request.REQUEST['template_name']
card_hash = None
while( card_hash == None ):
new_hash = "".join([str(x) for x in random_lowercase_list()])
@@ -247,6 +248,7 @@ def make_greeting(request):
new_card.save()
+
json_response['success'] = True
json_response['card_id'] = new_card.id
json_response['hash'] = new_card.short_hash
Please sign in to comment.
Something went wrong with that request. Please try again.