Skip to content
This repository has been archived by the owner on Jun 16, 2021. It is now read-only.

Completed both the tasks #16

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

m-e-l-u-h-a-n
Copy link
Member

CSoC Task 3 Submission

I have completed the following tasks

  • Basic endpoints
  • Collaborator feature

@krashish8
Copy link
Member

Great work on the assignment @m-e-l-u-h-a-n!
Here are some suggestions:

  • In the UserProfileView, you can get the current user directly using request.user instead of manually extracting the token from the headers and getting the user from that.
  • You haven't used serializers effectively. Most of the coding part and validation is done in the serializers, not in the views. Good use of serializers can also help reduce code repetition. Also, learn how to use the GenericViews, RetrieveUpdateDestroyAPIView, etc. in the trivial tasks such as retrieving, updating or deleting.
  • In case of a large app, the more lengthier the code, the harder it is to debug and understand. Therefore, always try to reduce unnecessary code.
  • It is good that you have used permissions.py. You could also create another permission named IsOwner and use it in your code. This too helps in reducing the code considerably, and making it look cleaner.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants