app/soc/views/models/user.py
changeset 494 5e9c656a1b68
parent 493 6976c4d8d0ac
child 495 87afae6e4c51
--- a/app/soc/views/models/user.py	Sun Nov 16 23:02:31 2008 +0000
+++ b/app/soc/views/models/user.py	Sun Nov 16 23:03:37 2008 +0000
@@ -32,7 +32,6 @@
 from soc.logic.models import user as user_logic
 from soc.views import helper
 from soc.views.models import base
-from soc.views.sitemap import sidebar
 
 import soc.models.user
 import soc.logic.models.user
@@ -93,7 +92,7 @@
     new_email = form_account.email()
 
     if new_email != old_email \
-        and user_logic.logic.getFromFields(email=new_email):
+        and user_logic.logic.getForFields({'email': new_email}, unique=True):
       raise forms.ValidationError("This account is already in use.")
 
     return self.cleaned_data.get('email')
@@ -205,6 +204,14 @@
         ]
     return self.getSidebarLinks(params)
 
+  def getDjangoURLPatterns(self):
+    """see base.View.getDjangoURLPatterns()
+    """
+
+    patterns = super(View, self).getDjangoURLPatterns()
+    patterns += [(r'^user/edit$','soc.views.user.profile.create')]
+    return patterns
+
 
 view = View()
 
@@ -214,5 +221,3 @@
 list = view.list
 public = view.public
 edit_self = view.editSelf
-
-sidebar.SIDEBAR.append(view.getSidebarLinks())