Recently some work has been done to extend the hooks support in TurboGears, to play a little with the new hooks I decided to try creating the famous and envied Django Debug Toolbar. I’m quite happy of the result and most of the features are there. In a few days I’ll be able to place it on a public repository and I’ll release it concurrently with the 2.1.4 release of TurboGears. The code has been heavily inspired by the Pyramid Debug Toolbar and have to thank the Pyramid team for the good job they did at making the Toolbar code clean and simple.
As recently some effort has been involved in improving the performances of TurboGears2, I was curious to see how much things improved. As usually, the test isn’t really reliable in any way and was just for fun. All the graphs report the request/sec the application has been able to perform on my computer with only 1 concurrent client. So higher is better. Here is the comparison between TG2.0 and TG2dev (will be 2.1.4) I also compared various setups with different template engines on TG2dev The comparison happened on an application similar to the quickstarted one. Actually as there is no database involved in this application the template engine impacts a lot and so was a good benchmark for the template […]
New features introduced are: Assets manager, Upload your videos and images using the Asset manager instead of the RDisk if you want to create slices from them. Assets manager will also create thumbnails for everything and will convert the videos to support HTML5 BlogPost view (an HTML view with a title) Attributes for Pages and Slices Hide Pages from menu with hidden=1 attribute Reorder Pages in menu menu-weight attribute Add metatag description to pages with description attribute Automatic Database migrations, never care about changes to the schema when you upgrade acr again, it will be automatically upgraded by acr itself on first visit Hide edit bars in edit mode to view the slice as a standard visitor Abstraction layer for […]
After a reflection moment caused by the need to think what will follow after the pylons and repoze.bfg merge in pyramid the TurboGears2 team has decide to gather up all its forces and give to TurboGears2 its own independent life. The first steps have been oriented to improve the framework reliability and brought to life the TurboGears continuous integrations system and a standard project release process. After a few months of work 2.1.1 has been released and it brings many fixes and improvements, 2.1.2 is under its way and a 2.2 release with major improvements is already planned! TG2 Core: * Fixed dependencies for Python 2.4. Now any packages that are needed are automatically installed. * Updated package requirements as […]
Want to handle long operations in your web application without having your users wait for minutes? If you are using turbogears2 you might find tgext.asyncjob useful. Asyncjob extension provides background method calls and helpers to manage your database queries in the asynchronous functions. Makes also easy to implement an AJAX progress bar for your long running operations.
We just released tgext.mobilemiddleware for turbogears2 to make easier to handle templates for mobile devices and detect mobile devices requests. Indeed it is quite simple to use as it makes possible just to register a different template by using @expoe_mobile decorator which will be used for mobile devices, making possible to create mobile version of web page by using for example jquery mobile
Spent some time renewing the ACRCms web page, I was a bit tired of the old style and wanted something more structured, so here is the new look and feel. Hope everyone enjoys it
While I’m not sure if it is a good or really stupid idea I decided to start trying to implement a RPC library on the redis database. In theory it should be a good idea as you can have a very fast and persistent multi-consumer queue of tasks (like rabbit-mq or other AMQP) which can be worked out to also give answers back. Also using redis permits to quickly distribute work over multiple servers by simply running another server without any change to the code itself. If you want to check REPC (yes, this is the only name I have been able to think of…), you can take a look at https://github.com/amol-/repc Serialization format for data is JSON just because […]
Recently while coding a game/scene library for Canvas I had the idea of implementing pixel perfect collision by using an offscreen canvas where to draw the two objects alone and check if they collide. This can be easilly done with the source-in/destination-in composite operation. If any pixel of the offscreen canvas if not white then the two objects collide. It seems a great idea, but I had a bad surprise when testing it on Chrome and Safari. Indeed it seems that source-in and destination-in have been differently intended on webkit. I find the Mozilla implementation more useful, but as the Canvas 2D specifications are written it is difficult to understand what they mean by Display the source image wherever both […]
It seems that one of the main problems with websites on iPad when handling with a lot of images is the limited memory reserved for images. If you have a lot of big images you will start seeing white boxes instead of your pictures when viewing the site on the iPad. It seems somehow that Safari for iOS ignores the memory limit for background images, so you can consider substituting your img with divs with background-image to avoid hitting against the limit. This is also valid for iOS Applications that use UIWebView.