R
R
reus2017-02-21 18:04:20
Django
reus, 2017-02-21 18:04:20

Question about database fields?

Tell. There was a need to divide the model of phone numbers into cities. Tobish has a table with numbers and you need to attribute the number to the city. But there is a catch, one number can be used in several cities at once, so just adding a field to the model will not get rid of it. Tell me what can be done

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sim3x, 2017-02-21
@sim3x

city = models.ManyToMany('City')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question