E
E
Ed10242016-01-30 13:13:48
Django
Ed1024, 2016-01-30 13:13:48

Why is the drop-down list not working in the administrative module?

Can't select value in dropdown box

from django.db import models

gender_choices = [
  (1, "man"),
  (2, "woman")
]

class User(models.Model):
  name = models.CharField(max_length = 100)
  mail = models.CharField(max_length = 100)
  gender = models.CharField(max_length = 1, choices = gender_choices, default = 1)  #с этим полем что то не так
  age = models.IntegerField()

af8ef6ee10db4f6b8ff06f5892972f28.png

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question