Gregor Müllegger's Weblog
Do you know how to debug your python code? I usually do the following in my code to set something like a hardcoded breakpoint:
import pdb; pdb.set_trace();
This will bring up a
pdb prompt when the code execution reaches this line.
pdb is a bit limited since it doesn't support code completion,
syntax highlighting and so on.
So here is how you make your debug prompt more fancy by using ipython's debugger.
You know what WebSockets are? It's a new web protocol for bidirectional connections between the browser and your application server. This is a huge win over AJAX and plain HTTP since you don't need to establish a new connection for every tiny message.
Like TCP socket but for the web.
It's an exciting new technology - so I started experimenting with WebSockets and with my favourite webframework Django. Here is what I came up with, bundled into a reusable app called django-websocket.
Unfortunatelly the code in his blog post is not working anymore exactly like this. Django has changed its internal structure of its default test runner. So here is how you can get
setup.py test working today.
I work as a freelancer and do many django related projects. My clients care in most cases very much about django's admin site and want to have it customized in many different ways.
One client even has a django project that uses the admin site as only frontend. It's an intranet CRM system - but they need to assigned every employee change permissions because every user must be able to view every entry.
Since django doesn't support read permissions in the admin this was the only way to do it. Here is a quick-and-dirty fix without creating extra views for readonly pages, extra templates etc.
I recently bought a cute little ASUS EEE 1101HA. The first thing I've done after receiving it was installing the latest Ubuntu version. So I hoped the best. But after trying some things and searching the Internet it seems that the Linux support for this netbook really sucks.
Display isn't working very well, multitouch touchpad doesn't work, microphone doesn't work properly and so on. I expected to have some small issues which I need to solve, but this was too much.
I decided to sell it again - but usually customers aren't that happy if you promise them a WinXP netbook but they receive one with a broken ubuntu ;-)
So I needed to do reinstall windows xp from the recovery DVD. This isn't as easy as it sounds, since the netbook has no optical drive.
csync is not available in the Ubuntu repositories and there are no
.deb packages available on
csync's website you have to compile it yourself from source. It's nearly straight forward but there were a few issues I ran into. Maybe this short walkthrough help you to make the installation of
csync as easy as possible.
Unittests are like a warm blanket you can wrap yourself into if you need to go out into the codeforest to refactor
Feel free to contact me if you have question about my life, my work or my projects.