Category Archives: Python

Testable triggers for SouthPaw Tactic.

The last six months have been spent working on a project based around the recently open-sourced Tactic.  One issue we came up against during the project was being able to easily develop and test custom triggers. Custom triggers are simply python scripts that have a couple of extra magic variables (server, input), ignoring the fact …


Continue reading

PyCharm and Nosetests

I have to say that this is really really un-obvious, but after a lot of trying (or a wasted hour) here is the solution. I have a folder in my Denim project called tests (I’m sure you can guess what is in that folder…) from the command line running all the tests in that folder …

Continue reading

Running Django tests in PyCharm for standalone apps

Over the last couple of years I have created several Django projects designed to be standalone apps. While it’s not to hard to create a custom test running to handle unit tests using: This technique unfortunately does not integrate very well into PyCharm’s built in testing tools (you also cannot debug). You can however trick PyCharm …

Continue reading

XCSS Parser

Working with CSS can be painful at times, and while there is the option of switching to SASS or similar I personally find these more even more annoying. Being able to quickly preview your work is useful. CSS does actually have a few built in constructs to break up work better @import does allow you …

Continue reading

Django Ajax form's updated

With the release of Django 1.2 the newforms module has had a re-factor, with validation pulled out into its own module (django.core.validation). Changes where required to the form introspection code that works out what validation is required client site. The upshot of these changes is that generating a JSON representation of the rules now requires …

Continue reading