Using dict method to pass value from model to view