diff --git a/BACK/__pycache__/__init__.cpython-311.pyc b/BACK/__pycache__/__init__.cpython-311.pyc index 6d9780a..1b5f322 100644 Binary files a/BACK/__pycache__/__init__.cpython-311.pyc and b/BACK/__pycache__/__init__.cpython-311.pyc differ diff --git a/BACK/__pycache__/settings.cpython-311.pyc b/BACK/__pycache__/settings.cpython-311.pyc index bf0ca2d..d3bd605 100644 Binary files a/BACK/__pycache__/settings.cpython-311.pyc and b/BACK/__pycache__/settings.cpython-311.pyc differ diff --git a/BACK/__pycache__/urls.cpython-311.pyc b/BACK/__pycache__/urls.cpython-311.pyc index 98cee2e..3c63f30 100644 Binary files a/BACK/__pycache__/urls.cpython-311.pyc and b/BACK/__pycache__/urls.cpython-311.pyc differ diff --git a/BACK/__pycache__/wsgi.cpython-311.pyc b/BACK/__pycache__/wsgi.cpython-311.pyc index eded51c..f72f747 100644 Binary files a/BACK/__pycache__/wsgi.cpython-311.pyc and b/BACK/__pycache__/wsgi.cpython-311.pyc differ diff --git "a/activity_attachments/\354\204\244\353\223\235\354\235\230_\352\263\274\355\225\231_\355\203\200\354\235\264\355\225\221_9\354\243\274\354\260\250.pdf" "b/activity_attachments/\354\204\244\353\223\235\354\235\230_\352\263\274\355\225\231_\355\203\200\354\235\264\355\225\221_9\354\243\274\354\260\250.pdf" new file mode 100644 index 0000000..2c06a33 Binary files /dev/null and "b/activity_attachments/\354\204\244\353\223\235\354\235\230_\352\263\274\355\225\231_\355\203\200\354\235\264\355\225\221_9\354\243\274\354\260\250.pdf" differ diff --git a/db.sqlite3 b/db.sqlite3 deleted file mode 100644 index cf9072f..0000000 Binary files a/db.sqlite3 and /dev/null differ diff --git a/joinFormapp/__pycache__/__init__.cpython-311.pyc b/joinFormapp/__pycache__/__init__.cpython-311.pyc index 6763c0c..d027fbf 100644 Binary files a/joinFormapp/__pycache__/__init__.cpython-311.pyc and b/joinFormapp/__pycache__/__init__.cpython-311.pyc differ diff --git a/joinFormapp/__pycache__/admin.cpython-311.pyc b/joinFormapp/__pycache__/admin.cpython-311.pyc index 9321894..89ecfee 100644 Binary files a/joinFormapp/__pycache__/admin.cpython-311.pyc and b/joinFormapp/__pycache__/admin.cpython-311.pyc differ diff --git a/joinFormapp/__pycache__/apps.cpython-311.pyc b/joinFormapp/__pycache__/apps.cpython-311.pyc index c3e94f9..8bfa9dd 100644 Binary files a/joinFormapp/__pycache__/apps.cpython-311.pyc and b/joinFormapp/__pycache__/apps.cpython-311.pyc differ diff --git a/joinFormapp/__pycache__/forms.cpython-311.pyc b/joinFormapp/__pycache__/forms.cpython-311.pyc index 02f81f4..fb7d2d9 100644 Binary files a/joinFormapp/__pycache__/forms.cpython-311.pyc and b/joinFormapp/__pycache__/forms.cpython-311.pyc differ diff --git a/joinFormapp/__pycache__/models.cpython-311.pyc b/joinFormapp/__pycache__/models.cpython-311.pyc index 90fef31..6776692 100644 Binary files a/joinFormapp/__pycache__/models.cpython-311.pyc and b/joinFormapp/__pycache__/models.cpython-311.pyc differ diff --git a/joinFormapp/__pycache__/urls.cpython-311.pyc b/joinFormapp/__pycache__/urls.cpython-311.pyc index d914708..7d2d751 100644 Binary files a/joinFormapp/__pycache__/urls.cpython-311.pyc and b/joinFormapp/__pycache__/urls.cpython-311.pyc differ diff --git a/joinFormapp/__pycache__/views.cpython-311.pyc b/joinFormapp/__pycache__/views.cpython-311.pyc index 862bc54..6a9c0db 100644 Binary files a/joinFormapp/__pycache__/views.cpython-311.pyc and b/joinFormapp/__pycache__/views.cpython-311.pyc differ diff --git a/joinFormapp/migrations/__pycache__/0001_initial.cpython-311.pyc b/joinFormapp/migrations/__pycache__/0001_initial.cpython-311.pyc index 6296878..a7b3571 100644 Binary files a/joinFormapp/migrations/__pycache__/0001_initial.cpython-311.pyc and b/joinFormapp/migrations/__pycache__/0001_initial.cpython-311.pyc differ diff --git a/joinFormapp/migrations/__pycache__/__init__.cpython-311.pyc b/joinFormapp/migrations/__pycache__/__init__.cpython-311.pyc index 62b3992..3640232 100644 Binary files a/joinFormapp/migrations/__pycache__/__init__.cpython-311.pyc and b/joinFormapp/migrations/__pycache__/__init__.cpython-311.pyc differ diff --git a/joinFormapp/models.py b/joinFormapp/models.py index 4ac080f..77fa420 100644 --- a/joinFormapp/models.py +++ b/joinFormapp/models.py @@ -6,7 +6,7 @@ class Applicant(models.Model): phone_number = models.CharField(max_length=20) introduction = models.TextField() motivation = models.TextField() - activity_attachment = models.FileField(upload_to='activity_attachments/') + activity_attachment = models.FileField(upload_to='activity_attachments/', blank=True) github_or_tistory = models.URLField(blank=True) # 게시글의 제목을 name으로 설정 diff --git a/joinFormapp/templates/joinFormapp/arready.html b/joinFormapp/templates/joinFormapp/arready.html new file mode 100644 index 0000000..e123766 --- /dev/null +++ b/joinFormapp/templates/joinFormapp/arready.html @@ -0,0 +1,14 @@ +{% load static %} + + + + + + Document + + + +

