If you want to show only one resource, I would probably create a new resource view (called my_profile) that would invoke a normal detailed view with the user in kwargs and delete the other URLs:
from django.conf.urls import url from tastypie.utils import trailing_slash class ProfileResource(ModelResource): ... def base_urls(self): return [ url(r"^(?P<resource_name>%s)%s$" % (self._meta.resource_name, trailing_slash()), self.wrap_view('dispatch_my_profile'), name="api_dispatch_my_profile") ] def dispatch_my_profile(self, request, **kwargs): kwargs['user'] = request.user return super(ProfileResource, self).dispatch_detail(request, **kwargs)
source share