{"action":"created","issue":{"url":"https://api.github.com/repos/zestedesavoir/zds-site/issues/2463","labels_url":"https://api.github.com/repos/zestedesavoir/zds-site/issues/2463/labels{/name}","comments_url":"https://api.github.com/repos/zestedesavoir/zds-site/issues/2463/comments","events_url":"https://api.github.com/repos/zestedesavoir/zds-site/issues/2463/events","html_url":"https://github.com/zestedesavoir/zds-site/pull/2463","id":64269459,"number":2463,"title":"Renvoi toujours les urls absolus des avatars","user":{"login":"firm1","id":6066015,"avatar_url":"https://avatars.githubusercontent.com/u/6066015?v=3","gravatar_id":"","url":"https://api.github.com/users/firm1","html_url":"https://github.com/firm1","followers_url":"https://api.github.com/users/firm1/followers","following_url":"https://api.github.com/users/firm1/following{/other_user}","gists_url":"https://api.github.com/users/firm1/gists{/gist_id}","starred_url":"https://api.github.com/users/firm1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/firm1/subscriptions","organizations_url":"https://api.github.com/users/firm1/orgs","repos_url":"https://api.github.com/users/firm1/repos","events_url":"https://api.github.com/users/firm1/events{/privacy}","received_events_url":"https://api.github.com/users/firm1/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-03-25T13:33:57Z","updated_at":"2015-03-25T14:28:45Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/zestedesavoir/zds-site/pulls/2463","html_url":"https://github.com/zestedesavoir/zds-site/pull/2463","diff_url":"https://github.com/zestedesavoir/zds-site/pull/2463.diff","patch_url":"https://github.com/zestedesavoir/zds-site/pull/2463.patch"},"body":"| Q                         | R\r\n| ------------------------- | -------------------------------------------\r\n| Correction de bugs ?      | oui\r\n| Nouvelle Fonctionnalité ? | non\r\n| Tickets (_issues_) concernés         | #2296 \r\n\r\nCette PR permet de renvoyer toujours l'url absolu d'un membre dans l'API, car ce n'est pas au client de l'API de rajouter le domaine sur lequel est hébergé l'image en fonction du cas.\r\n\r\n**Note pour QA**\r\n\r\n- Charger les fixtures : `python manage.py loaddata fixtures/*.yaml`\r\n- se connecter avec `user`, ajoutez une image dans sa gallerie, et désigner cette image comme étant son avatar\r\n- Lancez la commande suivante (adaptez l'url en fonction de votre adresse locale) : `curl localhost:8000/api/membres/3/`. La réponse à cette requete devrait renvoyer une url absolue pour l'image de l'avatar."},"comment":{"url":"https://api.github.com/repos/zestedesavoir/zds-site/issues/comments/86050394","html_url":"https://github.com/zestedesavoir/zds-site/pull/2463#issuecomment-86050394","issue_url":"https://api.github.com/repos/zestedesavoir/zds-site/issues/2463","id":86050394,"user":{"login":"GerardPaligot","id":1913901,"avatar_url":"https://avatars.githubusercontent.com/u/1913901?v=3","gravatar_id":"","url":"https://api.github.com/users/GerardPaligot","html_url":"https://github.com/GerardPaligot","followers_url":"https://api.github.com/users/GerardPaligot/followers","following_url":"https://api.github.com/users/GerardPaligot/following{/other_user}","gists_url":"https://api.github.com/users/GerardPaligot/gists{/gist_id}","starred_url":"https://api.github.com/users/GerardPaligot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GerardPaligot/subscriptions","organizations_url":"https://api.github.com/users/GerardPaligot/orgs","repos_url":"https://api.github.com/users/GerardPaligot/repos","events_url":"https://api.github.com/users/GerardPaligot/events{/privacy}","received_events_url":"https://api.github.com/users/GerardPaligot/received_events","type":"User","site_admin":false},"created_at":"2015-03-25T14:28:44Z","updated_at":"2015-03-25T14:28:44Z","body":"> Il me semble que l'API renvoi juste \"les champs du modèle\" sans passer par les méthodes.\r\n\r\nTout à fait. [Dans le code](https://github.com/zestedesavoir/zds-site/blob/dev/zds/member/api/serializers.py#L61), `avatar_url` correspond bien à l'attribut et pas à la méthode. Faut bidouiller pour y parvenir."}}