b316b2f4a3
* controller.Notebooks now takes (and stores) an https_url constructor parameter. * New controller.Notebooks.updates() method to produce an updates RSS feed for a particular notebook. * New controller.Notebooks.get_update_link() method to make a brief page with just a link for an updated note, referred to by the feed. * Implemented views for the new RSS feed. * Fixed bug in Rss_item's guid that caused newlines to be inserted before and after long URLs. * Still need to unit test new controller code.
29 lines
789 B
Python
29 lines
789 B
Python
from Tags import Html, Head, Title, Body, A
|
|
|
|
|
|
class Update_link_page( Html ):
|
|
def __init__( self, notebook_id, notebook_name, note_id, https_url ):
|
|
if notebook_name == u"Luminotes":
|
|
notebook_path = u"/"
|
|
elif notebook_name == u"Luminotes user guide":
|
|
notebook_path = u"/guide"
|
|
elif notebook_name == u"Luminotes blog":
|
|
notebook_path = u"/blog"
|
|
else:
|
|
notebook_path = u"/notebooks/%s" % notebook_id
|
|
|
|
notebook_path = https_url + notebook_path
|
|
|
|
Html.__init__(
|
|
self,
|
|
Head(
|
|
Title( "Note updated" ),
|
|
),
|
|
Body(
|
|
u"A note in ",
|
|
A( u"this notebook", href = notebook_path ),
|
|
u"has been updated.",
|
|
A( u"View the note.", href = u"%s?note_id=%s" % ( notebook_path, note_id ) ),
|
|
),
|
|
)
|