Closed to-sta closed 5 months ago
Hey @to-sta, i would love to help in this issue and this project!
You can assign me to this issue if you want to, and if there's no one else with this in hands.
If so, could you give me some directions on the already built API? Where should i create this signup (POST, DELETE)
endpoint? i couldn't find anything in the CONTRIBUTING.md file about this specific topic.
I already have some experience with APIs (mostly with Flask), but i can learn Django in no time.
Best regards.
Assigning you here now, @jaymeklein 😊 Thanks for the interest in helping out! @to-sta is busy today, but he'll get back to you soon on directions for the API endpoint! Looking forward to working with you further :) :)
Hey @andrewtavis , thanks for assigning me this issue. I'm gonna wait until he is available to make everything here as clear as possible.
Best regards.
@jaymeklein thanks for taking on this issue 😃.
All account related API's are inside the directory backend/authentication
. We use the django restframework to create API's.
You can find the User model here.
We want to use the APIView class for the implementation of the post and delete method. That should look like:
class SignupView(APIView):
def post(self, request):
pass
def delete(self, request, pk):
pass
I would suggest to create a seperate serializer for the API as well (instead of using UserSerializer):
class SignupSerializer(serializers.ModelSerializer[User])
...
Here is the signup form. There you can see that we are expecting a user_name, password and password_confirmed (or password1 and password2 as you see fit).
Btw @andrewtavis shouldn't there be an email as well for the signup form?
Let me know if you have any other question 😄.
For now, yes @to-sta we'll need an email for this. I'll add that in at some point. Eventually we do want to move away from an email signup/verification as the only option, but I guess it should still be the base :)
Just finished setting up the development environment, and I'll be exploring the project backend so i can do it as close as possible from what you guys already built.
Your way to build APIs is kinda different from everything i've done before, so i may struggle a little bit with all that abstraction.
Here are the rules for the password from the frontend, via a discussion with @to-sta:
Closing this via #769 😊 Appreciate the help here, @jaymeklein! Hope to see you at the next sync :)
@to-sta will write an issue to do the tests (and potentially do it himself).
Terms
Description
We need endpoints for accounts related actions. This issues is about the signup / registration endpoint.
The POST and DELETE methods should be used to create and delete an account.
The API endpoints should be created via
APIView
rather than aViewSet
.Contribution
I am happy to help someone to work on this or work on this myself.