1. | Create a view function called add_friends() in the iFriends/People/views.py file, and enable it in the URLconf file. Have the add_friends() function accept the id of the Person object currently logged in as the first parameter after the request, and the id of the Person object you want to add as a friend as the second. |
2. | Add code in the add_friends() view to verify that the user is logged in and has the can_add_friends permission you created in the exercises in Hour 14. |
3. | Add code to the add_friends() view to add the Person object specified as a friend to the friends Field of the currently logged-in Person object. |
4. | Add an invite link to the Person list on the home page that links to the add_friends() view. It should pass in the id of the currently logged-in user and the id of the Person object in the list. |