Sign up functionality - Build a Slack clone using Django and Vue

You need to be subscribed to a plan to get access to the full course.

It's time to make it possible to sign up a user.

Comments

Bart | Mar 27, 22 04:27

Hello, can you share this project for download? I have problem with axios-->(http://localhost:8080/api/v1/users/ 404 (Not Found))


Stein Ove Helset | Mar 28, 22 05:36

Hey, yes I just invited you to the GitHub repository.
I think you have a problem with the url, it should probably be 127.0.0.1:8000/api/v1/users/.
So there is probably an issue where the base url is being set ;-)

scorer5793 | Mar 08, 24 11:11

Hello Stein,
could you help me Stein please ?
I have that error message when I clic on submit
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://10.0.5.18:8000/api/v1/users/. (Reason: CORS request did not succeed). Status code: (null).
Moreover, i have no error message "This password is to common". Could you please help me ?
Best regards,
Scorer


Stein Ove Helset | Mar 10, 24 08:01

Hello, you probably use a newer version of Django than I do in the video. So there is probably something you have to configure in the settings.py.
Try setting this there:
CORS_ALLOW_ALL_ORIGINS = True

Let me know if it helps or not :-)

Scorer | Mar 12, 24 10:09

Hie Stein, yes I succeded by moving the IP in settings.py
CORS_ALLOWED_ORIGINS = [
'http://127.0.0.1:8080'
]
. Not sure it was the reason but now it works well ;oD. Many Thx.

Add comment

Newsletter

Subscribe to my weekly newsletter. One time per week I will send you a short summary of the tutorials I have posted in the past week.