test getting from db and inserting into template