Questions tagged [django-react]

50 questions
0
votes
1 answer

aws ec2 not serving static files in a django react application

I am trying to deploy a django react ecommerce app using aws ec2. when i run python manage.py runserver 0.0.0.0:8000 it is loading the page but not serving static files. The errors are [24/Jun/2021 19:29:26] "GET / HTTP/1.1" 200 2297 [24/Jun/2021…
0
votes
1 answer

Combine django and react

I am doing this using axios to combine django and react. While running the program in the command prompt I have to use 2 command prompt! One for running (npm start) And the another for backend (python manage.py runserver) My questions: Is there a…
0
votes
1 answer

My ReactJS/Django(Rest API) prompts an Unhandled Promise rejection when I browse from a different PC on the LAN

I can see the frontend form though, but if I try to submit the console would show: "Fetch API cannot load http://localhost:8000/api/task-create/ due to access control checks." and the next line is: "Failed to load resource: Cannot establish…
0
votes
0 answers

Django-React-Webpack Integration does not output updated React Components when I refresh the page

I have been trying to integrate React to a Django app using Babel and Webpack, but am having a hard time running the updated .js output file. I believe my problem comes from the main.js file Webpack outputs does not reflect the updated come from my…
Gui
  • 11
  • 4
0
votes
1 answer

React Router redirects to BASE_URL when I try to load a page in a new tab

I have been working on a react project and I ran into a problem about 4 days ago. When I try to open a link in a new tab, it redirects to the home/BASE url. Please I need assistance fixing the bug. render route method export const renderRoutes =…
Fornow
  • 69
  • 1
  • 9
0
votes
1 answer

How can I let users authenticate into my django-react website with github?

I can't find ANYTHING on google or stackoverfliow about this. I'm using django and react and I want one of those "Log in with Github" buttons on my login page. I doubt anyone has time to write the whole process but maybe a link to a good source?…
Fors
  • 61
  • 1
  • 9
0
votes
0 answers

Storing raw text data vs analytics

I’ve been working on a hobby project that’s a django react site that give analytics and data viz for texts. Most likely will host on AWS. The user uploads a csv of texts. The current logic is that they get stored in the db and then when the user…
0
votes
1 answer

npm run build takes to long in django+react app

recently i moved to react and i am quite familiar with it , now i started using react with backend django, after i set up it was all working but ,every time i change code and i want to see it , i need to npm run build , although this works but on…
user15134931
0
votes
0 answers

Django and React... Why scripts don't work on the index.html page

I'm trying to study React in the context of Django... React by itself works, Django also works. When I'm trying to work with React in the Django, it doesn't give me any troubles, but nothing is seen on the page. I tried: I installed all possible…
bugthefifth
  • 161
  • 15
0
votes
2 answers

Handling Django Rest Framework 404 page directed to react app's home/index

I have DRF project and the react project is also within the Django project as an application. The name of the react application is frontend. INSTALLED_APPS = [ .... 'frontend' ] The structure of the frontend is as follows, The only code in the…
sadat
  • 4,004
  • 2
  • 29
  • 49
0
votes
1 answer

xhr.send() post request don't pass data

on the typescript side, i have this code that should send post request. note that getCookie function is copied from Django docs exactly like it is. const xhr = new XMLHttpRequest(); xhr.responseType = "json"; xhr.open("POST",…
Ali Husham
  • 816
  • 10
  • 31
0
votes
2 answers

Unable to send a PUT request to a Django REST API using Reactjs fetch() method

I've recently started learning Reactjs & made a simple Todo react appplication in order to learn it bit-by-bit, step-by-step.The data in this Todo react front-end is coming from a simple Todo Django REST API. But the problem is I want to change the…
0
votes
0 answers

Can't extract key value pairs from form data

Application stack: Django React I am trying to extract email and password from the request sent from react. Instead of getting email and password, I am getting None value. The data sent is in FormData type. This is the function handling signin in…
0
votes
1 answer

Django and React always Bad Request when submitting

I am developing a E-Prescription Web App using Django Rest Framework and Bootstrap-React. But I'm facing an error saying that POST http://127.0.0.1:8000/api/prescription-view/ 400 (Bad Request) How to fix this? Btw here's my…
user11582312
0
votes
1 answer

How to Authenticate Django REST API with HTTP only cookie?

i use django rest framework and react js environment for my project, to store jwt token local-storage, cookie is unsafe so i decided to save httponly cookie, how do i achieve authenticate how pass token in http header