Skip to content

Commit

Permalink
pep8 E231
Browse files Browse the repository at this point in the history
  • Loading branch information
VVVas committed Oct 10, 2023
1 parent 0dd37c4 commit c85428c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
# Продуктовый помощник.


Пользователь на GitHub — vvvas

Пользователь на Docker — vvvas


Копия workflow для GitHub Actions лежит в /infra


https://fg.yp.vvvas.ru/


Пользователь — v@vvvas.ru

Пароль — Qwe123!@#


Администратор — a@vvvas.ru

Пароль —Qwe123!@#
18 changes: 9 additions & 9 deletions backend/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,22 @@ class CustomUserViewSet(UserViewSet):
queryset = User.objects.all()

@action(
methods=['get',],
methods=['get', ],
detail=False,
url_path='me',
url_name='me',
permission_classes=[IsAuthenticated,]
permission_classes=[IsAuthenticated, ]
)
def me(self, request, *args, **kwargs):
"""Переопределение для ограничения доступа гостей."""
return super().me(request, *args, **kwargs)

@action(
methods=['post', 'delete',],
methods=['post', 'delete', ],
detail=True,
url_path='subscribe',
url_name='subscribe',
permission_classes=[IsAuthenticated,]
permission_classes=[IsAuthenticated, ]
)
def get_subscribe(self, request, id):
"""Подписка на пользователей."""
Expand Down Expand Up @@ -95,7 +95,7 @@ class SubscriptionViewSet(ListModelMixin, GenericViewSet):
"""Вьюсет списка подписки на авторов."""

serializer_class = SubscriptionSerializer
permission_classes = [IsAuthenticated,]
permission_classes = [IsAuthenticated, ]

def get_queryset(self):
"""Собираем список подписки на авторов."""
Expand Down Expand Up @@ -147,11 +147,11 @@ def perform_update(self, serializer):
serializer.save()

@action(
methods=['post', 'delete',],
methods=['post', 'delete', ],
detail=True,
url_path='favorite',
url_name='favorite',
permission_classes=[IsAuthenticated,]
permission_classes=[IsAuthenticated, ]
)
def get_favorite(self, request, pk):
"""Добавление рецептов в избранное."""
Expand Down Expand Up @@ -191,11 +191,11 @@ def get_favorite(self, request, pk):
return Response(status=status.HTTP_204_NO_CONTENT)

@action(
methods=['post', 'delete',],
methods=['post', 'delete', ],
detail=True,
url_path='shopping_cart',
url_name='shopping_cart',
permission_classes=[IsAuthenticated,]
permission_classes=[IsAuthenticated, ]
)
def get_shopping_cart(self, request, pk):
"""Добавление рецептов в список покупок."""
Expand Down

0 comments on commit c85428c

Please sign in to comment.