diff --git a/B_main/__pycache__/forms.cpython-38.pyc b/B_main/__pycache__/forms.cpython-38.pyc index ad80524..a50aa67 100644 Binary files a/B_main/__pycache__/forms.cpython-38.pyc and b/B_main/__pycache__/forms.cpython-38.pyc differ diff --git a/B_main/__pycache__/urls.cpython-38.pyc b/B_main/__pycache__/urls.cpython-38.pyc index 78d1067..e579fc2 100644 Binary files a/B_main/__pycache__/urls.cpython-38.pyc and b/B_main/__pycache__/urls.cpython-38.pyc differ diff --git a/B_main/__pycache__/views.cpython-38.pyc b/B_main/__pycache__/views.cpython-38.pyc index dbe18d9..3b5fdb2 100644 Binary files a/B_main/__pycache__/views.cpython-38.pyc and b/B_main/__pycache__/views.cpython-38.pyc differ diff --git a/B_main/forms.py b/B_main/forms.py index 61fa600..4c873bd 100644 --- a/B_main/forms.py +++ b/B_main/forms.py @@ -2,6 +2,7 @@ import re from django import forms from django.contrib.auth.models import User from .models import Person +from .peopleinfo import PEOPLE def format_phone_number(phone): """전화번호에서 대시 제거""" @@ -14,16 +15,20 @@ def format_phone_with_dash(phone): return f"{phone[:3]}-{phone[3:7]}-{phone[7:]}" return phone -# 허가된 사람들의 정보 (실제 데이터로 교체 필요) -PEOPLE = [ - {'이름': '김봉수', '연락처': '01033433319'}, - # ... 더 많은 사람들 -] +# peopleinfo.py에서 PEOPLE 데이터를 가져와서 허가된 사람들의 정보로 변환 +ALLOWED_PEOPLE = [] +for person in PEOPLE: + # 전화번호에서 대시 제거 + phone_without_dash = format_phone_number(person['연락처']) + ALLOWED_PEOPLE.append({ + '이름': person['이름'], + '연락처': phone_without_dash + }) def is_allowed_person(name, phone): """허가된 사람인지 확인""" formatted_phone = format_phone_number(phone) - for person in PEOPLE: + for person in ALLOWED_PEOPLE: if person['이름'] == name and person['연락처'] == formatted_phone: return True return False @@ -55,11 +60,11 @@ def is_already_registered(name, phone): def get_allowed_names(): """허가된 모든 이름 목록 반환""" - return [person['이름'] for person in PEOPLE] + return [person['이름'] for person in ALLOWED_PEOPLE] def get_phone_by_name(name): """이름으로 전화번호 찾기""" - for person in PEOPLE: + for person in ALLOWED_PEOPLE: if person['이름'] == name: return person['연락처'] return None @@ -137,7 +142,7 @@ class Step2AccountForm(forms.Form): ) privacy_agreement = forms.BooleanField( required=True, - label='정보공개 동의', + label='정보공개 및 개인정보처리방침 동의', widget=forms.CheckboxInput(attrs={ 'class': 'w-4 h-4 text-blue-600 bg-gray-700 border-gray-600 rounded focus:ring-blue-500 focus:ring-2' }) @@ -147,10 +152,14 @@ class Step2AccountForm(forms.Form): cleaned_data = super().clean() password1 = cleaned_data.get('password1') password2 = cleaned_data.get('password2') + privacy_agreement = cleaned_data.get('privacy_agreement') if password1 and password2 and password1 != password2: raise forms.ValidationError('비밀번호가 일치하지 않습니다.') + if not privacy_agreement: + raise forms.ValidationError('정보공개 및 개인정보처리방침 동의는 필수입니다.') + return cleaned_data def save(self, name, phone, request, commit=True): diff --git a/B_main/templates/B_main/signup.html b/B_main/templates/B_main/signup.html index ae58352..6a92014 100644 --- a/B_main/templates/B_main/signup.html +++ b/B_main/templates/B_main/signup.html @@ -102,23 +102,41 @@ +
+
+
+

1. 정보공개 동의

+

다음 정보의 공개에 동의합니다:

+
    +
  • 이름
  • +
  • 생년월일
  • +
  • 소속
  • +
  • 직책
  • +
  • 연락처
  • +
  • 주소
  • +
  • 사진
  • +
+

※ 위 정보는 신라 AMP 제8기 수강생들 간에 공유됩니다.

+ +

2. 개인정보처리방침 동의

+

신라 AMP은 다음의 목적을 위하여 개인정보를 처리하고 있으며, 다음의 목적 이외의 용도로는 이용하지 않습니다.

+
    +
  • 회원 가입의사 확인, 회원에 대한 서비스 제공에 따른 본인 식별·인증
  • +
  • 회원자격 유지·관리, 서비스 이용에 따른 본인확인
  • +
  • 신라 AMP 제8기 수강생들 간의 정보 공유 및 커뮤니케이션
  • +
  • 서비스 이용에 대한 통계 및 분석
  • +
+

수집하는 개인정보 항목:

+
    +
  • 필수항목: 이름, 전화번호, 소속, 직책, 주소, 생년월일, 사진
  • +
+

보유기간: 회원의 회원탈퇴 및 파기요청시 지체없이 파기

+

※ 자세한 내용은 개인정보처리방침을 참조하세요.

+
+
+
- {% if form2.privacy_agreement.help_text %} -
-

다음 정보의 공개에 동의합니다:

- -

※ 위 정보는 신라 AMP 제8기 수강생들 간에 공유됩니다.

-
- {% endif %}