From c0f63cf226311f937313a3fa12a696677100fe2c Mon Sep 17 00:00:00 2001 From: Patryk <43276401+Zaptyp@users.noreply.github.com> Date: Wed, 14 Apr 2021 19:58:29 +0200 Subject: [PATCH 01/20] Adding an invitation to the discord server!!! Adding an invitation to the discord server into README.md!!! --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 11f24e4..ac88bdb 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,11 @@ 🌋 Unofficial browser VULCAN UONET+ client for both students and their parents ![GitHub Workflow Status](https://github.com/wulkanowy/wulkanowy-web/workflows/Python%20application/badge.svg) -[![Discord](https://img.shields.io/discord/390889354199040011.svg?color=#33CD56)](https://discord.gg/vccAQBr) + +## Come to our discord server!!! +[![Discord1](https://i.imgur.com/3ljTQWy.png)](https://discord.gg/5qsEujZMdp) + +![Status](https://img.shields.io/discord/390889354199040011.svg?color=#33CD56) # Development ## 1. Install dependencies. @@ -35,4 +39,4 @@ docker-compose up -d ## Without docker compose ```shell docker build -t wulkanowy/web . -docker run -d -p 8000:8000 wulkanowy/web \ No newline at end of file +docker run -d -p 8000:8000 wulkanowy/web From 605b8590732a06a3ffd8cf56bde7f3e8843f738f Mon Sep 17 00:00:00 2001 From: Patryk <43276401+Zaptyp@users.noreply.github.com> Date: Wed, 14 Apr 2021 20:30:10 +0200 Subject: [PATCH 02/20] Dodano oficjalne zaproszenie!!! --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index ac88bdb..3bad0b1 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,6 @@ ## Come to our discord server!!! [![Discord1](https://i.imgur.com/3ljTQWy.png)](https://discord.gg/5qsEujZMdp) -![Status](https://img.shields.io/discord/390889354199040011.svg?color=#33CD56) - # Development ## 1. Install dependencies. ```shell From 786ae9b24025d765a62e26bb8ffeea90f2fc604c Mon Sep 17 00:00:00 2001 From: Patryk <43276401+Zaptyp@users.noreply.github.com> Date: Wed, 14 Apr 2021 20:38:18 +0200 Subject: [PATCH 03/20] README.md fixes README.md fixes --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3bad0b1..4661ca8 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ ![GitHub Workflow Status](https://github.com/wulkanowy/wulkanowy-web/workflows/Python%20application/badge.svg) -## Come to our discord server!!! +## Come to our discord server! [![Discord1](https://i.imgur.com/3ljTQWy.png)](https://discord.gg/5qsEujZMdp) # Development From 87ce8f261df745b5875c900ef244cc71c9875f06 Mon Sep 17 00:00:00 2001 From: Tomasz F Date: Wed, 14 Apr 2021 20:40:16 +0200 Subject: [PATCH 04/20] Delete unnecessary 1 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4661ca8..eb24eb3 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ ![GitHub Workflow Status](https://github.com/wulkanowy/wulkanowy-web/workflows/Python%20application/badge.svg) ## Come to our discord server! -[![Discord1](https://i.imgur.com/3ljTQWy.png)](https://discord.gg/5qsEujZMdp) +[![Discord](https://i.imgur.com/3ljTQWy.png)](https://discord.gg/5qsEujZMdp) # Development ## 1. Install dependencies. From 3ea63036f511660db185ef59f62887d0b692ec6b Mon Sep 17 00:00:00 2001 From: Tomasz F Date: Wed, 14 Apr 2021 20:58:44 +0200 Subject: [PATCH 05/20] Update test_views.py --- tests/test_views.py | 79 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 78 insertions(+), 1 deletion(-) diff --git a/tests/test_views.py b/tests/test_views.py index 1246312..88ef67b 100644 --- a/tests/test_views.py +++ b/tests/test_views.py @@ -11,20 +11,29 @@ class TestViews(TestCase): def test_views(self): #DEFAULT_VIEW + print("Testing login view...") response = self.client.get(self.list_url) self.assertEquals(response.status_code, 200) self.assertTemplateUsed(response, 'frontend/index.html') + if response.status_code == 200: + print("Passed!") #CONTENT_VIEW + print("Testing content view...") response = self.client.get(self.detail_url) self.assertEquals(response.status_code, 302) + if response.status_code == 302: + print("Passed!") #ACCOUNT_MANAGER + print("Testing account manager view...") response = self.client.get(reverse('account_manager')) self.assertEquals(response.status_code, 302) + if response.status_code == 302: + print("Passed!") #API data = { @@ -33,6 +42,8 @@ class TestViews(TestCase): "Symbol": "powiatwulkanowy", "diaryUrl": "http://cufs.fakelog.cf/" } + + print("Testing login...") response = self.client.post(reverse('login'), content_type='application/xml', data=json.dumps(data)) cookies_data = response.json() @@ -41,95 +52,153 @@ class TestViews(TestCase): students = cookies_data['data']['students']['data'] #JAN + print("Testing registering as Jan Kowalski...") jan_data = students[0] cookies_data['data']['students']['data'] = [jan_data] get_data_test(self.client, cookies_data, self.assertEquals) + if response.status_code == 200: + print("Passed!") #JOANNA + print("Testing registering as Joanna Czerwińska...") joanna_data = students[3] cookies_data['data']['students']['data'] = [joanna_data] get_data_test(self.client, cookies_data, self.assertEquals) log_out_test(self.client, self.assertEquals) + if response.status_code == 200: + print("Passed!") def get_data_test(client, cookies_data, assertEquals): #GRADES + print("Testing grades...") response = client.post(reverse('grades'), content_type='application/xml', data=json.dumps(cookies_data)) assertEquals(response.status_code, 200) + if response.status_code == 200: + print("Passed!") #TIMETABLE + print("Testing timetable...") response = client.post(reverse('timetable'), content_type='application/xml', data=json.dumps({'cookies': json.dumps(cookies_data), 'week': 0})) assertEquals(response.status_code, 200) + if response.status_code == 200: + print("Passed!") #EXAMS + print("Testing exams...") response = client.post(reverse('exams'), content_type='application/xml', data=json.dumps({'cookies': json.dumps(cookies_data), 'week': 0})) assertEquals(response.status_code, 200) + if response.status_code == 200: + print("Passed!") #HOMEWORKS + print("Testing homeworks...") response = client.post(reverse('homeworks'), content_type='application/xml', data=json.dumps({'cookies': json.dumps(cookies_data), 'week': 0})) assertEquals(response.status_code, 200) + if response.status_code == 200: + print("Passed!") #ATTENDANCE + print("Testing attendance...") response = client.post(reverse('attendance'), content_type='application/xml', data=json.dumps({'cookies': json.dumps(cookies_data), 'week': 0})) assertEquals(response.status_code, 200) + if response.status_code == 200: + print("Passed!") #NOTES + print("Testing notes...") response = client.post(reverse('notes'), content_type='application/xml', data=json.dumps(cookies_data)) assertEquals(response.status_code, 200) + if response.status_code == 200: + print("Passed!") #SCHOOL DATA + print("Testing school data...") response = client.post(reverse('school_data'), content_type='application/xml', data=json.dumps(cookies_data)) assertEquals(response.status_code, 200) + if response.status_code == 200: + print("Passed!") #DASHBOARD + print("Testing dashboard...") response = client.post(reverse('dashboard'), content_type='application/xml', data=json.dumps(cookies_data)) assertEquals(response.status_code, 200) + if response.status_code == 200: + print("Passed!") #MOBILE ACCESS #REGISTERED DEVICES + print("Testing registered devices...") response = client.post(reverse('registered_devices'), content_type='application/xml', data=json.dumps(cookies_data)) assertEquals(response.status_code, 200) + if response.status_code == 200: + print("Passed!") #REGISTER DEVICE + print("Testing registering device...") response = client.post(reverse('register_device'), content_type='application/xml', data=json.dumps(cookies_data)) assertEquals(response.status_code, 200) + if response.status_code == 200: + print("Passed!") #MESSAGES #RECEIVED MESSAGES + print("Testing received messages...") messages_ids = [] response = client.post(reverse('received_messages'), content_type='application/xml', data=json.dumps(cookies_data)) assertEquals(response.status_code, 200) messages_ids.append([response.json()['data']]) + if response.status_code == 200: + print("Passed!") #SENT MESSAGES + print("Testing sent messages...") response = client.post(reverse('sent_messages'), content_type='appication/xml', data=json.dumps(cookies_data)) assertEquals(response.status_code, 200) for id in response.json()['data']: messages_ids.append(id) + if response.status_code == 200: + print("Passed!") #DELETED MESSAGES + print("Testing deleted messages...") response = client.post(reverse('deleted_messages'), content_type='application/xml', data=json.dumps(cookies_data)) assertEquals(response.status_code, 200) messages_ids.append([response.json()['data']]) + if response.status_code == 200: + print("Passed!") #GET RECIPIENTS + print("Testing getting recipients...") response = client.post(reverse('recipients'), content_type='application/xml', data=json.dumps(cookies_data)) assertEquals(response.status_code, 200) recipients = response.json()['addressee']['data'] + if response.status_code == 200: + print("Passed!") #STUDENT DATA + print("Testing student data...") response = client.post(reverse('student_data'), content_type='application/xml', data=json.dumps(cookies_data)) assertEquals(response.status_code, 200) + if response.status_code == 200: + print("Passed!") #STATS #PARTIAL + print("Testing partial grades stats...") response = client.post(reverse('partial'), content_type='application/xml', data=json.dumps(cookies_data)) assertEquals(response.status_code, 200) + if response.status_code == 200: + print("Passed!") #YEAR + print("Testing year grades stats...") response = client.post(reverse('year'), content_type='application/xml', data=json.dumps(cookies_data)) assertEquals(response.status_code, 200) + if response.status_code == 200: + print("Passed!") #SEND MESSAGE + print("Testing sending message...") for recipient in recipients: send_data = { 'cookies_data': json.dumps(cookies_data), @@ -139,8 +208,11 @@ def get_data_test(client, cookies_data, assertEquals): } response = client.post(reverse('send_message'), content_type='application/xml', data=json.dumps(send_data)) assertEquals(response.status_code, 200) + if response.status_code == 200: + print("Passed!") #GETTING MESSAGE CONTENT + print("Testing getting content of message...") for id in messages_ids: send_data = { 'cookies_data': json.dumps(cookies_data), @@ -148,8 +220,13 @@ def get_data_test(client, cookies_data, assertEquals): } response = client.post(reverse('message_content'), content_type='application/xml', data=json.dumps(send_data)) assertEquals(response.status_code, 200) + if response.status_code == 200: + print("Passed!") def log_out_test(client, assertEquals): #LOG OUT + print("Testing logging out...") response = client.get(reverse('log_out'), content_type='application/xml') - assertEquals(response.status_code, 200) \ No newline at end of file + assertEquals(response.status_code, 200) + if response.status_code == 200: + print("\033[92m Passed!") From 25867d35e630b72f6cc9a5063e46b9c43b11bb3c Mon Sep 17 00:00:00 2001 From: Tomasz F Date: Wed, 14 Apr 2021 21:11:40 +0200 Subject: [PATCH 06/20] Update test_views.py --- tests/test_views.py | 157 ++++++++++++++++++++++++++++++-------------- 1 file changed, 106 insertions(+), 51 deletions(-) diff --git a/tests/test_views.py b/tests/test_views.py index 88ef67b..c2bb196 100644 --- a/tests/test_views.py +++ b/tests/test_views.py @@ -11,29 +11,35 @@ class TestViews(TestCase): def test_views(self): #DEFAULT_VIEW - print("Testing login view...") + print("\033[94mTesting login view...") response = self.client.get(self.list_url) self.assertEquals(response.status_code, 200) self.assertTemplateUsed(response, 'frontend/index.html') if response.status_code == 200: - print("Passed!") + print("\033[92mPassed!"") + else: + print("\033[91mFailed!") #CONTENT_VIEW - print("Testing content view...") + print("\033[94mTesting content view...") response = self.client.get(self.detail_url) self.assertEquals(response.status_code, 302) if response.status_code == 302: - print("Passed!") + print("\033[92mPassed!"") + else: + print("\033[91mFailed!") #ACCOUNT_MANAGER - print("Testing account manager view...") + print("\033[94mTesting account manager view...") response = self.client.get(reverse('account_manager')) self.assertEquals(response.status_code, 302) if response.status_code == 302: - print("Passed!") + print("\033[92mPassed!"") + else: + print("\033[91mFailed!") #API data = { @@ -43,162 +49,205 @@ class TestViews(TestCase): "diaryUrl": "http://cufs.fakelog.cf/" } - print("Testing login...") + print("\033[94mTesting login...") response = self.client.post(reverse('login'), content_type='application/xml', data=json.dumps(data)) cookies_data = response.json() self.assertEquals(response.status_code, 200) + if response.status_code == 200: + print("\033[92mPassed!") + else: + print("\033[91mFailed!") students = cookies_data['data']['students']['data'] #JAN - print("Testing registering as Jan Kowalski...") + print("\033[94mTesting registering as Jan Kowalski...") jan_data = students[0] cookies_data['data']['students']['data'] = [jan_data] get_data_test(self.client, cookies_data, self.assertEquals) if response.status_code == 200: - print("Passed!") + print("\033[92mPassed!") + else: + print("\033[91mFailed!") + print("\033[95m============================================================") #JOANNA - print("Testing registering as Joanna Czerwińska...") + print("\033[94mTesting registering as Joanna Czerwińska...") joanna_data = students[3] cookies_data['data']['students']['data'] = [joanna_data] get_data_test(self.client, cookies_data, self.assertEquals) log_out_test(self.client, self.assertEquals) if response.status_code == 200: - print("Passed!") + print("\033[92mPassed!") + else: + print("\033[91mFailed!") def get_data_test(client, cookies_data, assertEquals): #GRADES - print("Testing grades...") + print("\033[94mTesting grades...") response = client.post(reverse('grades'), content_type='application/xml', data=json.dumps(cookies_data)) assertEquals(response.status_code, 200) if response.status_code == 200: - print("Passed!") + print("\033[92mPassed!") + else: + print("\033[91mFailed!") #TIMETABLE - print("Testing timetable...") + print("\033[94mTesting timetable...") response = client.post(reverse('timetable'), content_type='application/xml', data=json.dumps({'cookies': json.dumps(cookies_data), 'week': 0})) assertEquals(response.status_code, 200) if response.status_code == 200: - print("Passed!") + print("\033[92mPassed!") + else: + print("\033[91mFailed!") #EXAMS - print("Testing exams...") + print("\033[94mTesting exams...") response = client.post(reverse('exams'), content_type='application/xml', data=json.dumps({'cookies': json.dumps(cookies_data), 'week': 0})) assertEquals(response.status_code, 200) if response.status_code == 200: - print("Passed!") + print("\033[92mPassed!") + else: + print("\033[91mFailed!") #HOMEWORKS - print("Testing homeworks...") + print("\033[94mTesting homeworks...") response = client.post(reverse('homeworks'), content_type='application/xml', data=json.dumps({'cookies': json.dumps(cookies_data), 'week': 0})) assertEquals(response.status_code, 200) if response.status_code == 200: - print("Passed!") + print("\033[92mPassed!") + else: + print("\033[91mFailed!") #ATTENDANCE - print("Testing attendance...") + print("\033[94mTesting attendance...") response = client.post(reverse('attendance'), content_type='application/xml', data=json.dumps({'cookies': json.dumps(cookies_data), 'week': 0})) assertEquals(response.status_code, 200) if response.status_code == 200: - print("Passed!") + print("\033[92mPassed!") + else: + print("\033[91mFailed!") #NOTES - print("Testing notes...") + print("\033[94mTesting notes...") response = client.post(reverse('notes'), content_type='application/xml', data=json.dumps(cookies_data)) assertEquals(response.status_code, 200) if response.status_code == 200: - print("Passed!") + print("\033[92mPassed!") + else: + print("\033[91mFailed!") #SCHOOL DATA - print("Testing school data...") + print("\033[94mTesting school data...") response = client.post(reverse('school_data'), content_type='application/xml', data=json.dumps(cookies_data)) assertEquals(response.status_code, 200) if response.status_code == 200: - print("Passed!") + print("\033[92mPassed!") + else: + print("\033[91mFailed!") #DASHBOARD - print("Testing dashboard...") + print("\033[94mTesting dashboard...") response = client.post(reverse('dashboard'), content_type='application/xml', data=json.dumps(cookies_data)) assertEquals(response.status_code, 200) if response.status_code == 200: - print("Passed!") + print("\033[92mPassed!") + else: + print("\033[91mFailed!") #MOBILE ACCESS #REGISTERED DEVICES - print("Testing registered devices...") + print("\033[94mTesting registered devices...") response = client.post(reverse('registered_devices'), content_type='application/xml', data=json.dumps(cookies_data)) assertEquals(response.status_code, 200) if response.status_code == 200: - print("Passed!") + print("\033[92mPassed!") + else: + print("\033[91mFailed!") #REGISTER DEVICE - print("Testing registering device...") + print("\033[94mTesting registering device...") response = client.post(reverse('register_device'), content_type='application/xml', data=json.dumps(cookies_data)) assertEquals(response.status_code, 200) if response.status_code == 200: - print("Passed!") + print("\033[92mPassed!") + else: + print("\033[91mFailed!") #MESSAGES #RECEIVED MESSAGES - print("Testing received messages...") + print("\033[94mTesting received messages...") messages_ids = [] response = client.post(reverse('received_messages'), content_type='application/xml', data=json.dumps(cookies_data)) assertEquals(response.status_code, 200) messages_ids.append([response.json()['data']]) if response.status_code == 200: - print("Passed!") + print("\033[92mPassed!") + else: + print("\033[91mFailed!") #SENT MESSAGES - print("Testing sent messages...") + print("\033[94mTesting sent messages...") response = client.post(reverse('sent_messages'), content_type='appication/xml', data=json.dumps(cookies_data)) assertEquals(response.status_code, 200) for id in response.json()['data']: messages_ids.append(id) if response.status_code == 200: - print("Passed!") + print("\033[92mPassed!") + else: + print("\033[91mFailed!") #DELETED MESSAGES - print("Testing deleted messages...") + print("\033[94mTesting deleted messages...") response = client.post(reverse('deleted_messages'), content_type='application/xml', data=json.dumps(cookies_data)) assertEquals(response.status_code, 200) messages_ids.append([response.json()['data']]) if response.status_code == 200: - print("Passed!") + print("\033[92mPassed!") + else: + print("\033[91mFailed!") #GET RECIPIENTS - print("Testing getting recipients...") + print("\033[94mTesting getting recipients...") response = client.post(reverse('recipients'), content_type='application/xml', data=json.dumps(cookies_data)) assertEquals(response.status_code, 200) recipients = response.json()['addressee']['data'] if response.status_code == 200: - print("Passed!") + print("\033[92mPassed!") + else: + print("\033[91mFailed!") #STUDENT DATA - print("Testing student data...") + print("\033[94mTesting student data...") response = client.post(reverse('student_data'), content_type='application/xml', data=json.dumps(cookies_data)) assertEquals(response.status_code, 200) if response.status_code == 200: - print("Passed!") + print("\033[92mPassed!") + else: + print("\033[91mFailed!") #STATS #PARTIAL - print("Testing partial grades stats...") + print("\033[94mTesting partial grades stats...") response = client.post(reverse('partial'), content_type='application/xml', data=json.dumps(cookies_data)) assertEquals(response.status_code, 200) if response.status_code == 200: - print("Passed!") + print("\033[92mPassed!") + else: + print("\033[91mFailed!") #YEAR - print("Testing year grades stats...") + print("\033[94mTesting year grades stats...") response = client.post(reverse('year'), content_type='application/xml', data=json.dumps(cookies_data)) assertEquals(response.status_code, 200) if response.status_code == 200: - print("Passed!") + print("\033[92mPassed!") + else: + print("\033[91mFailed!") #SEND MESSAGE - print("Testing sending message...") + print("\033[94mTesting sending message...") for recipient in recipients: send_data = { 'cookies_data': json.dumps(cookies_data), @@ -209,10 +258,12 @@ def get_data_test(client, cookies_data, assertEquals): response = client.post(reverse('send_message'), content_type='application/xml', data=json.dumps(send_data)) assertEquals(response.status_code, 200) if response.status_code == 200: - print("Passed!") + print("\033[92mPassed!") + else: + print("\033[91mFailed!") #GETTING MESSAGE CONTENT - print("Testing getting content of message...") + print("\033[94mTesting getting content of message...") for id in messages_ids: send_data = { 'cookies_data': json.dumps(cookies_data), @@ -221,12 +272,16 @@ def get_data_test(client, cookies_data, assertEquals): response = client.post(reverse('message_content'), content_type='application/xml', data=json.dumps(send_data)) assertEquals(response.status_code, 200) if response.status_code == 200: - print("Passed!") + print("\033[92mPassed!") + else: + print("\033[91mFailed!") def log_out_test(client, assertEquals): #LOG OUT - print("Testing logging out...") + print("\033[94mTesting logging out...") response = client.get(reverse('log_out'), content_type='application/xml') assertEquals(response.status_code, 200) if response.status_code == 200: - print("\033[92m Passed!") + print("\033[92mPassed!") + else: + print("\033[91mFailed!") From 929f6fb38401d6eb1b6be8d85417e7638e53927a Mon Sep 17 00:00:00 2001 From: Tomasz F Date: Wed, 14 Apr 2021 21:14:30 +0200 Subject: [PATCH 07/20] Update test_views.py --- tests/test_views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_views.py b/tests/test_views.py index c2bb196..6cd501c 100644 --- a/tests/test_views.py +++ b/tests/test_views.py @@ -17,7 +17,7 @@ class TestViews(TestCase): self.assertEquals(response.status_code, 200) self.assertTemplateUsed(response, 'frontend/index.html') if response.status_code == 200: - print("\033[92mPassed!"") + print("\033[92mPassed!") else: print("\033[91mFailed!") @@ -27,7 +27,7 @@ class TestViews(TestCase): self.assertEquals(response.status_code, 302) if response.status_code == 302: - print("\033[92mPassed!"") + print("\033[92mPassed!") else: print("\033[91mFailed!") @@ -37,7 +37,7 @@ class TestViews(TestCase): self.assertEquals(response.status_code, 302) if response.status_code == 302: - print("\033[92mPassed!"") + print("\033[92mPassed!") else: print("\033[91mFailed!") From 9e7a29330f78e4bfc588ffdcfcc72cb55f990aec Mon Sep 17 00:00:00 2001 From: Tomasz F Date: Wed, 14 Apr 2021 21:16:13 +0200 Subject: [PATCH 08/20] Update test_views.py --- tests/test_views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_views.py b/tests/test_views.py index 6cd501c..ea1ecb2 100644 --- a/tests/test_views.py +++ b/tests/test_views.py @@ -144,7 +144,7 @@ def get_data_test(client, cookies_data, assertEquals): assertEquals(response.status_code, 200) if response.status_code == 200: print("\033[92mPassed!") - else: + else: print("\033[91mFailed!") #DASHBOARD From 5150448e4bf4867836cdddb98205d26d27a02906 Mon Sep 17 00:00:00 2001 From: Tomasz F Date: Wed, 14 Apr 2021 21:23:55 +0200 Subject: [PATCH 09/20] Update test_views.py --- tests/test_views.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/tests/test_views.py b/tests/test_views.py index ea1ecb2..e71502b 100644 --- a/tests/test_views.py +++ b/tests/test_views.py @@ -63,24 +63,18 @@ class TestViews(TestCase): students = cookies_data['data']['students']['data'] #JAN print("\033[94mTesting registering as Jan Kowalski...") + print("\033[95m============================================================") jan_data = students[0] cookies_data['data']['students']['data'] = [jan_data] get_data_test(self.client, cookies_data, self.assertEquals) - if response.status_code == 200: - print("\033[92mPassed!") - else: - print("\033[91mFailed!") - print("\033[95m============================================================") + print("\033[96m========================================================================") #JOANNA print("\033[94mTesting registering as Joanna Czerwińska...") + print("\033[95m============================================================") joanna_data = students[3] cookies_data['data']['students']['data'] = [joanna_data] get_data_test(self.client, cookies_data, self.assertEquals) log_out_test(self.client, self.assertEquals) - if response.status_code == 200: - print("\033[92mPassed!") - else: - print("\033[91mFailed!") def get_data_test(client, cookies_data, assertEquals): From 579bceaa8bdac199e77aee458de637c7e07e61b2 Mon Sep 17 00:00:00 2001 From: Tomasz F Date: Wed, 14 Apr 2021 21:32:27 +0200 Subject: [PATCH 10/20] Update test_views.py --- tests/test_views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_views.py b/tests/test_views.py index e71502b..51c742e 100644 --- a/tests/test_views.py +++ b/tests/test_views.py @@ -62,14 +62,14 @@ class TestViews(TestCase): students = cookies_data['data']['students']['data'] #JAN - print("\033[94mTesting registering as Jan Kowalski...") + print("\033[94mTesting as Jan Kowalski...") print("\033[95m============================================================") jan_data = students[0] cookies_data['data']['students']['data'] = [jan_data] get_data_test(self.client, cookies_data, self.assertEquals) print("\033[96m========================================================================") #JOANNA - print("\033[94mTesting registering as Joanna Czerwińska...") + print("\033[94mTesting as Joanna Czerwińska...") print("\033[95m============================================================") joanna_data = students[3] cookies_data['data']['students']['data'] = [joanna_data] From 45c1cdf2cd87e3fedaba05d4ce73dafdde86cf4c Mon Sep 17 00:00:00 2001 From: Patryk <43276401+Zaptyp@users.noreply.github.com> Date: Thu, 15 Apr 2021 18:20:52 +0200 Subject: [PATCH 11/20] Delete install.bat --- install.bat | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 install.bat diff --git a/install.bat b/install.bat deleted file mode 100644 index 07146b6..0000000 --- a/install.bat +++ /dev/null @@ -1,3 +0,0 @@ -pip install -r requirements.txt -cd frontend -npm i From 7ba8728a8c8a2fb32a2b6fe3e048dd9737af0413 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?JelNiS=C5=82aw?= Date: Tue, 20 Apr 2021 22:54:21 +0200 Subject: [PATCH 12/20] Small README changes --- README.md | 43 +++++++++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index eb24eb3..ce20a86 100644 --- a/README.md +++ b/README.md @@ -1,40 +1,47 @@ -# Wulkanowy-web -🌋 Unofficial browser VULCAN UONET+ client for both students and their parents +# Wulkanowy web + +🌋 Unofficial VULCAN UONET+ browser client for students and their parents ![GitHub Workflow Status](https://github.com/wulkanowy/wulkanowy-web/workflows/Python%20application/badge.svg) -## Come to our discord server! +## Join our Discord server! + [![Discord](https://i.imgur.com/3ljTQWy.png)](https://discord.gg/5qsEujZMdp) # Development -## 1. Install dependencies. -```shell + +## 1. Install dependencies + +```sh pip install -r requirements.txt -``` -And in frontend: -```shell npm install ``` + ## 2. Make migrations -```shell + +```sh python manage.py makemigrations python manage.py migrate ``` -## 3. Start the server! -```shell + +## 3. Start the server + +```sh python manage.py runserver -``` -And in frontend: -```shell npm run dev ``` # Docker -## With docker compose -```shell + +With docker compose + +```sh docker-compose up -d ``` -## Without docker compose -```shell + +Without docker compose + +```sh docker build -t wulkanowy/web . docker run -d -p 8000:8000 wulkanowy/web +``` \ No newline at end of file From b2accaff479f0d9fd3bf28c3b4a481c0421fbb3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?JelNiS=C5=82aw?= Date: Tue, 20 Apr 2021 23:01:27 +0200 Subject: [PATCH 13/20] Capitalize project name --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ce20a86..ce04579 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Wulkanowy web +# Wulkanowy Web 🌋 Unofficial VULCAN UONET+ browser client for students and their parents From 85ca31219250125ab3f49c17c2f98c2a315d0d92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?JelNiS=C5=82aw?= Date: Tue, 20 Apr 2021 23:12:24 +0200 Subject: [PATCH 14/20] Split server start into 2 blocks, use npm i --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ce04579..9700f9f 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ ```sh pip install -r requirements.txt -npm install +npm i ``` ## 2. Make migrations @@ -28,6 +28,10 @@ python manage.py migrate ```sh python manage.py runserver +``` + +```sh +cd frontend npm run dev ``` From a6467491d45ae638fb8d344830797036295c2bb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?JelNiS=C5=82aw?= Date: Tue, 20 Apr 2021 23:20:24 +0200 Subject: [PATCH 15/20] Use a dynamic Discord server banner --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9700f9f..3ff0964 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ ## Join our Discord server! -[![Discord](https://i.imgur.com/3ljTQWy.png)](https://discord.gg/5qsEujZMdp) +![Discord](https://discordapp.com/api/guilds/390889354199040011/widget.png?style=banner2) # Development From ac8e2022318124a54b66c9d5ac8b2b454bf10fb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?JelNiS=C5=82aw?= Date: Tue, 20 Apr 2021 23:26:03 +0200 Subject: [PATCH 16/20] Add Discord invite --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3ff0964..10f7512 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ 🌋 Unofficial VULCAN UONET+ browser client for students and their parents -![GitHub Workflow Status](https://github.com/wulkanowy/wulkanowy-web/workflows/Python%20application/badge.svg) +[![GitHub Workflow Status](https://github.com/wulkanowy/wulkanowy-web/workflows/Python%20application/badge.svg)](https://discord.gg/hVQeJx5Q) ## Join our Discord server! From a1eabd19d3bae72f51e6774b86d339d2e95c46d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?JelNiS=C5=82aw?= Date: Tue, 20 Apr 2021 23:26:58 +0200 Subject: [PATCH 17/20] Revert "Add Discord invite" This reverts commit ac8e2022318124a54b66c9d5ac8b2b454bf10fb2. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 10f7512..3ff0964 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ 🌋 Unofficial VULCAN UONET+ browser client for students and their parents -[![GitHub Workflow Status](https://github.com/wulkanowy/wulkanowy-web/workflows/Python%20application/badge.svg)](https://discord.gg/hVQeJx5Q) +![GitHub Workflow Status](https://github.com/wulkanowy/wulkanowy-web/workflows/Python%20application/badge.svg) ## Join our Discord server! From 43fc00bd6b95dfa2ef9ccbe5ee45d8b361eb22e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?JelNiS=C5=82aw?= Date: Tue, 20 Apr 2021 23:27:34 +0200 Subject: [PATCH 18/20] Add Discord invite --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3ff0964..8276f8e 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ ## Join our Discord server! -![Discord](https://discordapp.com/api/guilds/390889354199040011/widget.png?style=banner2) +[![Discord](https://discordapp.com/api/guilds/390889354199040011/widget.png?style=banner2)](https://discord.gg/hVQeJx5Q) # Development From 779412a0d6adce4de175023ba23bf39befd9ded2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?JelNiS=C5=82aw?= Date: Tue, 20 Apr 2021 23:33:02 +0200 Subject: [PATCH 19/20] Change invite code --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8276f8e..7e6b9ad 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ ## Join our Discord server! -[![Discord](https://discordapp.com/api/guilds/390889354199040011/widget.png?style=banner2)](https://discord.gg/hVQeJx5Q) +[![Discord](https://discordapp.com/api/guilds/390889354199040011/widget.png?style=banner2)](https://discord.gg/5qsEujZMdp) # Development From 26542e8ba937eedbfb797cdd0628dbef233749d6 Mon Sep 17 00:00:00 2001 From: Tomasz F Date: Tue, 20 Apr 2021 23:38:18 +0200 Subject: [PATCH 20/20] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7e6b9ad..0a11ef3 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ ## Join our Discord server! -[![Discord](https://discordapp.com/api/guilds/390889354199040011/widget.png?style=banner2)](https://discord.gg/5qsEujZMdp) +[![Discord](https://discordapp.com/api/guilds/390889354199040011/widget.png?style=banner2)](https://discord.com/invite/vccAQBr) # Development @@ -48,4 +48,4 @@ Without docker compose ```sh docker build -t wulkanowy/web . docker run -d -p 8000:8000 wulkanowy/web -``` \ No newline at end of file +```