Hi Dick,
Consider declaring model field by:
https://docs.djangoproject.com/en/3.0/ref/models/fields/#field-choices-named-groups
and template settings
On Thu, Jan 30, 2020, 02:13 Bernhard Dick wrote:
> Hi,
>
> I'm having trouble with the template-side when I'm converting my code to
> make
Hi,
I'm having trouble with the template-side when I'm converting my code to
make use of the in version 3 introduced IntegerChoices-Class and I'd like
to get some tips on doing it right.
My version 2 Code looks like this:
class StateModel(models.Model):
STATE_DRAFT = 0
STATE_PUBLISHED
2 matches
Mail list logo