Я хочу создать объект модели для хранения нескольких телефонных номеров. Я использую CollectionField, но получаю ошибку
File "/home/shiv/.local/lib/python3.7/site-packages/collectionfield/models/fields.py", line 226, in contribute_to_class
cls, name, virtual_only=virtual_only
TypeError: contribute_to_class() got an unexpected keyword argument 'virtual_only'
вот мои models.py
from django.db import models
from multiselectfield import MultiSelectField
from django.utils import timezone
from collectionfield.models import CollectionField
class Applications(models.Model):
country = models.ForeignKey(Country, on_delete=models.SET_NULL, null=
state = models.ForeignKey(State, on_delete=models.SET_NULL, null=True)
city = models.ForeignKey(City, on_delete=models.SET_NULL, null=True)
zone = models.CharField(max_length=10, choices=zone_choice, blank=True)
name = models.CharField(max_length=20)
phone_number = CollectionField()
email_id = models.EmailField()
home_address = models.CharField(max_length=255, blank=True, null=True)
birthdate = models.DateField(null=True, blank=True)
def __str__(self):
return str(self.name)