fix bug with relation in create template for pyramid ext.