{"action":"created","issue":{"url":"https://api.github.com/repos/jonykalavera/django-tastypie-batch/issues/1","repository_url":"https://api.github.com/repos/jonykalavera/django-tastypie-batch","labels_url":"https://api.github.com/repos/jonykalavera/django-tastypie-batch/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/jonykalavera/django-tastypie-batch/issues/1/comments","events_url":"https://api.github.com/repos/jonykalavera/django-tastypie-batch/issues/1/events","html_url":"https://github.com/jonykalavera/django-tastypie-batch/issues/1","id":141019861,"number":1,"title":"Integration with django-tenant-schemas","user":{"login":"slackmart","id":1746954,"avatar_url":"https://avatars.githubusercontent.com/u/1746954?v=3","gravatar_id":"","url":"https://api.github.com/users/slackmart","html_url":"https://github.com/slackmart","followers_url":"https://api.github.com/users/slackmart/followers","following_url":"https://api.github.com/users/slackmart/following{/other_user}","gists_url":"https://api.github.com/users/slackmart/gists{/gist_id}","starred_url":"https://api.github.com/users/slackmart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slackmart/subscriptions","organizations_url":"https://api.github.com/users/slackmart/orgs","repos_url":"https://api.github.com/users/slackmart/repos","events_url":"https://api.github.com/users/slackmart/events{/privacy}","received_events_url":"https://api.github.com/users/slackmart/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-15T16:01:41Z","updated_at":"2016-05-01T13:39:40Z","closed_at":null,"body":"Recently, I've integrating django-tenant-schemas in a project which use this library to make batch requests and this exception was thrown:\r\n\r\n    Request URL: http://testserver/api/v1/brand/?limit=5\r\n    Raised by: tastypie.resources.wrapper\r\n\r\n    No tenant for hostname \"testserver\"\r\n\r\nWith the django-tenant-schemas integration, the requests are hoped to be issued to the `schema-name.example.com`\r\n\r\nBy inspecting the wrapped function responsible to allow the batch requests, I found it uses the `django.test.client` module to fetch the data, and that is causing the error."},"comment":{"url":"https://api.github.com/repos/jonykalavera/django-tastypie-batch/issues/comments/216042678","html_url":"https://github.com/jonykalavera/django-tastypie-batch/issues/1#issuecomment-216042678","issue_url":"https://api.github.com/repos/jonykalavera/django-tastypie-batch/issues/1","id":216042678,"user":{"login":"slackmart","id":1746954,"avatar_url":"https://avatars.githubusercontent.com/u/1746954?v=3","gravatar_id":"","url":"https://api.github.com/users/slackmart","html_url":"https://github.com/slackmart","followers_url":"https://api.github.com/users/slackmart/followers","following_url":"https://api.github.com/users/slackmart/following{/other_user}","gists_url":"https://api.github.com/users/slackmart/gists{/gist_id}","starred_url":"https://api.github.com/users/slackmart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slackmart/subscriptions","organizations_url":"https://api.github.com/users/slackmart/orgs","repos_url":"https://api.github.com/users/slackmart/repos","events_url":"https://api.github.com/users/slackmart/events{/privacy}","received_events_url":"https://api.github.com/users/slackmart/received_events","type":"User","site_admin":false},"created_at":"2016-05-01T13:39:40Z","updated_at":"2016-05-01T13:39:40Z","body":"Fixed in commit [a1967dbe5e293f7ec94426b62dba4228bb3f5747](https://github.com/jonykalavera/django-tastypie-batch/commit/a1967dbe5e293f7ec94426b62dba4228bb3f5747) :cake: "}}