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)