generate_ap works basically with first tornado template