Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add videos app and related files #17

Merged
merged 1 commit into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Loading