Skip to content
Advertisement

Tag: django-rest-framework

Error in making POST request to django API

From post man, I’m trying to make POST request to an order API created using django restframework but I’m getting the following error: The specific point where the error is located is specified in the error but I find difficulty constructing VALID json for the request body. Here is how I’m making the request on postman: Here is the program:

Forbidden: /api/v1.0/user/create-user/ & { “detail”: “Authentication credentials were not provided.” } DJANGO

I was creating Login functionality for my Python Django backend, “create user” functionality was working fine before. But then after Login was entirely coded, the create-user stopped working. My urls.py file: My views.py file: My serializers.py file: My project’s settings.py file: Postman Request: I get the same for when I tried to log in an existing user, after which I

Django: Refused to apply style from … because its MIME type (‘text/html’) is not a supported stylesheet MIME type

i am trying to connet my style.css in django template using the static files {% static ‘assets/css/style.css’ %} but i keep seeing this error Refused to apply style from ‘http://127.0.0.1:8000/assets/css/style.css’ because its MIME type (‘text/html’) is not a supported stylesheet MIME type, and strict MIME checking is enabled.. NOTE: when i copy my css and manually paste it in a

Advertisement