title: Data not visible in mongoDB when inserted from PyMongo
body: <p>I am trying to insert data in a mongodb collection from python but the data is not being logged. This is how I am doing it:</p>
  
  <pre><code>from pymongo import MongoClient
  import time
  
  
  class data2db:
  
      def __init__(self):
          pass
      def enter_data(self,data):
          client = MongoClient('127.0.0.1', 27017)
          db = client.db
          coll=db.Temperature1
          post = {"auth": data ,
              "Time" : time.asctime(time.localtime(time.time()))}
          post_= coll.insert(post)
  
  
  c=data2db()
  
  c.enter_data("24.3")
  </code></pre>
  
  <p>When I try to access the data from another method it returns null. This how I do it:</p>
  
  <pre><code>client = MongoClient('127.0.0.1', 27017)
  
  db = client.db
  
  coll=db.Temperature1
  
  print coll.find_one({"_id" : 1})
  
  print coll.find()
  
  listed=str(coll.find({"_id" : 1})).split(' ')
  
  listed=listed[len(listed)-1].split('&gt;')[0]
  
  listed={"_id" : "ObjectID(\""+listed+"\")"}
  
  print coll.find_one(listed)'''
  
  print db.command("collstats", "events")
  </code></pre>
  
  <p>As you can see, I already tried it in different ways but no matter what, it returns null. If I try to access the dbstats, like this:</p>
  
  <pre><code>print db.command("dbstats")
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>{u'extentFreeList': {u'totalSize': 0, u'num': 0}, u'storageSize': 49152, u'ok': 1.0, u'avgObjSize': 64.90566037735849, u'dataFileVersion': {u'major': 4, u'minor': 5}, u'db': u'db', u'indexes': 4, u'objects': 53, u'collections': 6, u'fileSize': 67108864, u'numExtents': 6, u'dataSize': 3440, u'indexSize': 32704, u'nsSizeMB': 16}
  </code></pre>
  
  <p>THe collection is not even showing on mongo commandline. Desperate for help.</p>