damned-lies r1253 - in trunk: . common



Author: claudep
Date: Mon Dec 29 20:56:28 2008
New Revision: 1253
URL: http://svn.gnome.org/viewvc/damned-lies?rev=1253&view=rev

Log:
2008-12-29  Claude Paroz  <claude 2xlibre net>

	* common/views.py: Copy msgs function parameter before using it, 
	unless the content appended to it persist between calls.

Modified:
   trunk/ChangeLog
   trunk/common/views.py

Modified: trunk/common/views.py
==============================================================================
--- trunk/common/views.py	(original)
+++ trunk/common/views.py	Mon Dec 29 20:56:28 2008
@@ -43,10 +43,11 @@
     }
     return render_to_response('index.html', context, context_instance=RequestContext(request))
 
-def site_login(request, messages=[]):
+def site_login(request, msgs=[]):
     """ Site-specific login page. Not named 'login' to not confuse with auth.login """
     referer = None
     openid_path = ''
+    messages = list(msgs)
     if request.method == 'POST':
         if 'logout' in request.POST and request.POST['logout']:
             logout(request)
@@ -107,5 +108,5 @@
         return render_to_response('error.html', {'error':"Sorry, the key you provided is not valid."})
     person.activate()
     Person.clean_unactivated_accounts()
-    return site_login(request, messages=[_("Your account has been activated.")])
+    return site_login(request, msgs=[_("Your account has been activated.")])
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]