Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(7)  |  Call(5)  |  Derive(0)  |  Import(2)
Allows multiple select

src/f/l/flask-mongoengine-0.7.0/flask_mongoengine/wtf/orm.py   flask-mongoengine(Download)
from mongoengine import ReferenceField
 
from flask.ext.mongoengine.wtf.fields import ModelSelectField, ModelSelectMultipleField, DictField, NoneStringField, BinaryField
from flask.ext.mongoengine.wtf.models import ModelForm
 
    def conv_List(self, model, field, kwargs):
        if isinstance(field.field, ReferenceField):
            return ModelSelectMultipleField(model=field.field.document_type, **kwargs)
        if field.field.choices:
            kwargs['multiple'] = True

src/f/l/flask-mongoengine-HEAD/flask_mongoengine/wtf/orm.py   flask-mongoengine(Download)
from mongoengine import ReferenceField
 
from flask.ext.mongoengine.wtf.fields import ModelSelectField, ModelSelectMultipleField, DictField, NoneStringField, BinaryField
from flask.ext.mongoengine.wtf.models import ModelForm
 
    def conv_List(self, model, field, kwargs):
        if isinstance(field.field, ReferenceField):
            return ModelSelectMultipleField(model=field.field.document_type, **kwargs)
        if field.field.choices:
            kwargs['multiple'] = True

src/g/a/gae-flask-todo-HEAD/lib/flask_admin/contrib/mongoengine/form.py   gae-flask-todo(Download)
 
            doc_type = field.field.document_type
            return mongo_fields.ModelSelectMultipleField(model=doc_type, **kwargs)
 
        if field.field.choices:

src/f/l/Flask-Admin-1.0.8/flask_admin/contrib/mongoengine/form.py   Flask-Admin(Download)
            # TODO: Support AJAX multi-select
            doc_type = field.field.document_type
            return mongo_fields.ModelSelectMultipleField(model=doc_type, **kwargs)
 
        # Create converter

src/f/l/flask-admin-HEAD/flask_admin/contrib/mongoengine/form.py   flask-admin(Download)
            # TODO: Support AJAX multi-select
            doc_type = field.field.document_type
            return mongo_fields.ModelSelectMultipleField(model=doc_type, **kwargs)
 
        # Create converter