def get_collection(self, request):
        try:
            # If no owner is specified in the request, we use the default from settings for now
            # moving forward, we'll want to remove this fallback and require that the owner is specified
            # from the owner uuid, we're looking up the internal identifier from the corresponding profile
            #pdb.set_trace()
            database = None
            if (request and "datastore_owner__uuid" in request.GET):
                profile, created = Profile.objects.get_or_create(uuid = request.GET["datastore_owner__uuid"])
                database = profile.getDBName()
            return db[database][self._meta.collection] if database is not None else None
        except AttributeError:
            raise ImproperlyConfigured("Define a collection in your resource.")
generated source for method __init__
dataset/ETHPy150Open HumanDynamics/openPDS/openpds/tastypie_mongodb/resources.py/MongoDBResource.get_collection--crossover with--dataset/ETHPy150Open CarterBain/Medici/ib/ext/ContractDetails.py/ContractDetails.__init__