아직 조회 기간이 아닙니다.

+ + + diff --git a/joinFormapp/views.py b/joinFormapp/views.py index ea1a06e..5b60951 100644 --- a/joinFormapp/views.py +++ b/joinFormapp/views.py @@ -1,14 +1,13 @@ from django.shortcuts import render, redirect -from .forms import ApplicantForm -from .models import Applicant - -from django.shortcuts import render, redirect -from .models import Applicant -from django.contrib import messages +from joinFormapp.models import Applicant +from pageapp.models import userList +from django.utils import timezone +from django.contrib import messages def show_joinForm(request): + current_date = timezone.now().date() + # POST 요청일 때, 지원서 데이터를 저장합니다. if request.method == 'POST': - # POST 요청일 때, 지원서 데이터를 저장합니다. name = request.POST.get('name') phone_number = request.POST.get('phone_number') introduction = request.POST.get('introduction') @@ -26,12 +25,14 @@ def show_joinForm(request): github_or_tistory=github_or_tistory ) applicant.save() - + + userList.objects.create(username=applicant.name, usernum=applicant.phone_number) messages.success(request, '지원서가 성공적으로 제출되었습니다. 감사합니다!') - # 저장이 완료되면 어떤 페이지로 redirect할지 정의합니다. return redirect('joinFormapp:show_joinForm') - else: - # GET 요청일 때, 지원서 입력 폼을 보여줍니다. - return render(request, 'joinFormapp/application_form.html') \ No newline at end of file + if current_date.month != 1 or current_date.day != 12: + return render(request, 'joinFormapp/arready.html') # 조회 기간 아님 + else: + # GET 요청일 때, 지원서 입력 폼을 보여줍니다. + return render(request, 'joinFormapp/application_form.html') diff --git a/pageapp/__pycache__/__init__.cpython-311.pyc b/pageapp/__pycache__/__init__.cpython-311.pyc index a7de902..2af685a 100644 Binary files a/pageapp/__pycache__/__init__.cpython-311.pyc and b/pageapp/__pycache__/__init__.cpython-311.pyc differ diff --git a/pageapp/__pycache__/admin.cpython-311.pyc b/pageapp/__pycache__/admin.cpython-311.pyc index 59a3a2c..96002ad 100644 Binary files a/pageapp/__pycache__/admin.cpython-311.pyc and b/pageapp/__pycache__/admin.cpython-311.pyc differ diff --git a/pageapp/__pycache__/apps.cpython-311.pyc b/pageapp/__pycache__/apps.cpython-311.pyc index 7b20936..75ee023 100644 Binary files a/pageapp/__pycache__/apps.cpython-311.pyc and b/pageapp/__pycache__/apps.cpython-311.pyc differ diff --git a/pageapp/__pycache__/models.cpython-311.pyc b/pageapp/__pycache__/models.cpython-311.pyc index f8c9247..4b5ef8d 100644 Binary files a/pageapp/__pycache__/models.cpython-311.pyc and b/pageapp/__pycache__/models.cpython-311.pyc differ diff --git a/pageapp/__pycache__/urls.cpython-311.pyc b/pageapp/__pycache__/urls.cpython-311.pyc index 0ca9c29..903088c 100644 Binary files a/pageapp/__pycache__/urls.cpython-311.pyc and b/pageapp/__pycache__/urls.cpython-311.pyc differ diff --git a/pageapp/__pycache__/views.cpython-311.pyc b/pageapp/__pycache__/views.cpython-311.pyc index 54d18f1..30037dc 100644 Binary files a/pageapp/__pycache__/views.cpython-311.pyc and b/pageapp/__pycache__/views.cpython-311.pyc differ diff --git a/pageapp/migrations/__pycache__/0001_initial.cpython-311.pyc b/pageapp/migrations/__pycache__/0001_initial.cpython-311.pyc index 481c798..b72c483 100644 Binary files a/pageapp/migrations/__pycache__/0001_initial.cpython-311.pyc and b/pageapp/migrations/__pycache__/0001_initial.cpython-311.pyc differ diff --git a/pageapp/migrations/__pycache__/__init__.cpython-311.pyc b/pageapp/migrations/__pycache__/__init__.cpython-311.pyc index 1c8a948..14d2b59 100644 Binary files a/pageapp/migrations/__pycache__/__init__.cpython-311.pyc and b/pageapp/migrations/__pycache__/__init__.cpython-311.pyc differ