Skip to content
Advertisement

Tag: django-rest-framework

ImportError: Could not import ‘rest_framework_simplejwt.authentication.JWTAuthentication’

I am trying to deploy a django app on GCP but when i try to make migrations it gives me this error: ImportError: Could not import ‘rest_framework_simplejwt.authentication.JWTAuthentication’ for API setting ‘DEFAULT_AUTHENTICATION_CLASSES’. ModuleNotFoundError: No module named ‘rest_framework_simplejwt’. Settings.py requirements.txt What is it that I am missing ? UPDATE I installed rest_framework_simplejwt and now the error shifted to : No module named

Capturing values from url in post request in Django

I want to capture url values from a url into my views in a post request. My urls.py looks like below from django.urls import path from . import views as projects_views and I want to capture the value project_id in my ListCreateAPIView. Get call works fine. My views.py looks like below How can this be done? Answer Use self.kwargs[“project_id”] to

Advertisement