Hell this is ugly. We shouldn't generate markup in Python code. Please fix. (use templates)