Django: How can I initialise a Charfield when using Add in an admin form?
I have a Charfield 'status' [with choices = (('A', 'aaa'), ('B', 'bbb'), ('C', ccc开发者_JAVA技巧'),)]
Can I initialise the field in the standard admin form to one of the choices? A drop down appears but no choice is selected by default.
Are you using the default option on the field?
CharField(default='A', choices=(...))
精彩评论