Use accounts.getCurrentAccount instead of users.get_current_user
authorSverre Rabbelier <srabbelier@gmail.com>
Wed, 11 Mar 2009 21:29:58 +0000
changeset 1798 ba4c00bc0c39
parent 1797 f0c83ca3bb08
child 1799 53d15b129a3b
Use accounts.getCurrentAccount instead of users.get_current_user This way accounts are normalized, which is usefull now that debug mode is also available even if deployed on appspot.com. Patch by: Sverre Rabbelier
app/soc/models/seed_db.py
--- a/app/soc/models/seed_db.py	Wed Mar 11 21:29:32 2009 +0000
+++ b/app/soc/models/seed_db.py	Wed Mar 11 21:29:58 2009 +0000
@@ -32,6 +32,7 @@
 from django import http
 
 from soc.logic.models.ranker_root import logic as ranker_root_logic
+from soc.logic import accounts
 from soc.models import student_proposal
 from soc.models.document import Document
 from soc.models.host import Host
@@ -79,7 +80,7 @@
   site.put()
 
 
-  account = users.get_current_user()
+  account = accounts.getCurrentAccount()
 
   if not account:
     account = users.User(email='test@example.com')