Category Archives: Code

Adjust Thread for using in-memory sqlite in tests

If you are using in memory sqlite database for running tests, as Django does, you will find trouble covering Python code that uses threading and reads or writes into the database in the thread routine.

Best mobile personal finance app

On my quest to finding the best personal finance mobile application.

Path of lost file – ZODB Blobstorage

I had a task the other day of finding out the disk path of a broken blob file. I am using Zope2.12.23 with ZODB 3.9.7, python 2.6.

How to remove Wikipedia SOPA Blackout

I’m a supporter of Wikipedia. I use their data and I think it’s a great project (especially since it’s non-profit!) and I advise you to make a tiny donation once a year, every cent counts!. But anyway, since you’re here and you’re an honest user, I want to show you a quick trick to escape [...]

zope: Changing i18n domain for any view

This is the result of researching for almost two days and coming up with a two-line solution.

Cool terminal – Tilda

This is a drop-down terminal that can save you time when switching from debug console to application instance.

Zenburn color theme for gnome-terminal

I am actually quoting ynef on ubuntuforums.org. I am not very confident on information availability in forums, so I’d rather mention and copy it here.

Test object from ZODB is broken in Zope

All you Zopers out there, this is how you can test, in code, whether an object from database is broken or not:

Onkeyup ajax call speed trap

This is one good practice in using events on keyup event (when a key is released when user types in a form field). If the event is making an ajax request, this could lower the number of requests made to your web server.

Can I create classes that inherit Model classes in Django?

Yes, you can, and that is the correct way to separate extra custom logic, while still having access to specific model methods like initializer, filters, getters and save().