Giter Site home page Giter Site logo

Comments (4)

last-partizan avatar last-partizan commented on June 11, 2024

We're using django-like blank=True, null=True, and then setting required = not blank.
So, your required=False gets ignored here.

What do you think we chould raise error if user using required or setting blank/null from required?

from django-mongoengine.

saraht129 avatar saraht129 commented on June 11, 2024

Thanks, didn't realise the different parameters there, did I miss the documentation or it's underway?

IMHO, I think it's enough to put examples in the future documentation, instead of raising an error. But I think we should perhaps put blank=True as a default, because ListField is by default an empty list. This will also tally with the default Required=False characteristic of the Django models.

What do you think?

Thanks for maintaining the framework though, you rock.

from django-mongoengine.

last-partizan avatar last-partizan commented on June 11, 2024

AFAIK django doesn't have required at all, that's mongoengine stuff.

so, i've added this little note: https://github.com/MongoEngine/django-mongoengine#fields-notes

from django-mongoengine.

saraht129 avatar saraht129 commented on June 11, 2024

Ahh, you're right. required=False is the mongoengine's default for field.

That note should do for now.

Thanks again!

from django-mongoengine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.