From da0c4f794192b35262cd47532a736f0d379fd355 Mon Sep 17 00:00:00 2001 From: hyunmin0317 Date: Tue, 23 Jan 2024 19:36:55 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=EA=B8=B0=EC=B4=88=EA=B5=90=EC=96=91?= =?UTF-8?q?=20=EA=B0=9C=EC=88=98=20=EC=98=A4=EB=A5=98=20(#288)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/settings.py | 6 ++++-- core/views.py | 9 ++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/config/settings.py b/config/settings.py index bd69e9a..ad969bc 100644 --- a/config/settings.py +++ b/config/settings.py @@ -146,8 +146,10 @@ TYPE_CHOICES = (("1전선", "1전선"), ("1전심", "1전심"), ("교선", "교선"), ("교필", "교필"), ("1교직", "1교직"), ("1전필", "1전필"), ("일선", "일선")) SUBTYPE_CHOICES_E = (("전문지식탐구역량", "전문지식탐구역량"), ("창의적문제해결역량", "창의적문제해결역량"), ("융복합역량", "융복합역량"), ("다양성존중역량", "다양성존중역량"), ("윤리실천역량", "윤리실천역량")) SUBTYPE_CHOICES_S = (("인문", "인문"), ("사회", "사회"), ("자연", "자연"), ("공학", "공학"), ("예술", "예술")) -CULTURES = [{'number': 'HALR1032', 'name': '사고와표현', 'credit': 3, 'semester': '1, 2'}, {'number': 'HALR1050\nHALR1231', 'name': 'EnglishforAcademicPurpose\n기초수학', 'credit': 3, 'semester': '1, 2'}, {'number': 'HALR1238', 'name': '컴퓨팅사고와데이터의이해', 'credit': 2, 'semester': '1'}, {'number': 'HALR1239', 'name': '알고리즘과게임콘텐츠', 'credit': 2, 'semester': '2'}] -CULTURES_DIC = [['사고와표현'], ['English', '영어', '수학', '미적분학'], ['컴퓨팅사고'], ['알고리즘']] +CULTURES_1 = [{'number': 'HALR1032', 'name': '사고와표현', 'credit': 3, 'semester': '1, 2'}, {'number': 'HALR1050\nHALR1231', 'name': 'EnglishforAcademicPurpose\n기초수학', 'credit': 3, 'semester': '1, 2'}, {'number': 'HALR1238\nHALR1239', 'name': '컴퓨팅사고와데이터의이해\n알고리즘과게임콘텐츠', 'credit': 2, 'semester': '1 | 2'}] +CULTURES_2 = [{'number': 'HALR1032', 'name': '사고와표현', 'credit': 3, 'semester': '1, 2'}, {'number': 'HALR1050\nHALR1231', 'name': 'EnglishforAcademicPurpose\n기초수학', 'credit': 3, 'semester': '1, 2'}, {'number': 'HALR1238', 'name': '컴퓨팅사고와데이터의이해', 'credit': 2, 'semester': '1'}, {'number': 'HALR1239', 'name': '알고리즘과게임콘텐츠', 'credit': 2, 'semester': '2'}] +CULTURES_DIC1 = [['사고와표현'], ['English', '영어', '수학', '미적분학'], ['컴퓨팅사고', '알고리즘']] +CULTURES_DIC2 = [['사고와표현'], ['English', '영어', '수학', '미적분학'], ['컴퓨팅사고'], ['알고리즘']] DEPT_DIC = {'융합전자공학전공': '지능IOT융합전공', '지능·데이터융합학부': '핀테크전공'} CATEGORY_CHOICES = ((1, "학사"), (2, "등록/장학"), (3, "학생생활"), (4, "진로취업"), (5, "기타")) STATUS_CHOICES = ((1, "진행중"), (2, "답변대기"), (3, "답변완료"), (4, "만료"), (5, "반려")) diff --git a/core/views.py b/core/views.py index 15d1450..e1e235b 100644 --- a/core/views.py +++ b/core/views.py @@ -9,7 +9,7 @@ from sangmyung_univ_auth import completed_courses from accounts.models import Profile, Department, Statistics -from config.settings import CULTURES, CULTURES_DIC +from config.settings import CULTURES_1, CULTURES_2, CULTURES_DIC1, CULTURES_DIC2 from core.models import Course from graduations.models import Subject, Major import logging @@ -156,10 +156,9 @@ def course_update_excel(request): def result(request): profile = get_object_or_404(Profile, user=request.user) courses = Course.objects.filter(user=request.user) - culture_b = CULTURES - culture_dic = CULTURES_DIC - - cnt = 0 + cnt, check = 0, int(profile.year.year) < 2020 + culture_b = CULTURES_1 if check else CULTURES_2 + culture_dic = CULTURES_DIC1 if check else CULTURES_DIC2 for culture, dics in zip(culture_b, culture_dic): q = Q() for key in dics: From 9289f63d726e076839a75b7aa22034f78ecaa20f Mon Sep 17 00:00:00 2001 From: hyunmin0317 Date: Tue, 23 Jan 2024 19:37:39 +0900 Subject: [PATCH 2/2] version: 1.5.4 (#288) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1f8e1c2..dfda5f3 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# SMUNITY ![Python versions](https://img.shields.io/badge/Python-3.9-blue) ![License](https://img.shields.io/badge/license-MIT-green) ![Release](https://img.shields.io/badge/release-1.5.3-red) +# SMUNITY ![Python versions](https://img.shields.io/badge/Python-3.9-blue) ![License](https://img.shields.io/badge/license-MIT-green) ![Release](https://img.shields.io/badge/release-1.5.4-red) #### 상명대학교 졸업요건 검사 사이트