<reponame>LYQCOOL/xinhua<filename>huancun.py<gh_stars>1-10
# coding: utf-8

import pymongo

class huanCun(object):
    def __init__(self):
        client = pymongo.MongoClient('localhost', 27017)
        '''client = pymongo.MongoClient('192.168.127.12', 50070)'''
        db = client['news']
        self.collection_zhuizong = db['zhuiZong']
    def put_zhuizong(self, value):
        return self.collection_zhuizong.save(value)


# coding: utf-8

import pymongo

class huanCun(object):
    def __init__(self):
        client = pymongo.MongoClient('localhost', 27017)
        '''client = pymongo.MongoClient('192.168.127.12', 50070)'''
        db = client['news']
        self.collection_zhuizong = db['zhuiZong']
    def put_zhuizong(self, value):
        return self.collection_zhuizong.save(value)
# coding: utf-8 client = pymongo.MongoClient('192.168.127.12', 50070)