devilsbibble / django-survey

Automatically exported from code.google.com/p/django-survey
0 stars 0 forks source link

minor 2.4 issues #10

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I was getting a syntax error because there is one line of 2.5 specific code
... here's the patch for python 2.4 compatibility, not sure if that's a target.

Index: forms.py
===================================================================
--- forms.py    (revision 36)
+++ forms.py    (working copy)
@@ -172,7 +172,10 @@
     session_key = request.session.session_key.lower()
     login_user = request.user
     random_uuid = uuid.uuid4().hex
-    post = request.POST if request.POST else None # bug in newforms
+    if request.POST: # bug in newforms
+        post = request.POST 
+    else:
+        post = None 
     return [QTYPE_FORM[q.qtype](q, login_user, random_uuid, session_key,
prefix=sp+str(q.id), data=post)
             for q in survey.questions.all().order_by("order") ]

Original issue reported on code.google.com by mand...@gmail.com on 29 May 2008 at 12:02

GoogleCodeExporter commented 8 years ago
Fix in r40.
Thank you for the patch :-)
It helps to speed up the resolution.
--yml

Original comment by yann.ma...@gmail.com on 29 May 2008 at 10:55