From 1752dff9b40a9e528e26ff3dd0bb8bed2ea4201f Mon Sep 17 00:00:00 2001 From: through-your-tears Date: Sat, 6 Apr 2024 06:50:08 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81=20=D1=81=D0=B2=D1=8F?= =?UTF-8?q?=D0=B7=D0=B5=D0=B9=20=D1=82=D0=B0=D0=B1=D0=BB=D0=B8=D1=86=D1=8B?= =?UTF-8?q?=20=D1=81=20=D0=B4=D1=80=D1=83=D0=B7=D1=8C=D1=8F=D0=BC=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/conf/settings.py | 2 +- src/jwtauth/models.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/conf/settings.py b/src/conf/settings.py index b10cb30..526466c 100644 --- a/src/conf/settings.py +++ b/src/conf/settings.py @@ -146,7 +146,7 @@ DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' REST_FRAMEWORK = { 'DEFAULT_SCHEMA_CLASS': 'rest_framework.schemas.coreapi.AutoSchema', 'EXCEPTION_HANDLER': 'conf.exceptions.core_exception_handler', -# 'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination', + 'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination', 'PAGE_SIZE': 30, 'NON_FIELD_ERRORS_KEY': 'error', 'DEFAULT_AUTHENTICATION_CLASSES': ( diff --git a/src/jwtauth/models.py b/src/jwtauth/models.py index 7f5185c..e88a24c 100644 --- a/src/jwtauth/models.py +++ b/src/jwtauth/models.py @@ -60,6 +60,6 @@ class Profile(models.Model): class Friend(models.Model): - first = models.ForeignKey(Profile, on_delete=models.CASCADE) - second = models.ForeignKey(Profile, on_delete=models.CASCADE) + first = models.ForeignKey(Profile, on_delete=models.CASCADE, related_name='first_friend') + second = models.ForeignKey(Profile, on_delete=models.CASCADE, related_name='second_friend') approved = models.BooleanField(default=False)