(self, identifier, **kwargs)
Handles recording the user's access.

        Does everything the ``CacheThrottle`` class does, plus logs the
        access within the database using the ``ApiAccess`` model.
Handles recording the user's access.
Handles recording the user s access .
def accessed(self, identifier, **kwargs):
        """
        Handles recording the user's access.

        Does everything the ``CacheThrottle`` class does, plus logs the
        access within the database using the ``ApiAccess`` model.
        """
        # Do the import here, instead of top-level, so that the model is
        # only required when using this throttling mechanism.
        from tastypie.models import ApiAccess
        super(CacheDBThrottle, self).accessed(identifier, **kwargs)
        # Write out the access to the DB for logging purposes.
        url = kwargs.get('url', '')
        if len(url) > 255:
            url = url[:251] + '...'
        ApiAccess.objects.create(
            identifier=identifier,
            url=url,
            request_method=kwargs.get('request_method', '')
        )
def accessed ( self , identifier , * * kwargs ) : # Do the import here, instead of top-level, so that the model is # only required when using this throttling mechanism. from tastypie . models import ApiAccess super ( CacheDBThrottle , self ) . accessed ( identifier , * * kwargs ) # Write out the access to the DB for logging purposes. url = kwargs . get ( 'url' , '' ) if len ( url ) > 255 : url = url [ : 251 ] + '...' ApiAccess . objects . create ( identifier = identifier , url = url , request_method = kwargs . get ( 'request_method' , '' ) )