Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
kwanok committed Mar 18, 2024
1 parent 3213175 commit 08fb78d
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
1 change: 0 additions & 1 deletion web/project/terms_of_use/admin.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
from django.contrib import admin

# Register your models here.
3 changes: 2 additions & 1 deletion web/project/terms_of_use/models.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
from django.db import models


# Create your models here.
class TermsOfUse(models.Model):
content = models.TextField()
updated_at = models.DateTimeField(auto_now=True)

def __str__(self):
return f"이용약관 업데이트 시간: {self.updated_at}"
return f"이용약관 업데이트 시간: {self.updated_at}"
1 change: 0 additions & 1 deletion web/project/terms_of_use/tests.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
from django.test import TestCase

# Create your tests here.
4 changes: 2 additions & 2 deletions web/project/terms_of_use/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
from .views import terms_of_use_view

urlpatterns = [
path('', terms_of_use_view, name='terms_of_use'),
]
path("", terms_of_use_view, name="terms_of_use"),
]
3 changes: 2 additions & 1 deletion web/project/terms_of_use/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

# Create your views here.


def terms_of_use_view(request):
terms = TermsOfUse.objects.first() # 가장 최근의 이용약관을 가져옵니다.
return render(request, 'terms_of_use/terms_of_use.html', {'terms': terms})
return render(request, "terms_of_use/terms_of_use.html", {"terms": terms})

0 comments on commit 08fb78d

Please sign in to comment.