Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def new_item(self):
'''
Create a new TodomanItem and open a TodomanItemDetailsPage in which
the user can edit the new item.
(TodomanItemListPage) -> None
'''
item = TodomanItem(None, self.database, self.generate_label)
new_page = TodomanItemDetailsPage(self.parent, self.callback, item)
self.open_page(new_page)
def item_details(self):
'''
Open a TodomanItemDetailsPage in which the user can edit the selected
TodomanItem.
(TodomanItemListPage) -> None
'''
new_page = TodomanItemDetailsPage(
self.parent,
self.callback,
self.body.focus,
)
self.open_page(new_page)