--- a/sdi/views.py Fri Sep 03 16:08:40 2010 +0530
+++ b/sdi/views.py Fri Sep 03 16:17:19 2010 +0530
@@ -272,15 +272,18 @@
except Registrant.DoesNotExist:
raise Http404
- form = EditAddressForm(request.POST, instance=user)
- if request.method == "POST" and form.is_valid():
- form.save()
-
- send_addr_upd_email(user)
+ form = EditAddressForm(instance=user)
+ if request.method == "POST"
+ form = EditAddressForm(request.POST, instance=user)
+ if form.is_valid():
+ form.save()
+ #send_addr_upd_email(user)
+ else:
+ return render_to_response("address_updated.html", {"user":user})
return render_to_response("address_updated.html", {"user":user})
else:
- return render_to_response("update_address.html", {"user":user})
+ return render_to_response("update_address.html", {"user":user, 'form':form})
def admin_login(request):
""" basic login.