Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Nesting Choices #14

Closed
bryanveloso opened this Issue · 3 comments

2 participants

@bryanveloso

I'm in the process of converting a bunch of choice tuples to Choices. Currently I nest them to make them easier to read in the admin:

BOOK_TYPES = (
    ('"Photo" Books', (
        (PHOTOBOOK, 'Photobook'),
        (LIVE_PHOTOBOOK, 'Live Photobook'),
        (PHOTO_COLLECTION, 'Photo Collection')
    )),
    ('Other', (
        (ESSAY, 'Essay Book'),
        (OFFSHOT, 'Off-Shot'),
        (OTHER, 'Other')
    ))
)

Is there a way to do this with Choices?

@carljm
Owner

Hmm, I'm afraid not, I'd never really used or been aware of the nested option (though I should have, that's really handy). I'm afraid it would require some significant surgery to Choices to add that capability; not opposed to such a thing, but not likely to write it any time soon.

@bryanveloso

Fair enough! Thanks Carl!

@carljm
Owner

Fixed in 2e44f1c

@carljm carljm closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.