diff --git a/MyProject/MyProject/__pycache__/__init__.cpython-310.pyc b/MyProject/MyProject/__pycache__/__init__.cpython-310.pyc index f5488e75..c2d92206 100644 Binary files a/MyProject/MyProject/__pycache__/__init__.cpython-310.pyc and b/MyProject/MyProject/__pycache__/__init__.cpython-310.pyc differ diff --git a/MyProject/MyProject/__pycache__/settings.cpython-310.pyc b/MyProject/MyProject/__pycache__/settings.cpython-310.pyc index d0a4c817..661f520d 100644 Binary files a/MyProject/MyProject/__pycache__/settings.cpython-310.pyc and b/MyProject/MyProject/__pycache__/settings.cpython-310.pyc differ diff --git a/MyProject/MyProject/__pycache__/urls.cpython-310.pyc b/MyProject/MyProject/__pycache__/urls.cpython-310.pyc index 9b8e8160..44c56162 100644 Binary files a/MyProject/MyProject/__pycache__/urls.cpython-310.pyc and b/MyProject/MyProject/__pycache__/urls.cpython-310.pyc differ diff --git a/MyProject/MyProject/__pycache__/wsgi.cpython-310.pyc b/MyProject/MyProject/__pycache__/wsgi.cpython-310.pyc index b7068865..32c87b4a 100644 Binary files a/MyProject/MyProject/__pycache__/wsgi.cpython-310.pyc and b/MyProject/MyProject/__pycache__/wsgi.cpython-310.pyc differ diff --git a/MyProject/book/__pycache__/__init__.cpython-310.pyc b/MyProject/book/__pycache__/__init__.cpython-310.pyc index 3cd63b76..35f86c08 100644 Binary files a/MyProject/book/__pycache__/__init__.cpython-310.pyc and b/MyProject/book/__pycache__/__init__.cpython-310.pyc differ diff --git a/MyProject/book/__pycache__/admin.cpython-310.pyc b/MyProject/book/__pycache__/admin.cpython-310.pyc index aa3ce555..83b16279 100644 Binary files a/MyProject/book/__pycache__/admin.cpython-310.pyc and b/MyProject/book/__pycache__/admin.cpython-310.pyc differ diff --git a/MyProject/book/__pycache__/apps.cpython-310.pyc b/MyProject/book/__pycache__/apps.cpython-310.pyc index 7618105e..a0b3dd16 100644 Binary files a/MyProject/book/__pycache__/apps.cpython-310.pyc and b/MyProject/book/__pycache__/apps.cpython-310.pyc differ diff --git a/MyProject/book/__pycache__/forms.cpython-310.pyc b/MyProject/book/__pycache__/forms.cpython-310.pyc index 2c8c2a4a..85699993 100644 Binary files a/MyProject/book/__pycache__/forms.cpython-310.pyc and b/MyProject/book/__pycache__/forms.cpython-310.pyc differ diff --git a/MyProject/book/__pycache__/models.cpython-310.pyc b/MyProject/book/__pycache__/models.cpython-310.pyc index 5d408412..0e8fd41e 100644 Binary files a/MyProject/book/__pycache__/models.cpython-310.pyc and b/MyProject/book/__pycache__/models.cpython-310.pyc differ diff --git a/MyProject/book/__pycache__/views.cpython-310.pyc b/MyProject/book/__pycache__/views.cpython-310.pyc index 56f867bc..f7ec8798 100644 Binary files a/MyProject/book/__pycache__/views.cpython-310.pyc and b/MyProject/book/__pycache__/views.cpython-310.pyc differ diff --git a/MyProject/book/forms.py b/MyProject/book/forms.py index 8ac21de5..7707b914 100644 --- a/MyProject/book/forms.py +++ b/MyProject/book/forms.py @@ -14,10 +14,10 @@ class Meta: #widgets = {"DH_PREVISTO_SAIDA": forms.TimeInput} class RelatorioFormulario(forms.ModelForm): - class Meta: - model = Voo - fields = ['DH_PREVISTO_SAIDA','DH_PREVISTO_CHEGADA','NM_AEROPORTO_SAIDA','NM_AEROPORTO_CHEGADA'] - + relatorio = forms.CharField(label="Relatorio") + DH_PREVISTO_CHEGADA_i = forms.DateField(label="data prevista de chegada inicial") + DH_PREVISTO_CHEGADA_f = forms.DateField(label="data prevista de chegada final") + class VooFormularioUpdate(forms.ModelForm): class Meta: model = Voo diff --git a/MyProject/book/migrations/__pycache__/0001_initial.cpython-310.pyc b/MyProject/book/migrations/__pycache__/0001_initial.cpython-310.pyc index aa186cfe..2c25b0d7 100644 Binary files a/MyProject/book/migrations/__pycache__/0001_initial.cpython-310.pyc and b/MyProject/book/migrations/__pycache__/0001_initial.cpython-310.pyc differ diff --git a/MyProject/book/migrations/__pycache__/0002_remove_voo_estado_vooreal.cpython-310.pyc b/MyProject/book/migrations/__pycache__/0002_remove_voo_estado_vooreal.cpython-310.pyc index 33da0610..c8786b38 100644 Binary files a/MyProject/book/migrations/__pycache__/0002_remove_voo_estado_vooreal.cpython-310.pyc and b/MyProject/book/migrations/__pycache__/0002_remove_voo_estado_vooreal.cpython-310.pyc differ diff --git a/MyProject/book/migrations/__pycache__/0003_rename_previstochegada_voo_dh_previsto_chegada_and_more.cpython-310.pyc b/MyProject/book/migrations/__pycache__/0003_rename_previstochegada_voo_dh_previsto_chegada_and_more.cpython-310.pyc index dbb9bb61..02a3cf5e 100644 Binary files a/MyProject/book/migrations/__pycache__/0003_rename_previstochegada_voo_dh_previsto_chegada_and_more.cpython-310.pyc and b/MyProject/book/migrations/__pycache__/0003_rename_previstochegada_voo_dh_previsto_chegada_and_more.cpython-310.pyc differ diff --git a/MyProject/book/migrations/__pycache__/0004_alter_voo_dh_previsto_chegada_and_more.cpython-310.pyc b/MyProject/book/migrations/__pycache__/0004_alter_voo_dh_previsto_chegada_and_more.cpython-310.pyc index 5d604f9a..41bdbb52 100644 Binary files a/MyProject/book/migrations/__pycache__/0004_alter_voo_dh_previsto_chegada_and_more.cpython-310.pyc and b/MyProject/book/migrations/__pycache__/0004_alter_voo_dh_previsto_chegada_and_more.cpython-310.pyc differ diff --git a/MyProject/book/migrations/__pycache__/0005_usuario.cpython-310.pyc b/MyProject/book/migrations/__pycache__/0005_usuario.cpython-310.pyc index 70eb069b..3f1af10e 100644 Binary files a/MyProject/book/migrations/__pycache__/0005_usuario.cpython-310.pyc and b/MyProject/book/migrations/__pycache__/0005_usuario.cpython-310.pyc differ diff --git a/MyProject/book/migrations/__pycache__/0006_alter_voo_options.cpython-310.pyc b/MyProject/book/migrations/__pycache__/0006_alter_voo_options.cpython-310.pyc index 5296d7da..827752af 100644 Binary files a/MyProject/book/migrations/__pycache__/0006_alter_voo_options.cpython-310.pyc and b/MyProject/book/migrations/__pycache__/0006_alter_voo_options.cpython-310.pyc differ diff --git a/MyProject/book/migrations/__pycache__/0007_user.cpython-310.pyc b/MyProject/book/migrations/__pycache__/0007_user.cpython-310.pyc index aa089082..c78570fd 100644 Binary files a/MyProject/book/migrations/__pycache__/0007_user.cpython-310.pyc and b/MyProject/book/migrations/__pycache__/0007_user.cpython-310.pyc differ diff --git a/MyProject/book/migrations/__pycache__/0008_alter_voo_options.cpython-310.pyc b/MyProject/book/migrations/__pycache__/0008_alter_voo_options.cpython-310.pyc index 7e60fb62..4c91accb 100644 Binary files a/MyProject/book/migrations/__pycache__/0008_alter_voo_options.cpython-310.pyc and b/MyProject/book/migrations/__pycache__/0008_alter_voo_options.cpython-310.pyc differ diff --git a/MyProject/book/migrations/__pycache__/0009_alter_user_options.cpython-310.pyc b/MyProject/book/migrations/__pycache__/0009_alter_user_options.cpython-310.pyc index f0c572ff..6d6fab79 100644 Binary files a/MyProject/book/migrations/__pycache__/0009_alter_user_options.cpython-310.pyc and b/MyProject/book/migrations/__pycache__/0009_alter_user_options.cpython-310.pyc differ diff --git a/MyProject/book/migrations/__pycache__/0010_alter_user_options.cpython-310.pyc b/MyProject/book/migrations/__pycache__/0010_alter_user_options.cpython-310.pyc index 79520bfd..130587f9 100644 Binary files a/MyProject/book/migrations/__pycache__/0010_alter_user_options.cpython-310.pyc and b/MyProject/book/migrations/__pycache__/0010_alter_user_options.cpython-310.pyc differ diff --git a/MyProject/book/migrations/__pycache__/0011_alter_vooreal_dh_real_chegada_and_more.cpython-310.pyc b/MyProject/book/migrations/__pycache__/0011_alter_vooreal_dh_real_chegada_and_more.cpython-310.pyc index 0720eb12..c6c1adc5 100644 Binary files a/MyProject/book/migrations/__pycache__/0011_alter_vooreal_dh_real_chegada_and_more.cpython-310.pyc and b/MyProject/book/migrations/__pycache__/0011_alter_vooreal_dh_real_chegada_and_more.cpython-310.pyc differ diff --git a/MyProject/book/migrations/__pycache__/0012_alter_vooreal_nm_status.cpython-310.pyc b/MyProject/book/migrations/__pycache__/0012_alter_vooreal_nm_status.cpython-310.pyc index b057e77f..1546a6f1 100644 Binary files a/MyProject/book/migrations/__pycache__/0012_alter_vooreal_nm_status.cpython-310.pyc and b/MyProject/book/migrations/__pycache__/0012_alter_vooreal_nm_status.cpython-310.pyc differ diff --git a/MyProject/book/migrations/__pycache__/0013_alter_vooreal_dh_real_chegada_and_more.cpython-310.pyc b/MyProject/book/migrations/__pycache__/0013_alter_vooreal_dh_real_chegada_and_more.cpython-310.pyc index f0c08635..301bd166 100644 Binary files a/MyProject/book/migrations/__pycache__/0013_alter_vooreal_dh_real_chegada_and_more.cpython-310.pyc and b/MyProject/book/migrations/__pycache__/0013_alter_vooreal_dh_real_chegada_and_more.cpython-310.pyc differ diff --git a/MyProject/book/migrations/__pycache__/0014_alter_vooreal_dh_real_chegada_and_more.cpython-310.pyc b/MyProject/book/migrations/__pycache__/0014_alter_vooreal_dh_real_chegada_and_more.cpython-310.pyc index 04539cd2..f0f71227 100644 Binary files a/MyProject/book/migrations/__pycache__/0014_alter_vooreal_dh_real_chegada_and_more.cpython-310.pyc and b/MyProject/book/migrations/__pycache__/0014_alter_vooreal_dh_real_chegada_and_more.cpython-310.pyc differ diff --git a/MyProject/book/migrations/__pycache__/0015_alter_vooreal_dh_real_chegada_and_more.cpython-310.pyc b/MyProject/book/migrations/__pycache__/0015_alter_vooreal_dh_real_chegada_and_more.cpython-310.pyc index 5781c5bb..a62f1015 100644 Binary files a/MyProject/book/migrations/__pycache__/0015_alter_vooreal_dh_real_chegada_and_more.cpython-310.pyc and b/MyProject/book/migrations/__pycache__/0015_alter_vooreal_dh_real_chegada_and_more.cpython-310.pyc differ diff --git a/MyProject/book/migrations/__pycache__/__init__.cpython-310.pyc b/MyProject/book/migrations/__pycache__/__init__.cpython-310.pyc index 8208842c..3f90107e 100644 Binary files a/MyProject/book/migrations/__pycache__/__init__.cpython-310.pyc and b/MyProject/book/migrations/__pycache__/__init__.cpython-310.pyc differ diff --git a/MyProject/book/views.py b/MyProject/book/views.py index 261cb6d9..6c6d1c3c 100644 --- a/MyProject/book/views.py +++ b/MyProject/book/views.py @@ -23,9 +23,21 @@ def crud(request): # fzr pdf @login_required(login_url='/accounts/login') @permission_required('book.access_relatorio', raise_exception= PermissionDenied) -def relatorio(request): - - return render(request, "relatorio.html") +def relatorio(request) : + if request.method == "POST" : + print('1') + form = RelatorioFormulario(request.POST) + if form.is_valid(): + print('2') + relatorio = form.cleaned_data['relatorio'] + DH_PREVISTO_CHEGADA_i = form.cleaned_data['DH_PREVISTO_CHEGADA_i'] + DH_PREVISTO_CHEGADA_f = form.cleaned_data['DH_PREVISTO_CHEGADA_f'] + print(relatorio) + print(DH_PREVISTO_CHEGADA_i) + print(DH_PREVISTO_CHEGADA_f) + return render(request, "relatorio.html") + else: + return render(request, "relatorio.html") @login_required(login_url='/accounts/login') @permission_required('book.add_voo') diff --git a/MyProject/db.sqlite3 b/MyProject/db.sqlite3 index de236581..30ba3da0 100644 Binary files a/MyProject/db.sqlite3 and b/MyProject/db.sqlite3 differ diff --git a/MyProject/template/relatorio.html b/MyProject/template/relatorio.html index c389cac4..1392b15b 100644 --- a/MyProject/template/relatorio.html +++ b/MyProject/template/relatorio.html @@ -48,81 +48,35 @@

Sistema de monitoramento de voos de aviões

-

Gerar relatórios

Tipo de relatório por:

-
- - - - + + {% csrf_token %} + +
+ + +
+ + +
+
-

- Adicionar Voo -

- -
-
- - - - - -
-
- - - - - + + \ No newline at end of file