Permalink
Browse files

Quickstart new applications using repoze.who v2

  • Loading branch information...
1 parent 3f6cecb commit f6fb49c384c5044f51a2997db032f6149f7bec33 @amol- amol- committed Jun 4, 2012
@@ -94,7 +94,7 @@ class RootController(BaseController):
@expose('{{package}}.templates.login')
def login(self, came_from=lurl('/')):
"""Start the user login."""
- login_counter = request.environ['repoze.who.logins']
+ login_counter = request.environ.get('repoze.who.logins', 0)
if login_counter > 0:
flash(_('Wrong credentials'), 'warning')
return dict(page='login', login_counter=str(login_counter),
@@ -108,7 +108,7 @@ class RootController(BaseController):
"""
if not request.identity:
- login_counter = request.environ['repoze.who.logins'] + 1
+ login_counter = request.environ.get('repoze.who.logins', 0) + 1
redirect('/login',
params=dict(came_from=came_from, __logins=login_counter))
userid = request.identity['repoze.who.userid']
@@ -48,5 +48,5 @@ onepass = true
# A handy alias to make a release to pypi
release = egg_info -RDb "" sdist bdist_egg register upload
{{package}}develop = develop -i http://tg.gy/beta
-{{package}}deps = easy_install -i http://tg.gy/beta AddOns BytecodeAssembler Chameleon coverage DecoratorTools Extremes Genshi Jinja2 Kajiki kid PEAK_Rules repoze.tm2 repoze.who repoze.who_friendlyform repoze.who.plugins.sa repoze.who_testutil simplegeneric sprox SQLAlchemy SymbolType tgext.admin tgext.crud ToscaWidgets transaction TurboJson TurboKid tw.forms zope.interface zope.sqlalchemy
-tgupgrade = easy_install -i http://tg.gy/beta -U AddOns Babel Beaker BytecodeAssembler Chameleon coverage decorator DecoratorTools Extremes Genshi Jinja2 Kajiki kid Mako MarkupSafe nose Paste PasteDeploy PasteScript PEAK_Rules Pygments Pylons repoze.tm2 repoze.who repoze.who_friendlyform repoze.who.plugins.sa repoze.who_testutil simplegeneric simplejson sprox SQLAlchemy SymbolType Tempita tgext.admin tgext.crud ToscaWidgets transaction TurboJson TurboKid tw.forms WebError WebFlash WebHelpers WebOb WebTest zope.interface zope.sqlalchemy
+{{package}}deps = easy_install -i http://tg.gy/beta AddOns BytecodeAssembler Chameleon coverage DecoratorTools Extremes Genshi Jinja2 Kajiki kid PEAK_Rules repoze.tm2 repoze.who repoze.who_friendlyform repoze.who.plugins.sa simplegeneric sprox SQLAlchemy SymbolType tgext.admin tgext.crud ToscaWidgets transaction TurboJson TurboKid tw.forms zope.interface zope.sqlalchemy
+tgupgrade = easy_install -i http://tg.gy/beta -U AddOns Babel Beaker BytecodeAssembler Chameleon coverage decorator DecoratorTools Extremes Genshi Jinja2 Kajiki kid Mako MarkupSafe nose Paste PasteDeploy PasteScript PEAK_Rules Pygments Pylons repoze.tm2 repoze.who repoze.who_friendlyform repoze.who.plugins.sa simplegeneric simplejson sprox SQLAlchemy SymbolType Tempita tgext.admin tgext.crud ToscaWidgets transaction TurboJson TurboKid tw.forms WebError WebFlash WebHelpers WebOb WebTest zope.interface zope.sqlalchemy
@@ -28,7 +28,6 @@ testpkgs=['WebTest >= 1.2.3',
'nose',
'coverage',
'wsgiref',
- 'repoze.who-testutil >= 1.0.1',
]
install_requires=[
"TurboGears2 >= 2.2.0rc1",
@@ -52,9 +51,8 @@ install_requires=[
"tgming",
{{endif}}
{{if auth == "sqlalchemy" or auth == "ming"}}
+ "repoze.who",
"repoze.who-friendlyform >= 1.0.4",
- "repoze.who==1.0.19",
- "repoze.who-testutil",
"tgext.admin >= 0.5.1",
{{endif}}
{{if auth == "sqlalchemy"}}

0 comments on commit f6fb49c

Please sign in to comment.