feat: allow unsubcribing from a course goal with just a token

* Add unsubscribe_token uuid field to CourseGoal model
* Add endpoint to unsubcribe from just a token (no login needed)
* Add admin page for the course_goals djangoapp
* Add get_course_overview_or_404 utility method
* Clean up URL handling in course_home_api

AA-907
This commit is contained in:
Michael Terry
2021-08-17 11:09:14 -04:00
parent 377dec74aa
commit 2176dd7890
33 changed files with 356 additions and 121 deletions

View File

@@ -5,11 +5,12 @@ from rest_framework import serializers
from opaque_keys.edx.keys import CourseKey
from lms.djangoapps.course_home_api.mixins import DatesBannerSerializerMixin
from lms.djangoapps.course_home_api.serializers import DatesBannerSerializer
from openedx.core.djangoapps.content.course_overviews.models import CourseOverview
class CourseDeadlinesMobileSerializer(DatesBannerSerializerMixin): # lint-amnesty, pylint: disable=abstract-method, missing-class-docstring
class CourseDeadlinesMobileSerializer(DatesBannerSerializer):
"""Serializer for course deadlines"""
has_ended = serializers.SerializerMethodField()
def get_has_ended(self, _): # lint-amnesty, pylint: disable=missing-function-docstring