'Kwargs here represent uri identifiers Ex: /repos/<user_id>/<repo_name>/
We need to turn those identifiers into Python objects for generating
lookup parameters that can find them in the DB'

def lookup_kwargs_with_identifiers(self, bundle, kwargs):

    lookup_kwargs = {}
    bundle.obj = self.get_object_list(bundle.request).model()
    bundle.data.update(kwargs)
    bundle = self.hydrate(bundle)
    for identifier in kwargs:
        if (identifier == self._meta.detail_uri_name):
            lookup_kwargs[identifier] = kwargs[identifier]
            continue
        field_object = self.fields[identifier]
        if (field_object.readonly or field_object.is_related or (not field_object.attribute)):
            continue
        method = getattr(self, (u'hydrate_%s' % identifier), None)
        if method:
            bundle = method(bundle)
        lookup_kwargs[identifier] = field_object.hydrate(bundle)
    return lookup_kwargs
