Skip to content

Instantly share code, notes, and snippets.

@NagariaHussain
Created November 28, 2022 03:43
Show Gist options
  • Save NagariaHussain/3d2433aecaf97ea9a9759d7e97c2a611 to your computer and use it in GitHub Desktop.
Save NagariaHussain/3d2433aecaf97ea9a9759d7e97c2a611 to your computer and use it in GitHub Desktop.
# Copyright (c) 2022, Hussain and contributors
# For license information, please see license.txt
from my_awesome_app.my_awesome_app.doctype.car.car import MongoDBDocument, get_mongodb_client
class Person(MongoDBDocument):
@staticmethod
def get_collection():
client = get_mongodb_client()
db = client['persons-database']
persons = db.persons
return persons
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment