GeriLife / companionship

Promoting companionship and well-being for everyone.
European Union Public License 1.2
7 stars 18 forks source link

Add REST endpoints for Activity (create/edit/delete) #196 #210

Open ErnstBas opened 1 year ago

ErnstBas commented 1 year ago

This is a solution for #196

I have created two api endpoints: activities/api for retrieving all activities and the activities/api/ for the individual activities

The requested CRUD functionality is added as well as the permissions for companions and organizers.

I am not entirely sure about line 20 in activities/views.py. Please have a look whether this is a good solution to select the circle_id in order to check if the user is part of the circle.

And any other feed back to improve this solution is highly appreciated.

Thanks

CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.

ErnstBas commented 1 year ago

Hi @brylie shall I resolve the issues that where automatically detected and submit a new PR, or what is the procedure to follow? The other question regarding the CLA puzzles me. I signed the CLA before submitting, using the email address I always use for Guthub. I see that other users have encountered this same issue. Maybe signing it again and submitting a new PR could help. Any suggestions?

brylie commented 1 year ago

You can resolve the issues on the current PR :-)

It looks like your Git commits were authored with the following email: zx88707@ou.ac.uk

https://github.com/CompanionshipCare/companionship-care/commit/e130b12611c1e507ebada6057c21a004e5473f7c.patch

ErnstBas commented 1 year ago

Hello @brylie, if you have any feedback on the code, please let me know. Otherwise, I could maybe work on some of the other issues?

ErnstBas commented 1 year ago

Thanks for your feedback @brylie I will look at it during the weekend.

ErnstBas commented 1 year ago

Hi @brylie , I am punching a bit above my weight here. I need a better understanding of Django and DRF to resolve these problems without losing a lot of time, which unfortunately I don't have at the moment. Please feel free to reassign this issue to someone else. I would like to come back this summer, better prepared.

brylie commented 1 year ago

Hey @ErnstBas. No worries. DRF and the likes are quite complicated and I'm confused as well.

Would you like to help with more conventional Django tasks on a website we are trying to launch by August of this year?

I've been developing the Western Friend website using Django and Wagtail CMS since 2019, and we're in the late stages of the project:

https://github.com/WesternFriend/WF-website

Many of the remaining issues are related to HTML, CSS, and Bootstrap styling. If you'd like to help with the Western Friend project, I'd appreciate the assistance and gladly help you get started with a good first issue.

ErnstBas commented 1 year ago

Thanks for your understanding @brylie . I like working on this project, but did not really manage linking circle members and organisers and activities. Eventually I will get there. Anyway, the next few weeks I will be pretty busy, but I will consider the other project too. Thanks for the opportunity!