From bb087823ef03379a9f78edfc11df3b84f3bdbfd7 Mon Sep 17 00:00:00 2001 From: Stefan Dworschak Date: Fri, 15 Oct 2021 15:13:42 +0100 Subject: [PATCH 1/3] Adding reviews fixtures and updating seed scripts --- home/fixtures/reviews.json | 62 ++++++++++++++++++++++++++++++++++++++ scripts/docker_seed.sh | 2 ++ scripts/seed.bat | 1 + scripts/seed.sh | 1 + 4 files changed, 66 insertions(+) create mode 100644 home/fixtures/reviews.json diff --git a/home/fixtures/reviews.json b/home/fixtures/reviews.json new file mode 100644 index 00000000..100e7cd7 --- /dev/null +++ b/home/fixtures/reviews.json @@ -0,0 +1,62 @@ +[ + { + "model": "home.review", + "pk": 1, + "fields": { + "created": "2021-10-15T14:06:20.759Z", + "updated": "2021-10-15T14:06:20.759Z", + "created_by": 1, + "content": "What a great hackathon! It was a wonderful experience and I would definitely do it again.", + "rating": 5.0, + "visible": true + } + }, + { + "model": "home.review", + "pk": 2, + "fields": { + "created": "2021-10-15T14:06:58.417Z", + "updated": "2021-10-15T14:08:00.918Z", + "created_by": 1, + "content": "My team was brilliant! We had some challenges with getting git working as a team, but pulled together in the end.", + "rating": 4.5, + "visible": true + } + }, + { + "model": "home.review", + "pk": 3, + "fields": { + "created": "2021-10-15T14:07:55.174Z", + "updated": "2021-10-15T14:07:55.174Z", + "created_by": 1, + "content": "Hackathons are a great experience. This was my first hackathon that I have participated in and I would do it all again. A great event, a great idea, a great project.", + "rating": 5.0, + "visible": true + } + }, + { + "model": "home.review", + "pk": 4, + "fields": { + "created": "2021-10-15T14:09:43.521Z", + "updated": "2021-10-15T14:09:43.521Z", + "created_by": 1, + "content": "I liked the hackathon experience, but it was really tough. So much work and I did not really understand how version control works in a team. In the end we got a project out and I am happy about it.", + "rating": 4.5, + "visible": true + } + }, + { + "model": "home.review", + "pk": 5, + "fields": { + "created": "2021-10-15T14:11:14.466Z", + "updated": "2021-10-15T14:11:14.466Z", + "created_by": 1, + "content": "A wonderful experience! Working with other people on a software project is so rewarding. It was really engaging and I am taking so much away from this from version control to deployment. Definitely will do it again!", + "rating": 5.0, + "visible": true + } + } +] \ No newline at end of file diff --git a/scripts/docker_seed.sh b/scripts/docker_seed.sh index 4e5e69dd..ed5a96f1 100755 --- a/scripts/docker_seed.sh +++ b/scripts/docker_seed.sh @@ -8,3 +8,5 @@ docker-compose exec hackathon-app python3 manage.py loaddata profiles docker-compose exec hackathon-app python3 manage.py loaddata emailaddresses docker-compose exec hackathon-app python3 manage.py loaddata hackathons docker-compose exec hackathon-app python3 manage.py loaddata showcase +docker-compose exec hackathon-app python3 manage.py loaddata showcase_site_settings +docker-compose exec hackathon-app python3 manage.py loaddata reviews diff --git a/scripts/seed.bat b/scripts/seed.bat index 85d9b0f6..c03227b5 100644 --- a/scripts/seed.bat +++ b/scripts/seed.bat @@ -7,3 +7,4 @@ python manage.py loaddata emailaddresses python manage.py loaddata hackathons python manage.py loaddata showcase python manage.py loaddata showcase_site_settings +python manage.py loaddata reviews \ No newline at end of file diff --git a/scripts/seed.sh b/scripts/seed.sh index 552832bb..8785431e 100755 --- a/scripts/seed.sh +++ b/scripts/seed.sh @@ -9,3 +9,4 @@ python3 manage.py loaddata emailaddresses python3 manage.py loaddata hackathons python3 manage.py loaddata showcase python3 manage.py loaddata showcase_site_settings +python3 manage.py loaddata reviews \ No newline at end of file From 7ef0a9d08569919d8e7f6aea717955810e058ade Mon Sep 17 00:00:00 2001 From: Stefan Dworschak Date: Fri, 15 Oct 2021 15:16:11 +0100 Subject: [PATCH 2/3] Adding blank lines at the end of the file --- home/fixtures/reviews.json | 2 +- scripts/seed.bat | 2 +- scripts/seed.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/home/fixtures/reviews.json b/home/fixtures/reviews.json index 100e7cd7..b35c7630 100644 --- a/home/fixtures/reviews.json +++ b/home/fixtures/reviews.json @@ -59,4 +59,4 @@ "visible": true } } -] \ No newline at end of file +] diff --git a/scripts/seed.bat b/scripts/seed.bat index c03227b5..a0cbcb78 100644 --- a/scripts/seed.bat +++ b/scripts/seed.bat @@ -7,4 +7,4 @@ python manage.py loaddata emailaddresses python manage.py loaddata hackathons python manage.py loaddata showcase python manage.py loaddata showcase_site_settings -python manage.py loaddata reviews \ No newline at end of file +python manage.py loaddata reviews diff --git a/scripts/seed.sh b/scripts/seed.sh index 8785431e..54f546d6 100755 --- a/scripts/seed.sh +++ b/scripts/seed.sh @@ -9,4 +9,4 @@ python3 manage.py loaddata emailaddresses python3 manage.py loaddata hackathons python3 manage.py loaddata showcase python3 manage.py loaddata showcase_site_settings -python3 manage.py loaddata reviews \ No newline at end of file +python3 manage.py loaddata reviews From beeb45cb43f6bf4ce190eab73a663d42196eda71 Mon Sep 17 00:00:00 2001 From: Stefan Dworschak Date: Tue, 19 Oct 2021 15:19:18 +0100 Subject: [PATCH 3/3] Adding another review with visibility false --- home/fixtures/reviews.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/home/fixtures/reviews.json b/home/fixtures/reviews.json index b35c7630..7ea2dcba 100644 --- a/home/fixtures/reviews.json +++ b/home/fixtures/reviews.json @@ -58,5 +58,17 @@ "rating": 5.0, "visible": true } + }, + { + "model": "home.review", + "pk": 6, + "fields": { + "created": "2021-10-19T14:17:00.676Z", + "updated": "2021-10-19T14:17:00.676Z", + "created_by": 1, + "content": "The communication in my team was not great, there were a lot of inexperienced people and I am not happy with our end product. I do like the concept of a hackathon though. Maybe next time I will be paired with people with more experience.", + "rating": 2.5, + "visible": false + } } ]