X-Git-Url: http://git.veekun.com/zzz-spline-users.git/blobdiff_plain/1e2382335ea1e52b42cdc07fd1f74b9a9b0cec39..5ac8b0c9422e17740c3dd1df3e8123bd0234da1e:/spline/plugins/users/__init__.py diff --git a/spline/plugins/users/__init__.py b/spline/plugins/users/__init__.py index 92a825c..f0c8a33 100644 --- a/spline/plugins/users/__init__.py +++ b/spline/plugins/users/__init__.py @@ -8,12 +8,23 @@ import spline.model as model import spline.model.meta as meta import spline.plugins.users.controllers.accounts +import spline.plugins.users.controllers.users import spline.plugins.users.model def add_routes_hook(map, *args, **kwargs): """Hook to inject some of our behavior into the routes configuration.""" + # Login, logout + map.connect('/accounts/login', controller='accounts', action='login') map.connect('/accounts/login_begin', controller='accounts', action='login_begin') map.connect('/accounts/login_finish', controller='accounts', action='login_finish') + map.connect('/accounts/logout', controller='accounts', action='logout') + + # Self-admin + map.connect('/users/{id};{name}/edit', controller='users', action='profile_edit') + + # Public per-user pages + map.connect('/users/{id};{name}', controller='users', action='profile') + map.connect('/users/{id}', controller='users', action='profile') def check_userid_hook(action, **params): """Hook to see if a user is logged in and, if so, stick a user object in @@ -39,6 +50,7 @@ class UsersPlugin(PluginBase): def controllers(self): return dict( accounts = spline.plugins.users.controllers.accounts.AccountsController, + users = spline.plugins.users.controllers.users.UsersController, ) def model(self):