djongo
djongo copied to clipboard
EmbeddedField with Django Admin
One line description of the issue
I'm trying use EmbeddedField. Perhaps an I do a mistake?
Python script
from djongo import models
class Language(models.Model):
CODE_LANG_CHOICES = (
('en', 'English'),
('pt', 'Portuguese'),
)
DIRECTION_CHOICES = (
('ltr', 'Left-to-right'),
('rtl', 'Right-to-left'),
)
code = models.CharField(max_length=2, choices=CODE_LANG_CHOICES, default='en')
direction = models.CharField(max_length=3, choices=DIRECTION_CHOICES, default='ltr')
def __str__(self):
return f'{self.code}'
class Meta:
abstract = True
class Campaign(models.Model):
name = models.TextField()
language = models.EmbeddedField(model_container=Language)
Traceback

Django==2.2.16
sqlparse==0.2.4
git+https://github.com/nesdis/djongo.git@master#egg=djongo
djangorestframework==3.12.1
Python 3.6.12 MongoDB 3.6
Related https://github.com/nesdis/djongo/issues/115
I think this post at Google Group are related too.
Bounty of $15 at https://www.bountysource.com/issues/93727997-embeddedfield-with-django-admin
Exists a bug in 1.3.3, after downgrading to 1.3.1 works.
The bounty continues for those who resolve the issue in version 1.3.3.
@brunowego The Bounty is closed now, did you solve this?
@brunowego I will reopen. Have a problem with the version 1.3.3.
Exists a bug in 1.3.3, after downgrading to 1.3.1 works.
What do u mean with 1.3.1? Version of what? thx
@drandredev put in your requirements.txt
the version of 1.3.1 of Djongo.
Same problem. Running 1.3.3 djongo, 4.2 mongodb, 3.0.3 Django
Same problem here too. I get Abstract models cannot be instantiated.
on the admin site.
Downgrading djongo to 1.3.1 does not help me as my project is on Django 3.1.12, and djongo 1.3.1 requires Django version<2, Please suggest some fix.
I still have this issue and am running djongo 1.3.6.
@brunowego This is occurring for me except with lists using djongo 1.3.6. My version of django (3.1.2) won't allow for me to downgrade djongo. Is anyone on this, yet?
Yeah, I have the same issue
Same Issue now, any fix?
Same Issue, any fixes??
bruh