projects
/
zzz-spline-forum.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Extremely basic forum tables and browsing.
[zzz-spline-forum.git]
/
spline
/
plugins
/
forum
/
__init__.py
diff --git
a/spline/plugins/forum/__init__.py
b/spline/plugins/forum/__init__.py
index
a3f259e
..
bd48a20
100644
(file)
--- 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."""
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):
class ForumPlugin(PluginBase):
@@
-21,6
+23,13
@@
class ForumPlugin(PluginBase):
forum = spline.plugins.forum.controllers.forum.ForumController,
)
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)
def template_dirs(self):
return [
(resource_filename(__name__, 'templates'), Priority.NORMAL)