I
I
Iskander Mammadov2015-02-12 19:14:15
Django
Iskander Mammadov, 2015-02-12 19:14:15

How to add city selection in Django models?

There is a certain model, you need to add a field (preferably in the form of a drop-down list of cities) so that the administrator can assign a value to this field by selecting an item from the drop-down list.
How can such a thing be implemented?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stanislav Fateev, 2015-02-12
@svfat

Use ChoiceField

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question