O'Reilly logo

Python 3 Web Development Beginner's Guide by Michel Anders

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action editing an instance

We also want to open a form that will allow the user to edit an existing instance when double-clicked in the browse list. In the stripped down application that we created in the previous section, we merely created the ContactBrowser class as a subclass of Browse. If we want to add an additional double-click handler to the browse list element, we will have to override the index() method.

In the definition of the ContactBrowser class, add the following to the definition of the index() method (the complete code is available as crmcontactedit.py):

Chapter8/crmcontactedit.py

 @cherrypy.expose def index(self, _=None, start=0, pattern=None, sortorder=None, cacheid=None, next=None, previous=None, first=None, last=None, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required