Фикс связей таблицы с друзьями

main
through-your-tears 9 months ago
parent f27af04920
commit 1752dff9b4

@ -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': (

@ -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)

Loading…
Cancel
Save