djapiauth/models.py
def permission_check(apikey, endpoint):
        """
        return (user, seckey) if url end point is in allowed entry point list
        """
        try:
            ak = APIKeys.objects.get(apikey=apikey)
            apitree = cPickle.loads(ak.apitree.encode("ascii"))
            if apitree.match(endpoint):
                return ak.user if ak.user else AnonymousUser(), ak.seckey
        except APIKeys.DoesNotExist:
            pass
        return None, None
def permission_check(apikey, endpoint):
        """
        return (user, seckey) if url end point is in allowed entry point list
        """
        try:
            ak = APIKeys.objects.get(apikey=apikey)
            apitree = cPickle.loads(ak.apitree.encode("ascii"))
            if apitree.match(endpoint):
                return ak.user if ak.user else AnonymousUser(), ak.seckey
        except APIKeys.DoesNotExist:
            pass
        return None, None
return (user, seckey) if url end point is in allowed entry point list