BigCheeze45 / angel-among-us-vms

Volunteer Management System for Angel Pet Rescue
https://angelsrescue.org
1 stars 0 forks source link

Ability to track and store volunteer's kids/pets #13

Closed BigCheeze45 closed 1 week ago

BigCheeze45 commented 1 month ago

As a manager, I need to know the names of Jan Doe's kids/pets because I'd like to specially recognize her service and I'd like to personalize it.

Backend

Models

Reference the VolunteerActivity and VolunteerSkill models. Same idea except with pets & kids. Django model field reference

After creating the models

Serializer

Reference VolunteerSkillSerializer & VolunteerTeamSerializer & VolunteerActivitySerializer

View

A view is needed in order to create/read/update/delete kids & pets from volunteer. Again, reference similar view sets.

Routing

Finally update app/urls.py to make volunteer kids & pets accessible. E.g

volunteer_router = routers.NestedSimpleRouter(router, r"volunteers", lookup="volunteer")
volunteer_router.register(r"teams", VolunteerTeamViewSet, basename="volunteer-teams")
volunteer_router.register(r"skills", VolunteerSkillViewSet, basename="volunteer-skills")
volunteer_router.register(
    r"milestones", VolunteerMilestoneViewSet, basename="volunteer-milestones"
)
volunteer_router.register(
    r"activities", VolunteerActivityViewSet, basename="volunteer-activities"
)

Frontend