diff --git a/groups/templates/groups/main.html b/groups/templates/groups/main.html
index 47857e6..2bc3c8e 100644
--- a/groups/templates/groups/main.html
+++ b/groups/templates/groups/main.html
@@ -193,8 +193,6 @@
여기
diff --git a/groups/urls.py b/groups/urls.py
index 4019f23..9206488 100644
--- a/groups/urls.py
+++ b/groups/urls.py
@@ -5,8 +5,6 @@
urlpatterns = [
path('', views.main, name="main"),
path('/certify/', views.certify, name="certify"),
- path('/personal/', views.personal, name="personal"),
- path('/show_certify/', views.show_certify, name="show_certify"),
path('group_list/', views.group_list, name="group_list"),
path('group_detail/', views.group_detail, name="group_detail"),
path('make_group/', views.make_group, name="make_group")
diff --git a/groups/views.py b/groups/views.py
index b6f9337..88ddcc6 100644
--- a/groups/views.py
+++ b/groups/views.py
@@ -34,14 +34,22 @@ def main(request, goal_id):
daily_name.append(name)
total_name.append(daily_name)
+ certifiy_list = goal.certifies.all()
+ status = get_status(goal)
+
context = {
'goal': goal,
'dates': board['dates'],
'member_count': member_count,
'level': level,
- 'name': total_name
-
+ 'name': total_name,
+ 'certifies': certifiy_list,
+ 'achievements': board['achievements'],
+ 'start_days': status['start_days'],
+ 'success_days': status['success_days'],
+ 'continuity_days': status['continuity_days'],
}
+
return render(request, 'groups/main.html', context)
@@ -66,21 +74,6 @@ def certify(request, goal_id):
return render(request, 'groups/certify.html', {'goal': goal})
-def personal(request, goal_id):
- goal = get_object_or_404(Goal, pk=goal_id)
- status = get_status(goal)
- board = get_board(goal)
- context = {
- 'goal': goal,
- 'start_days': status['start_days'],
- 'success_days': status['success_days'],
- 'continuity_days': status['continuity_days'],
- 'dates': board['dates'],
- 'achievements': board['achievements'],
- }
- return render(request, 'groups/personal.html', context)
-
-
def get_status(goal): # 시작, 성공, 연속 일수를 리턴하는 함수
certifies = goal.certifies.all()
start_days = (datetime.date.today() - goal.start_date).days + 1
@@ -124,12 +117,6 @@ def get_board(goal): # 도장판의 날짜와 성공 여부를 리턴하는
return res
-def show_certify(request, goal_id):
- goal = Goal.objects.get(pk=goal_id)
- certifies = goal.certifies.all()
- return render(request, 'groups/show_certify.html', {'goal': goal, 'certifies': certifies})
-
-
def group_list(request):
return render(request, 'groups/group_list.html')