Skip to content

Commit

Permalink
Add videos app and related files
Browse files Browse the repository at this point in the history
  • Loading branch information
EdinsonRequena committed Feb 19, 2024
1 parent 46956cc commit 8785808
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 3 deletions.
1 change: 1 addition & 0 deletions tiktok_clone_back/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@

LOCAL_APPS = [
'users',
'videos',
]

DJANGO_APPS = [
Expand Down
2 changes: 1 addition & 1 deletion users/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down
4 changes: 2 additions & 2 deletions users/views/user_profile_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
Empty file added videos/__init__.py
Empty file.
3 changes: 3 additions & 0 deletions videos/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.contrib import admin

# Register your models here.
6 changes: 6 additions & 0 deletions videos/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from django.apps import AppConfig


class VideosConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'videos'
Empty file added videos/migrations/__init__.py
Empty file.
3 changes: 3 additions & 0 deletions videos/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.db import models

# Create your models here.
3 changes: 3 additions & 0 deletions videos/tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.test import TestCase

# Create your tests here.
3 changes: 3 additions & 0 deletions videos/views.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.shortcuts import render

# Create your views here.

0 comments on commit 8785808

Please sign in to comment.