Commits

Chris Miles committed f489b91

Updated to fix compatibility with Pylons 1.0.
version = '0.3a2'

Comments (0)

Files changed (6)

BlastOff/blastoff/template/+package+/controllers/account.py_tmpl

 from urllib import quote
 
 from pylons import request, response, session, tmpl_context as c, url
-from pylons.controllers.util import abort, redirect_to
+from pylons.controllers.util import abort, redirect
 
 import tw.forms
 
         if identity is not None:
             came_from = request.params.get('came_from', None)
             if not came_from or came_from in CAME_FROM_EXCLUDE:
-                redirect_to('/')
+                redirect(url('/'))
             else:
-                redirect_to(str(came_from))
+                redirect(url(str(came_from)))
         
         return render('/account/login.mako')
     
                 
 {{if email_confirmation}}
                 h.flash_info(u"A confirmation email has been sent to %s containing a link to activate your account." %(user.email_address,))
-                redirect_to(url('/'))
+                redirect(url('/'))
 {{else}}
                 h.flash_info(u"Your account has been created.  You can now login with user name '%s'" %(user.user_name,))
-                redirect_to(url('/account/login'))
+                redirect(url('/account/login'))
 {{endif}}
         
         c.register_user_form = register_user_form
         else:
             h.flash_alert(u"Activation failed. The specified username or key may not be correct.")
         
-        redirect_to("/account/login")
+        redirect("/account/login")
     
 {{endif}}

BlastOff/blastoff/template/+package+/controllers/home.py_tmpl

 import logging
 
 from pylons import request, response, session, tmpl_context as c
-from pylons.controllers.util import abort, redirect_to
+from pylons.controllers.util import abort, redirect
 
 from {{package}}.lib.base import BaseController, render
 from {{package}}.lib import helpers as h

BlastOff/blastoff/template/+package+/lib/helpers.py

 # from webhelpers.html.tags import *
 
 from pylons import url, request, response
-from routes.util import url_for
 
 from webflash import Flash
 

BlastOff/blastoff/template/+package+/templates/base/base-index.mako_tmpl

         <a href="/account/logout">Logout</a> 
     % else:
       <a href="/account/register">Register</a> |
-      <a href="/account/login?came_from=${h.url_for()}">Login</a>
+      <a href="/account/login?came_from=${h.url.current()}">Login</a>
     % endif
     </div>  <!-- id="user_login" -->
   </div>  <!-- id="header" -->

BlastOff/blastoff/template/setup.py_tmpl

     author_email='',
     url='',
     install_requires=[
-        "Pylons >= 0.9.7",
+        "Pylons >= 1.0",
         "SQLAlchemy >= 0.5",
 {{if use_schemabot}}
         "SchemaBot >= 0.1a2",

BlastOff/setup.py

 from setuptools import setup, find_packages
 import sys, os
 
-version = '0.3a1'
+version = '0.3a2'
 
 # OS X: prevent 'tar' from including resource forks ("._*" files)
 os.environ['COPYFILE_DISABLE'] = 'true'