-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/random-playlist-crud/#16' into main
- Loading branch information
Showing
37 changed files
with
12 additions
and
622 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,4 @@ | |
__pycache__/ | ||
db.sqlite3 | ||
/venv | ||
.idea | ||
media | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
default_app_config = 'accounts.apps.AccountsConfig' | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
from django.contrib import admin | ||
from .models import Profile | ||
|
||
@admin.register(Profile) | ||
class ProfileAdmin(admin.ModelAdmin): | ||
pass | ||
# Register your models here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
backend/accounts/migrations/0002_alter_profile_nickname.py
This file was deleted.
Oops, something went wrong.
19 changes: 0 additions & 19 deletions
19
backend/accounts/migrations/0003_alter_profile_profile_pic.py
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
backend/accounts/migrations/0004_alter_profile_profile_pic.py
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
backend/accounts/migrations/0005_alter_profile_profile_pic.py
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
backend/accounts/migrations/0006_alter_profile_profile_pic.py
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,3 @@ | ||
from django.conf import settings | ||
from django.db import models | ||
|
||
|
||
class TimeStampedModel(models.Model): | ||
''' | ||
모든 모델의 기본이 되는 TimeStampedModel | ||
생성일자, 수정일자가 자동 추가되도록 | ||
''' | ||
created_at = models.DateTimeField(auto_now_add=True) | ||
updated_at = models.DateTimeField(auto_now=True) | ||
|
||
class Meta: | ||
abstract = True | ||
|
||
|
||
class Profile(TimeStampedModel): | ||
user = models.OneToOneField(settings.AUTH_USER_MODEL, on_delete=models.CASCADE) | ||
nickname = models.CharField(max_length=150, unique=True, null=True) | ||
profile_pic = models.ImageField(null=True, upload_to="profiles/%Y/%m/%d") | ||
|
||
|
||
def __str__(self): | ||
return f'{self.pk}:{self.user.username} Profile' | ||
# Create your models here. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,3 @@ | ||
from rest_framework.viewsets import ModelViewSet | ||
from .models import Profile | ||
from .serializers import ProfileSerializer | ||
from django.shortcuts import render | ||
|
||
|
||
class ProfileViewSet(ModelViewSet): | ||
queryset = Profile.objects.all() | ||
serializer_class = ProfileSerializer | ||
# Create your views here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,3 @@ | ||
from django.contrib import admin | ||
|
||
from .models import Genre, Post, Notice, Playlist, Tag, Track | ||
|
||
|
||
@admin.register(Post) | ||
class PostAdmin(admin.ModelAdmin): | ||
pass | ||
|
||
|
||
@admin.register(Notice) | ||
class NoticeAdmin(admin.ModelAdmin): | ||
pass | ||
|
||
|
||
@admin.register(Playlist) | ||
class PostAdmin(admin.ModelAdmin): | ||
pass | ||
|
||
|
||
@admin.register(Genre) | ||
class GenreAdmin(admin.ModelAdmin): | ||
pass | ||
|
||
|
||
@admin.register(Tag) | ||
class TagAdmin(admin.ModelAdmin): | ||
pass | ||
|
||
|
||
@admin.register(Track) | ||
class TrackAdmin(admin.ModelAdmin): | ||
pass | ||
# Register your models here. |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.