From d4c42f493bf04a822df8cb77c10881dde3991131 Mon Sep 17 00:00:00 2001 From: Vainl Date: Tue, 26 Mar 2024 17:30:55 +0800 Subject: [PATCH 1/2] remove `...` in rest_framework.txt to make life easy Someone silly like me, who just copies and posts the code snippet with the ..., will get an exception `AttributeError: 'ellipsis' object has no attribute 'rsplit'`. So let's just remove it and make life easy. --- docs/guide/rest_framework.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/guide/rest_framework.txt b/docs/guide/rest_framework.txt index 477d8cb9..9cf77b5e 100644 --- a/docs/guide/rest_framework.txt +++ b/docs/guide/rest_framework.txt @@ -39,7 +39,6 @@ If you want to use the django-filter backend by default, add it to the ``DEFAULT # settings.py INSTALLED_APPS = [ - ... 'rest_framework', 'django_filters', ] @@ -47,7 +46,6 @@ If you want to use the django-filter backend by default, add it to the ``DEFAULT REST_FRAMEWORK = { 'DEFAULT_FILTER_BACKENDS': ( 'django_filters.rest_framework.DjangoFilterBackend', - ... ), } From 618c61d963ef8d38f9a4f53c51c8f99456449ba9 Mon Sep 17 00:00:00 2001 From: Vainl Date: Wed, 27 Mar 2024 00:06:06 +0800 Subject: [PATCH 2/2] Update rest_framework.txt So let's add a comment and keep the ellipsis there. --- docs/guide/rest_framework.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/guide/rest_framework.txt b/docs/guide/rest_framework.txt index 9cf77b5e..1901bc6d 100644 --- a/docs/guide/rest_framework.txt +++ b/docs/guide/rest_framework.txt @@ -39,6 +39,7 @@ If you want to use the django-filter backend by default, add it to the ``DEFAULT # settings.py INSTALLED_APPS = [ + # ... 'rest_framework', 'django_filters', ] @@ -46,6 +47,7 @@ If you want to use the django-filter backend by default, add it to the ``DEFAULT REST_FRAMEWORK = { 'DEFAULT_FILTER_BACKENDS': ( 'django_filters.rest_framework.DjangoFilterBackend', + # ... ), }