-
Notifications
You must be signed in to change notification settings - Fork 259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Organization API #627
Comments
I'll take this one, @to-sta 😊 We can also make ones for organizations and FAQs as well to round out the main things from the start, and then maybe events. As you see fit :) :) |
hmm I was thinking about starting with the main tables:
What table/model represents the for example FAQ? |
@to-sta can i create api for |
def list(self, request): def create(self, request): def retrieve(self, request, pk=None): def update(self, request, pk=None): def partial_update(self, request, pk=None): def destroy(self, request, pk=None): |
Hi @andrewtavis, I know you're currently assigned to this issue, but I still wanted to see how progress has been going and see if I could come up with a fix to the issue for my learning. From my understanding, 4 of the 6 specified HTTP methods have already been completed in /activist/backend/entities/views.py, so would some tasks involve refactoring the Organization app into its own sub-folder as commented in #671? If refactoring is preferred, what would models would encompass models.py since most, if not all, would be passed into their respective API sub-folders like /entitites/organizations and /entities/groups. Thanks! |
Hey @josueemartinezz 👋 I think that @to-sta is mostly finalizing this at this point. We'll be doing a sync to finalize this this weekend, but there should be more backend issues after that! If you find another, please write in and we'll do our best to assign you :) |
Ah, I see, I'll keep an eye out for to-sta's pull request. Thanks for your response! Looking forward to contribute :) |
Looking forward to your contribution! :) |
Terms
Description
We are starting with creating the API's that will be used by the frontend in production soon 😃.
We are using django-rest-framework in the backend to create our API's. ViewSets in particular the ModelViewSet are used for creating the different HTTP methods. Another benefit of using the ModelViewSet is that we are getting some validation from the model itself and only need to extend that in the serializer if necessary.
Have look at the scheme and the models.py file.
Task is to implement all these methods for the OrganizationViewSet that represent the different HTTP methods:
The API generally is a combiniation of:
Also feel free to suggest changes to the model, in case it is necessary for the logic. They are not set in stone 😃. In terms of testing, you can use Swagger UI for manuall testing (backend endpoint:
/v1/schema/swagger-ui/
).Note
Please use an appropiate http status code for your responses.
Contribution
I am happy to help with this issue.
The text was updated successfully, but these errors were encountered: