Commits

Chris McDonough committed 7c70f08

be more standalone in security.py

Comments (0)

Files changed (2)

 *.kpf
 *.pdf
 
+syntax: regex
+env/
+src/authorization/tutorial.db
+

src/authorization/tutorial/security.py

 from repoze.bfg.view import bfg_view
 from repoze.bfg.exceptions import Forbidden
 
-from pylons.url import route_url
-
 from repoze.bfg.security import remember
 from repoze.bfg.security import forget
 
     
         return dict(
             message = message,
-            url = self.request.application_url + '/login',
+            url = login_url,
             came_from = came_from,
             login = login,
             password = password,
     def logout(self):
         headers = forget(self.request)
         return HTTPFound(
-            location=route_url('root', self.request),
+            location=self.request.application_url,
             headers=headers
             )