Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the ArrayField error :Abstract models cannot be instantiated #698

Open
weijchun opened this issue Jul 23, 2024 · 0 comments
Open

the ArrayField error :Abstract models cannot be instantiated #698

weijchun opened this issue Jul 23, 2024 · 0 comments

Comments

@weijchun
Copy link

class Option(models.Model):
"""
"""
lr = models.CharField()

class Meta:
    abstract = True

def __str__(self):
    return self.lr

class StudentsModel(models.Model):
"""
"""
name = models.CharField('name',default='',max_length=10)
lrs = models.ArrayField(model_container=Option,blank=True)

class Meta:
    db_table = "cblue_students"

def __str__(self):
    return self.name

required:
python3.9.19
django4.1.13
djongo1.3.6
pymongo3.12.1
mongodb6.0.16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant