From 26c009a537eb6da994d0377a78fb0c07337dbe49 Mon Sep 17 00:00:00 2001 From: Drew Larson Date: Sun, 1 Jan 2017 17:28:25 -0600 Subject: [PATCH] Move to class props. --- bikeshop_project/core/models.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/bikeshop_project/core/models.py b/bikeshop_project/core/models.py index 9ffe470..d167290 100644 --- a/bikeshop_project/core/models.py +++ b/bikeshop_project/core/models.py @@ -47,13 +47,20 @@ class Payment(models.Model): class Visit(models.Model): + VOLUNTEER = 'VOLUNTEER' + FIX = 'FIX' + WORKSHOP = 'WORKSHOP' + VISIT = 'VISIT' + DONATE = 'DONATE' + STAFF = 'STAFF' + visit_choices = ( - ('VOLUNTEER', 'volunteer'), - ('FIX', 'fix bike'), # fix - ('WORKSHOP', 'workshop'), - ('VISIT', 'visit'), - ('DONATE', 'donate'), - ('STAFF', 'staff'), + (VOLUNTEER, 'volunteer'), + (FIX, 'fix bike'), # fix + (WORKSHOP, 'workshop'), + (VISIT, 'visit'), + (DONATE, 'donate'), + (STAFF, 'staff'), ) member = models.ForeignKey(