projects
/
zzz-spline-forum.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Flesh out core forum schema.
[zzz-spline-forum.git]
/
splinext
/
forum
/
controllers
/
forum.py
diff --git
a/splinext/forum/controllers/forum.py
b/splinext/forum/controllers/forum.py
index
bf66618
..
77e3fe4
100644
(file)
--- a/
splinext/forum/controllers/forum.py
+++ b/
splinext/forum/controllers/forum.py
@@
-5,22
+5,23
@@
from pylons.controllers.util import abort, redirect_to
from routes import request_config
from sqlalchemy.orm.exc import NoResultFound
from routes import request_config
from sqlalchemy.orm.exc import NoResultFound
-from spline import model
from spline.model import meta
from spline.lib import helpers as h
from spline.lib.base import BaseController, render
from spline.model import meta
from spline.lib import helpers as h
from spline.lib.base import BaseController, render
+from splinext.forum import model as forum_model
log = logging.getLogger(__name__)
class ForumController(BaseController):
def forums(self):
log = logging.getLogger(__name__)
class ForumController(BaseController):
def forums(self):
- c.forums = meta.Session.query(model.Forum).order_by(model.Forum.id.asc())
+ c.forums = meta.Session.query(forum_model.Forum) \
+ .order_by(forum_model.Forum.id.asc())
return render('/forum/forums.mako')
def threads(self, forum_id):
try:
return render('/forum/forums.mako')
def threads(self, forum_id):
try:
- c.forum = meta.Session.query(model.Forum).get(forum_id)
+ c.forum = meta.Session.query(
forum_
model.Forum).get(forum_id)
except NoResultFound:
abort(404)
except NoResultFound:
abort(404)
@@
-28,7
+29,7
@@
class ForumController(BaseController):
def posts(self, forum_id, thread_id):
try:
def posts(self, forum_id, thread_id):
try:
- c.thread = meta.Session.query(model.Thread) \
+ c.thread = meta.Session.query(
forum_
model.Thread) \
.filter_by(id=thread_id, forum_id=forum_id).one()
except NoResultFound:
abort(404)
.filter_by(id=thread_id, forum_id=forum_id).one()
except NoResultFound:
abort(404)