# HG changeset patch # User Paul Boddie # Date 1445184127 -7200 # Node ID 679aa5cecd0ff3b07aa21bbe2502f126a4a29ced # Parent fb381a0c09f25fed9f191579752ea252a14b092f Short-circuit page generation when handling a new event. diff -r fb381a0c09f2 -r 679aa5cecd0f imipweb/calendar.py --- a/imipweb/calendar.py Sun Oct 18 17:32:02 2015 +0200 +++ b/imipweb/calendar.py Sun Oct 18 18:02:07 2015 +0200 @@ -51,7 +51,7 @@ i = key[len("newevent-"):] break else: - return + return False # Create a new event using the available information. @@ -60,7 +60,7 @@ summary = args.get("summary-%s" % i, [None])[0] if not slots: - return + return False # Obtain the user's timezone. @@ -168,6 +168,7 @@ # attendee controls, there will be organiser controls. self.redirect(self.link_to(uid)) + return True # Page fragment methods. @@ -256,7 +257,9 @@ self.new_page(title="Calendar") page = self.page - handled = self.handle_newevent() + if self.handle_newevent(): + return + freebusy = self.store.get_freebusy(self.user) if not freebusy: @@ -277,13 +280,6 @@ # Day view: start at the earliest known day and produce days until the # latest known day, perhaps with expandable sections of empty days. - # Month view: start at the earliest known month and produce months until - # the latest known month, perhaps with expandable sections of empty - # months. - - # Details of users to invite to new events could be superimposed on the - # calendar. - # Requests are listed and linked to their tentative positions in the # calendar. Other participants are also shown.