Closed DRG104 closed 2 years ago
what does our request look like ?
The request is a simple POST:
Request Method: POST
Request URL: http://127.0.0.1:8000/sign-up/
marking as resolved with workaround being to manually input json via 'raw' option in the django browser form for sign up and sign in - ensuring that the request data has the 'credentials' key as per the routes already defined in the boiler plate
What stack are you using?
(ex: MERN(mongoose + react), DR(django + react), PEN, etc.)
Django + react
What's the problem you're trying to solve?
Trying to utilize
django_api_auth_boilerplate
. When trying to view a mango (made by a super user) I receive401: not authorized, no credentials provided
. When I try to create a regular user to view (or create a mango) I receivemultivaluedictkeyerror at /sign-up/ 'credentials'
. The boilerplate is mostly stock, I only changeddjango_auth_template
to our project name as per the set up instructions. I haven't attempted to add or create new models until I figure outmangos
.Post any code you think might be relevant (one fenced block per file)
Error message in browser points to:
api.views.user_views.SignUp
If you see an error message, post it here. If you don't, what unexpected behavior are you seeing?
Error message contains:
MultiValueDictKeyError at /sign-up/
'credentials'
copy and paste of traceback contains:
What is your best guess as to the source of the problem?
I haven't got a clue, when I try to reuse the email used for my superuser during
sign-up
its obviously taken, so I don't think its an issue with thesign-up
form. My super user can create, view and edit mangos, but since I can't create a regular user (with a different email of course) I can't really see what else the problem is. The boilerplate is being used as-is out of the box, so I'm worried there is something wrong with my work environment.What things have you already tried to solve the problem?
I added a bearer token to the only user I have available (my super user) in case that was the
credentials
issue. I also went through the lessons related to the boilerplate and tried to create simple (test) view (that can't be displayed). I checked and rechecked import paths for the simple (test) view and checked import paths for the existing views as part of the boilerplate.Paste a link to your repository here https://github.com/Zene09/server-dreamlancer