Rack.status to slug (#3569)

This commit is contained in:
Jeremy Stretch
2019-11-15 21:28:34 -05:00
parent 62b45494b6
commit 8d27b62114
6 changed files with 68 additions and 21 deletions

View File

@@ -1,5 +1,33 @@
from utilities.choices import ChoiceSet
from .constants import *
#
# Racks
#
class RackTypeChoices(ChoiceSet):
TYPE_2POST = '2-post-frame'
TYPE_4POST = '4-post-frame'
TYPE_CABINET = '4-post-cabinet'
TYPE_WALLFRAME = 'wall-frame'
TYPE_WALLCABINET = 'wall-cabinet'
CHOICES = (
(TYPE_2POST, '2-post frame'),
(TYPE_4POST, '4-post frame'),
(TYPE_CABINET, '4-post cabinet'),
(TYPE_WALLFRAME, 'Wall-mounted frame'),
(TYPE_WALLCABINET, 'Wall-mounted cabinet'),
)
LEGACY_MAP = {
TYPE_2POST: 100,
TYPE_4POST: 200,
TYPE_CABINET: 300,
TYPE_WALLFRAME: 1000,
TYPE_WALLCABINET: 1100,
}
#