{"action":"created","issue":{"url":"https://api.github.com/repos/bernardopires/django-tenant-schemas/issues/354","repository_url":"https://api.github.com/repos/bernardopires/django-tenant-schemas","labels_url":"https://api.github.com/repos/bernardopires/django-tenant-schemas/issues/354/labels{/name}","comments_url":"https://api.github.com/repos/bernardopires/django-tenant-schemas/issues/354/comments","events_url":"https://api.github.com/repos/bernardopires/django-tenant-schemas/issues/354/events","html_url":"https://github.com/bernardopires/django-tenant-schemas/issues/354","id":161509521,"number":354,"title":"Schema retrival helper function proposal","user":{"login":"filipeximenes","id":1180884,"avatar_url":"https://avatars.githubusercontent.com/u/1180884?v=3","gravatar_id":"","url":"https://api.github.com/users/filipeximenes","html_url":"https://github.com/filipeximenes","followers_url":"https://api.github.com/users/filipeximenes/followers","following_url":"https://api.github.com/users/filipeximenes/following{/other_user}","gists_url":"https://api.github.com/users/filipeximenes/gists{/gist_id}","starred_url":"https://api.github.com/users/filipeximenes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/filipeximenes/subscriptions","organizations_url":"https://api.github.com/users/filipeximenes/orgs","repos_url":"https://api.github.com/users/filipeximenes/repos","events_url":"https://api.github.com/users/filipeximenes/events{/privacy}","received_events_url":"https://api.github.com/users/filipeximenes/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-06-21T18:37:45Z","updated_at":"2016-06-24T09:46:49Z","closed_at":null,"body":"Would a helper function (maybe on the util.py module) be useful to the project? Something like:\r\n\r\n```\r\nfrom django.db import connection\r\n\r\ndef get_current_tennant():\r\n    return connection.get_tenant()\r\n```\r\nIs there some other way in the project to do this? Is there any problem with this construction?\r\nSomething like this would help on things like saving media files in a file according to the tenant it belongs (the upload_to model function does not gets the `request` object)\r\n\r\nLMK, I can PR this"},"comment":{"url":"https://api.github.com/repos/bernardopires/django-tenant-schemas/issues/comments/228304337","html_url":"https://github.com/bernardopires/django-tenant-schemas/issues/354#issuecomment-228304337","issue_url":"https://api.github.com/repos/bernardopires/django-tenant-schemas/issues/354","id":228304337,"user":{"login":"bernardopires","id":1726375,"avatar_url":"https://avatars.githubusercontent.com/u/1726375?v=3","gravatar_id":"","url":"https://api.github.com/users/bernardopires","html_url":"https://github.com/bernardopires","followers_url":"https://api.github.com/users/bernardopires/followers","following_url":"https://api.github.com/users/bernardopires/following{/other_user}","gists_url":"https://api.github.com/users/bernardopires/gists{/gist_id}","starred_url":"https://api.github.com/users/bernardopires/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bernardopires/subscriptions","organizations_url":"https://api.github.com/users/bernardopires/orgs","repos_url":"https://api.github.com/users/bernardopires/repos","events_url":"https://api.github.com/users/bernardopires/events{/privacy}","received_events_url":"https://api.github.com/users/bernardopires/received_events","type":"User","site_admin":false},"created_at":"2016-06-24T09:46:49Z","updated_at":"2016-06-24T09:46:49Z","body":"What's the problem with using `connection.get_tenant()`?"}}
{"actor":{"display_login":"bernardopires"}}