Mongodb – Django url issue while calling in Postman
I am creating CRUD operation in Django, REST API and Mongo DB. I have done the basic CRUD code. When I try to call the api in postman, I am not getting any responses. In the pycharm, I am seeing…
I am creating CRUD operation in Django, REST API and Mongo DB. I have done the basic CRUD code. When I try to call the api in postman, I am not getting any responses. In the pycharm, I am seeing…
I am trying to execute the functions in async mode using Django DRF APIView, so that the API returns the response instantly. I am using Django 4.1.12, adrf for async View. Below is the code : import asyncio from asgiref.sync…
I am developing an API for a forum website and have a classed-based view that sends an email message to a user in order to make his email confirmed. I have a celery task, that sends email and in the…
I have a POST endpoint that creates an instance on the database once the user creates an account, the rows are filled with information like day of the week, date, user_id, etc. @api_view(['POST']) def generate_focus_instance_v2(request): try: user_id_from_request = request.data['user'] if…
I am new in Django and React Native. Im using Django rest framework to connect my front end to backend. and I am using "axios" in sending request to django I am trying send URL in django. After receiving, the…
PropertyDetails.jsx import React, { useState, useEffect } from 'react'; import { useParams } from 'react-router-dom'; import axios from 'axios'; import '../styles/propertydetails.css'; import Navbar from '../components/Navbar'; import Footer from '../components/Footer'; function PropertyDetails() { const { id } = useParams(); const [propertyData,…
import React, { useState, useEffect } from 'react'; import { Link } from 'react-router-dom'; import axios from 'axios'; import '../styles/sales.css'; // Import the CSS file function Sales() { const [propertyData, setPropertyData] = useState([]); useEffect(() => { // Fetch data from…
I'm currently working on a project where I have a frontend application running on http://localhost:3000 and a backend API on http://localhost:8000. I'm encountering a CORS issue when trying to make requests from my frontend to the backend API. Here's the…
i have this issue on my application. Object of type QuerySet is not JSON serializable In fact, i creating an application in which we have a relationship of the type several Products inone or more Orders. Here is my code…
I'm fairly new to Docker and I am trying to create a project with it and Django. My version of Django is 4.2 and I use the latest versions of PostgreSQL and Docker. So I created a docker-compose.yml file with…