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 =
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
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
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
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
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