@Changaco: I think you're right. I had originally moved it in order to access the `add_event` function, but I can just call that from the template.