From b7b88f25a399dee3fd7b6fad3d630fe0b4b55afd Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Sat, 28 Jul 2007 04:23:17 +0000 Subject: [PATCH] Accidentally left out of last commit. --- controller/Notebooks.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/controller/Notebooks.py b/controller/Notebooks.py index b58d5b8..3518bff 100644 --- a/controller/Notebooks.py +++ b/controller/Notebooks.py @@ -38,10 +38,12 @@ class Notebooks( object ): @expose( view = Main_page ) @validate( notebook_id = Valid_id(), + note_id = Valid_id(), ) - def default( self, notebook_id ): + def default( self, notebook_id, note_id = None ): return dict( notebook_id = notebook_id, + note_id = note_id, ) @expose( view = Json ) @@ -52,9 +54,10 @@ class Notebooks( object ): @update_client @validate( notebook_id = Valid_id(), + note_id = Valid_id( none_okay = True ), user_id = Valid_id( none_okay = True ), ) - def contents( self, notebook_id, user_id ): + def contents( self, notebook_id, note_id = None, user_id = None ): self.check_access( notebook_id, user_id, self.__scheduler.thread ) if not ( yield Scheduler.SLEEP ): raise Access_error() @@ -64,6 +67,7 @@ class Notebooks( object ): yield dict( notebook = notebook, + note = notebook.lookup_note( note_id ), ) @expose( view = Json )