Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

fixing the template_name

  • Loading branch information...
commit a4bcae5772721670dec24447336dc98f950feee3 1 parent 5af4f1b
Mike Krieger authored

Showing 1 changed file with 4 additions and 2 deletions. Show diff stats Hide diff stats

  1. +4 2 greetings/views.py
6 greetings/views.py
@@ -225,9 +225,10 @@ def make_greeting(request):
225 225 print request.POST
226 226 json_response = dict()
227 227 try:
228   - if check_request_parameters(request, ("from_user_id", "to_people_phones") ):
  228 + if check_request_parameters(request, ("template_name", "from_user_id", "to_people_phones") ):
229 229 new_card = Card()
230   - new_card.from_person = Person.objects.get(pk=request.REQUEST['from_user_id'])
  230 + new_card.from_person = Person.objects.get(pk=request.REQUEST['from_user_id'])
  231 + new_card.template_name = request.REQUEST['template_name']
231 232 card_hash = None
232 233 while( card_hash == None ):
233 234 new_hash = "".join([str(x) for x in random_lowercase_list()])
@@ -247,6 +248,7 @@ def make_greeting(request):
247 248
248 249
249 250 new_card.save()
  251 +
250 252 json_response['success'] = True
251 253 json_response['card_id'] = new_card.id
252 254 json_response['hash'] = new_card.short_hash

0 comments on commit a4bcae5

Please sign in to comment.
Something went wrong with that request. Please try again.