Django Model Choices Field

Descripción

Add a field with choices to a model


File Template: ❌


Prefix

dj:model:choices


Scopes

python


Snippet de código

${1:status} = models.CharField(
	max_length=20,
	choices=[('${2:draft}','Draft'), ('${3:published}','Published')],
	default='${2:draft}'
)