Posts Categorised as: Python

Using Django formsets on a new section for a project at work I came across something I haven't considered before: adding new inline forms to a formset without reloading the page. Javascript was the obvious choice. Two pages required the functionality: one with six formsets, the other with one, which meant the solution needed to take into account formset prefixes. I found various solutions around the Internet, but all were outdated (lots of table based layouts!) or not generic enough (didn't deal with multiple formsets).

Nose Tests - no such option

Posted on: Apr 30 2011

Some time ago now I added proper command line options to Tv Renamr, followed shortly by a test suite with Python's Nose. Along the way I ran into a bug that has frustrated me for a long long time, until today when I finally found a work around - hooray, go me!

The bug is hardly a game stopper as it only affects the UI candy on my tests. Simply put, I couldn't use options with nose. Every time I did, an error was thrown saying no such option existed for nose while displaying the usage string for tvr: