From: Thomas Guettler <h...@tbz-pariv.de>
Date: Wed, 04 Apr 2012 15:55:13 +0200
Local: Wed, Apr 4 2012 9:55 am
Subject: Re: Proposal: upgrading the choices machinery for Django
Am 03.04.2012 21:31, schrieb Łukasz Langa:
> A nice HTML rendering of this proposal is available at: since most people have something like this in their code, a better solution should require > http://lukasz.langa.pl/2/upgrading-choices-machinery-django/ > ========================================== only some additional characters. GENDER_CHOICES = ( # if this would be supported, updating the code would be easy #about Group I don't like Choices.Group. I think it is better if choices must be set explicit, not Here is my solution, which is similar to way3 in your proposal. {{{ class ChoiceDict(SortedDict): class Foo(models.Model): }}} I like this since, you can access the verbose string like this: Foo.states[obj.state] -- You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||