This repository has been archived by the owner on Dec 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
style: Update source code to satisfy pep8 style guide
- Loading branch information
1 parent
05d2be7
commit 7073483
Showing
21 changed files
with
146 additions
and
101 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
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,7 +1,11 @@ | ||
from django.conf import settings | ||
from django.db import models | ||
# 유저 정보 import | ||
from django.conf import settings | ||
|
||
|
||
class Profile(models.Model): | ||
user = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE) | ||
image = models.ImageField(upload_to='profile/', blank=True) | ||
user = models.ForeignKey( | ||
settings.AUTH_USER_MODEL, | ||
on_delete=models.CASCADE, | ||
) | ||
image = models.ImageField(upload_to='profile/', blank=True) |
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,3 +1,2 @@ | ||
from django.test import TestCase | ||
|
||
# from django.test import TestCase | ||
# Create your tests 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
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,5 +1,6 @@ | ||
from django.contrib import admin | ||
|
||
from .models import Comment | ||
|
||
# Register your models here. | ||
admin.site.register(Comment) | ||
admin.site.register(Comment) |
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,7 +1,9 @@ | ||
from django import forms | ||
|
||
from .models import Comment | ||
|
||
|
||
class CommentForm(forms.ModelForm): | ||
class Meta: | ||
model = Comment | ||
fields = ['content'] | ||
fields = ['content'] |
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,15 +1,22 @@ | ||
from django.db import models | ||
# 유저 정보 import | ||
from django.conf import settings | ||
from django.db import models | ||
|
||
from page.models import Post | ||
# 유저 정보 import | ||
|
||
# Create your models here. | ||
|
||
|
||
class Comment(models.Model): | ||
# related_name | ||
title = models.ForeignKey(Post, on_delete=models.CASCADE, related_name='comments') | ||
author = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE) | ||
title = models.ForeignKey( | ||
Post, on_delete=models.CASCADE, related_name='comments', | ||
) | ||
author = models.ForeignKey( | ||
settings.AUTH_USER_MODEL, on_delete=models.CASCADE, | ||
) | ||
pub_date = models.DateTimeField('publish') | ||
content = models.CharField(max_length=200) | ||
|
||
def __str__(self): | ||
return self.content | ||
return self.content |
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,3 +1,2 @@ | ||
from django.test import TestCase | ||
|
||
# from django.test import TestCase | ||
# Create your tests 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
from django.urls import path | ||
|
||
from . import views | ||
|
||
urlpatterns = [ | ||
path('new/<int:post_id>', views.comment_new, name='comment_new'), | ||
path('delete/<int:post_id>/<int:comment_id>', views.comment_delete, name='comment_delete'), | ||
] | ||
path( | ||
'delete/<int:post_id>/<int:comment_id>', | ||
views.comment_delete, name='comment_delete', | ||
), | ||
] |
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
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
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
Oops, something went wrong.