#!/usr/bin/env python
"""
signapp.py 
created by Rolly Maulana Awangga

"""



class Signapp(object):
	def __init__(self):
		self.npm=0

	def getdata(self,NPM): 
		self.data=NPM
		return self.data
	
	def getlastmeet(self,NPM):
		self.last=NPM
		return self.data


#!/usr/bin/env python
"""
signapp.py 
created by Rolly Maulana Awangga

"""
import config
import pymongo

class Signapp(object):
	def __init__(self):
		self.opendb()

	def opendb(self): 
		self.conn = pymongo.MongoClient(config.mongohost, config.mongoport)
		self.db = self.conn.signapp
	
	def getAllSign(self,NPM):
		self.db.sign
		return self.db.sign.find({"NPM":NPM})
	
	def getLastSign(self,NPM)
		self.db.sign
		return self.db.sign.find_one({"NPM":NPM})
	
	def insertSign(self,NPM,Nilai,rcvdate)
		self.db.sign
		data = {"NPM":NPM,"Nilai":Nilai,"waktu":rcvdate}


add mongo crud