Re: APIClient and accept_language header

2018-04-17 Thread Daviddd
Thanks Carlton, yeap it works. I also used HTTP_ACCEPT_LANGUAGE=‘es', but after your reply I found the error in my code. It was very difficult to spot it without your answer. Il giorno lunedì 16 aprile 2018 14:15:47 UTC+2, Carlton Gibson ha scritto: > > Hi David, > > On 14 Apr 2018, at 07:41, D

Re: APIClient and accept_language header

2018-04-16 Thread Carlton Gibson
Hi David, > On 14 Apr 2018, at 07:41, Daviddd > wrote: > > ACCEPT_LANGUAGE='es' I think you’d need to pass it like this: HTTP_ACCEPT_LANGUAGE=‘es' Kind Regards, Carlton -- You received this message because you are subscribed to the Google Groups "Djan

APIClient and accept_language header

2018-04-13 Thread Daviddd
Dear all, Using APIClient (not the requests based class) is it possible to pass as param the accept_language? class BaseAPITestCase(APITestCase): @classmethod def setUpTestData(cls): def _get_jwt_token(user_credentials): url_token_auth = reverse('api:default:api-toke