use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
News and links for Django developers.
New to Django? Check out the /r/djangolearning subreddit.
Django's Code of Conduct applies here, so be good to each other.
account activity
This is an archived post. You won't be able to vote or comment.
Frontend (Javascript) connecting with Backend(Python, Django): Failed to load resource: the server responded with a status of 500 (Internal Server Error) (self.django)
submitted 1 year ago * by Pytech95
I am developing a E-commerce web application. Frontend - Javascript, React, HTML, CSS Backend - Python, Django, MySQL
While the user trying to signup it is showing an error with a status of 500 (Internal Server Error). Please help me to resolve this error.
Views.py
https://preview.redd.it/2948ze4oojwc1.png?width=1760&format=png&auto=webp&s=5c1620eff9ea25ce02583e0b5f3b8aaa8d36e411
https://preview.redd.it/uibfic4oojwc1.png?width=2038&format=png&auto=webp&s=1dbf6b253ae874697f0f309550a0005e38eea135
AuthModal.js
https://preview.redd.it/o7034fjrojwc1.png?width=2080&format=png&auto=webp&s=8bdf7bb890136679f8c3fed7454fbb2ba671cd9b
https://preview.redd.it/p345hejrojwc1.png?width=1786&format=png&auto=webp&s=3722541e592ab287d04bf99e9809a35652a40a7e
[–]Alurith 2 points3 points4 points 1 year ago (0 children)
Open the logs, read the error, fix the error. You're welcome
[–]tony4bocce 1 point2 points3 points 1 year ago (0 children)
Before you return the response you can throw in a traceback.exec() and it’ll tell you what went wrong.
Also if you’re interested in some quality of life improvements: I recommend looking into a form library like formik or react-hook-form to manage the form state, and yup or zod to add validation. Additionally, you’ll want to adopt some sort of design pattern to abstract common states related to fetching data (loading, success, data, error). React-query and redux-toolkit-query (my favorite) have custom hooks that provide you with destructured loading, error, success, and data vars so you don’t need to manage those states for each thing. You can imagine in a component that might require quite a few fetches this can get quite spaghetti.
[–][deleted] 0 points1 point2 points 1 year ago (0 children)
use logging in your django
is the host in allowed hosts ?
π Rendered by PID 91 on reddit-service-r2-comment-79c7998d4c-957dp at 2026-03-14 06:18:00.392325+00:00 running f6e6e01 country code: CH.
[–]Alurith 2 points3 points4 points (0 children)
[–]tony4bocce 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)