question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Mongoengine EmbeddedDocumentListField not displayed

See original GitHub issue
class Room(Document):
    images = EmbeddedDocumentListField(EmbeddedRoomImages)

class EmbeddedRoomImages(EmbeddedDocument):
    position = IntField()
    image = ImageField(size=(1920, 950), thumbnail_size=(640, 316))
    is_main = BooleanField()
    is_enabled = BooleanField()
    image_big_link = StringField()
    image_thumb_link = StringField()

capture

So nothing is to add and why ?

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
bekab95commented, May 22, 2018

@david81brs

I know that solution but as others suggest EmbeddedDocumentListField is much more efficient and it works without flask admin and i need it to work with flask admin too…

1reaction
david81brscommented, May 22, 2018

How about:


class EmbeddedRoomImages(EmbeddedDocument):
    position = IntField()
    image = ImageField(size=(1920, 950), thumbnail_size=(640, 316))
    is_main = BooleanField()
    is_enabled = BooleanField()
    image_big_link = StringField()
    image_thumb_link = StringField()

class Room(Document):
    images = ListField(EmbeddedDocumentField(EmbeddedRoomImages))

Don’t forget to import ListField. :bowtie:

Read more comments on GitHub >

github_iconTop Results From Across the Web

Mongoengine EmbeddedDocumentListField // I can only ...
This returns the object named editAdult with the attributes as expected but not the methods. I now want to update the values in...
Read more >
MongoEngine Fields Ep 3C: EmbeddedDocumentListField
Part 3b of 7: Concentrating on MongoEngine's EmbeddedDocumentListField, which handles lists of dictionaries. … Show more. Show more ...
Read more >
Learn how to work with embedded document in mongoengine
Learn how you can work with embedded document, when you are working in mongoengine odm framework, embedded document its a very nice way...
Read more >
3. API Reference — MongoEngine 0.10.5 documentation
If this is set to False then indexes will not be created by MongoEngine. ... when using the EmbeddedDocumentListField to store a list...
Read more >
mongoengine.fields — SwissText documentation
__init__(**kwargs) def validate(self, value): # Check first if the scheme is valid scheme = value.split('://')[0].lower() if scheme not in self.schemes: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found