djongo icon indicating copy to clipboard operation
djongo copied to clipboard

EmbeddedField - TypeError: Abstract models cannot be instantiated.

Open dusan91judo opened this issue 2 years ago • 4 comments

Hi, there is still an issue for Embedded fields. Is there any way that this is going to be fixed ?

My requirements.txt

Django==4.0.1 djangorestframework==3.12.2 djongo==1.3.6 pymongo==3.12.1 pytz==2021.3

class CommercialProjectDocument(models.Model):
    tax = models.ArrayField(model_container=Tax, null=True, help_text='taxes')

    class Meta:
        abstract = True


class Project(models.Model):
     _id = models.ObjectIdField(help_text='Unique identifier')
     document = models.EmbeddedField(model_container=CommercialProjectDocument, null=True, default=None)

When I'm trying to query and serialize project I'm getting issue about abstract = True property. Does this library is no longer maintained, since this is well known issue for long time ?

dusan91judo avatar Mar 21 '22 08:03 dusan91judo

Djongo only works with django up to 3.1

DominicLGit avatar Apr 13 '22 15:04 DominicLGit

Unfortunately this issue still seems to exist (Django version 4.0.1 and 4.0.5).

thascius-rumpelschnick avatar Jun 26 '22 15:06 thascius-rumpelschnick

@nesdis when this version will be available in pypi?

jrgrez avatar Jul 14 '22 14:07 jrgrez

I have this problem with django==4.1.8 and djongo==1.3.6. Is the fix or workaround available?

kurkurzz avatar Apr 19 '23 16:04 kurkurzz