Show More
@@ -70,7 +70,17 b' class NotebookManager(LoggingConfigurable):' | |||
|
70 | 70 | |
|
71 | 71 | def new_notebook_id(self, name): |
|
72 | 72 | """Generate a new notebook_id for a name and store its mappings.""" |
|
73 | # TODO: the following will give stable urls for notebooks, but unless | |
|
74 | # the notebooks are immediately redirected to their new urls when their | |
|
75 | # filemname changes, nasty inconsistencies result. So for now it's | |
|
76 | # disabled and instead we use a random uuid4() call. But we leave the | |
|
77 | # logic here so that we can later reactivate it, whhen the necessary | |
|
78 | # url redirection code is written. | |
|
79 | #notebook_id = unicode(uuid.uuid5(uuid.NAMESPACE_URL, | |
|
80 | # 'file://'+self.get_path_by_name(name).encode('utf-8'))) | |
|
81 | ||
|
73 | 82 | notebook_id = unicode(uuid.uuid4()) |
|
83 | ||
|
74 | 84 | self.mapping[notebook_id] = name |
|
75 | 85 | self.rev_mapping[name] = notebook_id |
|
76 | 86 | return notebook_id |
General Comments 0
You need to be logged in to leave comments.
Login now