from mongoengine import *
import mlab

class Customer(Document):
    name = StringField()
    age = StringField()
    address = StringField()
    ref = StringField()
    meta = {'collection': 'customers', "strict": False}

mlab.connect()

customer_list = Customer.objects
# for ref in customer_list:
#     print (len(ref))

print(len(customer_list(ref__icontains="ads")))
print(len(customer_list(ref__icontains="wom")))
print(len(customer_list(ref__icontains="events")))



e01c5fcb83663a742296c1f30e3e97a13c95d463
<mask token>


class Customer(Document):
    name = StringField()
    age = StringField()
    address = StringField()
    ref = StringField()
    meta = {'collection': 'customers', 'strict': False}


<mask token>

<mask token>


class Customer(Document):
    name = StringField()
    age = StringField()
    address = StringField()
    ref = StringField()
    meta = {'collection': 'customers', 'strict': False}


mlab.connect()
<mask token>
print(len(customer_list(ref__icontains='ads')))
print(len(customer_list(ref__icontains='wom')))
print(len(customer_list(ref__icontains='events')))

<mask token>


class Customer(Document):
    name = StringField()
    age = StringField()
    address = StringField()
    ref = StringField()
    meta = {'collection': 'customers', 'strict': False}


mlab.connect()
customer_list = Customer.objects
print(len(customer_list(ref__icontains='ads')))
print(len(customer_list(ref__icontains='wom')))
print(len(customer_list(ref__icontains='events')))

from mongoengine import *
import mlab


class Customer(Document):
    name = StringField()
    age = StringField()
    address = StringField()
    ref = StringField()
    meta = {'collection': 'customers', 'strict': False}


mlab.connect()
customer_list = Customer.objects
print(len(customer_list(ref__icontains='ads')))
print(len(customer_list(ref__icontains='wom')))
print(len(customer_list(ref__icontains='events')))

from mongoengine import *
import mlab

class Customer(Document):
    name = StringField()
    age = StringField()
    address = StringField()
    ref = StringField()
    meta = {'collection': 'customers', "strict": False}

mlab.connect()

customer_list = Customer.objects
# for ref in customer_list:
#     print (len(ref))

print(len(customer_list(ref__icontains="ads")))
print(len(customer_list(ref__icontains="wom")))
print(len(customer_list(ref__icontains="events")))


