Re: How to get custom header in django restframework

2019-07-08 Thread Chetan Ganji
Read request response object of django n drf. They bother are different. Use dir() on request object of drf and see which variable is available for headers. On Mon, Jul 8, 2019, 12:33 PM anil yadav wrote: > Hello, > > import requests > I am not able to get custom header from API side > > url =

Re: I want to disable the Browsable API display URL from becoming a hyperlink automatically.

2019-07-08 Thread salimon jamiu olashile
Hello, >From what I understand, you want to use a relative url instead of an absolute url. Check out this link: https://www.django-rest-framework.org/api-guide/serializers/#absolute-and-relative-urls Hope this helps. Regards. Jamiu Olashile Salimon UTC +1 Follow me on Twitter: https://mobile.t

Re: django monitoring

2019-07-08 Thread Roberth Mejias
Hi, I use Sentry for logging production mode On Mon, Jul 8, 2019, 01:26 Jurgis Pralgauskis wrote: > django.db.backends logger works only in debug mode > > https://docs.djangoproject.com/en/1.11/topics/logging/#django-db-backends > > Curiuos, if sql logging gives much overhead? > > Also interesti

Re: I want to disable the Browsable API display URL from becoming a hyperlink automatically.

2019-07-08 Thread Tim Watts
I think you will have to override the "rest_bramework/base.html" in your project and remove the "urlize_quoted_links" filter. https://github.com/encode/django-rest-framework/blob/42fd179d4ef07cef280b66f85d1915dfe6dcd7d9/rest_framework/templates/rest_framework/base.html#L181 Alternatively maybe the

Re: I want to disable the Browsable API display URL from becoming a hyperlink automatically.

2019-07-08 Thread Ken TKHR
Hello. > Do you want to remove the url & use something else like the pk to represent relationships? No, I want my REST URLs to be hyperlinks. > Do you just want to disable the urls? That's it. I have stored dangerous URLs in my database. Therefore, I want to use the Browsable API safely. Thank

How to get custom header in django restframework

2019-07-08 Thread anil yadav
Hello, import requests I am not able to get custom header from API side url = "http://127.0.0.1:9090/api/router/"; headers = { 'HTTP_MY': "qw", 'postman-token': "baa2316e-8058-321f-4fd2-920272903e21" } response = requests.request("POST", url, headers=headers) -- You received t