diff --git a/tiktok_clone_back/settings.py b/tiktok_clone_back/settings.py index d490cb1..d46682d 100644 --- a/tiktok_clone_back/settings.py +++ b/tiktok_clone_back/settings.py @@ -39,6 +39,7 @@ LOCAL_APPS = [ 'users', + 'videos', ] DJANGO_APPS = [ diff --git a/users/serializers.py b/users/serializers.py index 72cc3c9..f821274 100644 --- a/users/serializers.py +++ b/users/serializers.py @@ -22,7 +22,7 @@ class CustomUserSerializer(serializers.ModelSerializer): Creates a new User instance based on the validated data. """ - class Meta: # pylint: disable=too-few-public-methods + class Meta: model = User fields = ['id', 'username', 'email', 'password', 'bio', 'profile_picture'] diff --git a/users/views/user_profile_view.py b/users/views/user_profile_view.py index 83b49e8..169b265 100644 --- a/users/views/user_profile_view.py +++ b/users/views/user_profile_view.py @@ -23,7 +23,7 @@ class UserProfileAPIView(APIView): - delete: Delete a user profile by user ID. """ - def get(self, request: HttpRequest, userid: int) -> Response: # pylint: disable=unused-argument + def get(self, request: HttpRequest, userid: int) -> Response: """ Retrieve a user by their ID. @@ -73,7 +73,7 @@ def put(self, request: HttpRequest, userid: int) -> Response: logger.error(USER_WITH_ID_NOT_FOUND, userid) return Response({'error': USER_NOT_FOUND_MESSAGE}, status=status.HTTP_404_NOT_FOUND) - def delete(self, request: HttpRequest, userid: int) -> Response: # pylint: disable=unused-argument + def delete(self, request: HttpRequest, userid: int) -> Response: """ Deletes a user with the given userid. diff --git a/videos/__init__.py b/videos/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/videos/admin.py b/videos/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/videos/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/videos/apps.py b/videos/apps.py new file mode 100644 index 0000000..886e013 --- /dev/null +++ b/videos/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class VideosConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'videos' diff --git a/videos/migrations/__init__.py b/videos/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/videos/models.py b/videos/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/videos/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/videos/tests.py b/videos/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/videos/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/videos/views.py b/videos/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/videos/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here.