diff --git a/README.md b/README.md index 8ced915..3f57a03 100644 --- a/README.md +++ b/README.md @@ -212,7 +212,6 @@ class CourseTests(TestCase): with self.assertRaises(ValidationError): course.full_clean() - ``` There's a lot going on in this test: @@ -427,6 +426,7 @@ Here is a good example of service that preforms some validation and raises `djan ```python from django.core.exceptions import ValidationError + def create_topic(*, name: str, course: Course) -> Topic: if course.end_date < timezone.now(): raise ValidationError('You can not create topics for course that has ended.') @@ -540,9 +540,9 @@ Having this mixin in mind, our API can be written like that: ```python class CourseCreateApi( - SomeAuthenticationMixin, - ExceptionHandlerMixin, - APIView + SomeAuthenticationMixin, + ExceptionHandlerMixin, + APIView ): class InputSerializer(serializers.Serializer): ...