Code migration from 0.5.2 to 0.6

In order to migrate your applications to Porcupine 0.6 you need to apply the following changes:

1. "HttpContext.current()" is deprecated. Use "from porcupine import context" instead.

2. Remove all "__slots__" class attributes from all of your schema related classes including content classes and custom data types.

3. "" is deprecated. Use "porcupine.utils.permsresolver.get_access" instead.

4. You no longer have to pass as an argument the transaction handle to transactional API calls. For instance, "self.delete(txn)" should be replaced with "self.delete()".

5. QuiX boxes are no longer automatically redrawn when removing a child widget. The developer should take care of this.

6. "QuiX.getOS" is deprecated. Use "QuiX.utils.BrowserInfo.OS" instead.

7. Most of the camelCase API calls are deprecated due to PEP 8 alignment. Check the server's log for deprecated calls and change the code accordingly.

8. Decorate all of your custom content classes' methods that update the database with the "@porcupine.db.requires_transactional_context" decorator.

9. Update all of your JavaScript files in order to use the new QuiX namespaces. To name a few all occurences of "XButton" should be replaced with "QuiX.ui.Button", "XMLRPCRequest" should be replaced with "QuiX.rpc.XMLRPCRequest".

10. The "orderBy" and "sortOrder" attributes of QuiX list views are now private and apart from being renamed they should never be changed. The arguments passed to the "sortfunc" function of a list view are the list view object, the order by field and the sort order.

Clicky Web Analytics