X-Git-Url: http://git.veekun.com/zzz-spline-forum.git/blobdiff_plain/19a1e214ee68488383c2c6e51b9306a3bdf1091f..e24696628dac6692cf27fbda910f10522dae7759:/spline/plugins/forum/__init__.py diff --git a/spline/plugins/forum/__init__.py b/spline/plugins/forum/__init__.py index a3f259e..bd48a20 100644 --- a/spline/plugins/forum/__init__.py +++ b/spline/plugins/forum/__init__.py @@ -12,7 +12,9 @@ import spline.plugins.forum.model def add_routes_hook(map, *args, **kwargs): """Hook to inject some of our behavior into the routes configuration.""" - map.connect('/forum', controller='forum', action='index') + map.connect('/forums', controller='forum', action='forums') + map.connect('/forums/{forum_id}', controller='forum', action='threads') + map.connect('/forums/{forum_id}/threads/{thread_id}', controller='forum', action='posts') class ForumPlugin(PluginBase): @@ -21,6 +23,13 @@ class ForumPlugin(PluginBase): forum = spline.plugins.forum.controllers.forum.ForumController, ) + def model(self): + return [ + model.Forum, + model.Thread, + model.Post, + ] + def template_dirs(self): return [ (resource_filename(__name__, 'templates'), Priority.NORMAL)