- 아이디{{ certify.user }} diff --git a/groups/urls.py b/groups/urls.py index 9206488..d3887b1 100644 --- a/groups/urls.py +++ b/groups/urls.py @@ -7,5 +7,8 @@ path('
그룹 참여하기
{% for goal in goals %}
+ {% if goal.member_limit > goal.member.count %}
+ {% endif %}
{% endfor %}
그룹 만들기
diff --git a/main/views.py b/main/views.py
index 305224b..849c243 100644
--- a/main/views.py
+++ b/main/views.py
@@ -1,6 +1,9 @@
from django.shortcuts import render, redirect
from django.utils import *
from .models import Goal
+from datetime import datetime
+import datetime
+
def main_login(request):
return render(request, 'main/main_login.html')
@@ -11,7 +14,8 @@ def main_logout(request):
def goal_main(request):
- goals = Goal.objects.all()
+ today = datetime.date.today()
+ goals = Goal.objects.filter(deadline__gte=today)
return render(request, 'main/goal_main.html', {'goals':goals})
diff --git a/users/templates/users/mypage.html b/users/templates/users/mypage.html
index dd1d7aa..e05f71d 100644
--- a/users/templates/users/mypage.html
+++ b/users/templates/users/mypage.html
@@ -18,7 +18,7 @@ 내가 개설한 목표
{% for goal in my_goal %}
{% endfor %}
@@ -28,7 +28,7 @@ 내가 참여한 목표
{% for goal in participate_goal %}
{% endfor %}