projects
/
zzz-floof.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
7913f8d
)
Added myself to websetup.
author
Eevee
<git@veekun.com>
Sat, 3 Oct 2009 00:20:53 +0000
(17:20 -0700)
committer
Eevee
<git@veekun.com>
Sat, 3 Oct 2009 00:20:53 +0000
(17:20 -0700)
floof/controllers/account.py
patch
|
blob
|
history
floof/websetup.py
patch
|
blob
|
history
diff --git
a/floof/controllers/account.py
b/floof/controllers/account.py
index
1dab66d
..
6c36310
100644
(file)
--- a/
floof/controllers/account.py
+++ b/
floof/controllers/account.py
@@
-56,9
+56,9
@@
class AccountController(BaseController):
# Try to pull a name out of the SReg response
sreg_res = SRegResponse.fromSuccessResponse(res)
try:
# Try to pull a name out of the SReg response
sreg_res = SRegResponse.fromSuccessResponse(res)
try:
- username =
sreg_res['nickname']
+ username =
unicode(sreg_res['nickname'])
except:
except:
- username = 'Anonymous'
+ username =
u
'Anonymous'
# Create db records
user = User(name=username)
# Create db records
user = User(name=username)
diff --git
a/floof/websetup.py
b/floof/websetup.py
index
705c342
..
fa97149
100644
(file)
--- a/
floof/websetup.py
+++ b/
floof/websetup.py
@@
-1,9
+1,10
@@
"""Setup the floof application"""
"""Setup the floof application"""
+import elixir
import logging
from floof.config.environment import load_environment
from floof.model import meta
import logging
from floof.config.environment import load_environment
from floof.model import meta
-
import elixi
r
+
from floof.model.users import IdentityURL, Use
r
log = logging.getLogger(__name__)
log = logging.getLogger(__name__)
@@
-13,3
+14,12
@@
def setup_app(command, conf, vars):
# Create the tables if they don't already exist
elixir.create_all(bind=meta.engine, checkfirst=False)
# Create the tables if they don't already exist
elixir.create_all(bind=meta.engine, checkfirst=False)
+
+ ### Load some basic data
+
+ # Users
+ identity_url = IdentityURL(url=u'http://eevee.livejournal.com/')
+ user = User(name=u'Eevee')
+ user.identity_urls.append(identity_url)
+
+ elixir.session.commit()