From 5c8c07c59b047168c2bf614f342c9f6cbb4512b3 Mon Sep 17 00:00:00 2001 From: Kdoggg666 Date: Fri, 7 Jul 2023 12:43:14 +0000 Subject: [PATCH 1/3] Add code of conduct template, view and URL --- home/urls.py | 3 +++ home/views.py | 6 ++++++ requirements.txt | 4 ++-- resources/urls.py | 1 + resources/views.py | 2 ++ templates/code-of-conduct.html | 34 ++++++++++++++++++++++++++++++++++ 6 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 templates/code-of-conduct.html diff --git a/home/urls.py b/home/urls.py index d50622fc..da4dac5f 100644 --- a/home/urls.py +++ b/home/urls.py @@ -1,9 +1,11 @@ from django.urls import path from . import views + urlpatterns = [ path("", views.home, name="home"), path("faq/", views.faq, name="faq"), + path('codeofconduct/', views.codeofconduct, name="codeofconduct"), path("plagiarism_policy/", views.plagiarism_policy, name="plagiarism_policy"), path("privacy_policy/", views.privacy_policy, name="privacy_policy"), @@ -13,4 +15,5 @@ name="save_partnership_contact_form"), path("500/", views.test_500), path("404/", views.test_404), + ] diff --git a/home/views.py b/home/views.py index 1e363679..27cb719f 100644 --- a/home/views.py +++ b/home/views.py @@ -146,3 +146,9 @@ def test_404(request): response = render(request, '404.html') response.status_code = 404 return response + +def codeofconduct(request): + """ + A view to show the hackathon code of conduct. + """ + return render(request, 'code-of-conduct.html') \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 241ec1a2..f0b78f3d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -32,7 +32,7 @@ msgpack==0.6.2 mysqlclient==2.0.3 numpy==1.20.1 oauthlib==3.1.0 -packaging==20.3 +packaging==20.4 pandas==1.2.3 parso==0.8.1 pep517==0.8.2 @@ -47,7 +47,7 @@ python-dateutil==2.8.1 python-dotenv==0.14.0 python3-openid==3.2.0 pytoml==0.1.21 -pytz==2020.1 +pytz==2020.4 redis==4.1.1 requests==2.24.0 requests-oauthlib==1.3.0 diff --git a/resources/urls.py b/resources/urls.py index d2b92c7f..6559a955 100644 --- a/resources/urls.py +++ b/resources/urls.py @@ -7,4 +7,5 @@ path('delete//', views.delete_resource, name='delete_resource'), path('edit//', views.edit_resource, name='edit_resource'), + ] diff --git a/resources/views.py b/resources/views.py index 53e98b25..e8729121 100644 --- a/resources/views.py +++ b/resources/views.py @@ -77,3 +77,5 @@ def edit_resource(request, resource_id): } return render(request, template, context) + + diff --git a/templates/code-of-conduct.html b/templates/code-of-conduct.html new file mode 100644 index 00000000..aed97372 --- /dev/null +++ b/templates/code-of-conduct.html @@ -0,0 +1,34 @@ +{% extends "base.html" %} +{% load static %} + +{% block content %} + +
+
+

CODE OF CONDUCT

+

Here at Code Institute we want to create a safe and welcoming environment for all hackathon participants. + It's important to keep open communication with your team throughout the hackathon, as suddenly dropping off + without letting them know can impact their progress and motivation, and may lead to incomplete tasks and + disorganization. By participating in this event, you agree to follow this code of conduct:

+ +
    +
  1. Be respectful and inclusive towards all other participants, facilitators, Hackteam, Staff or anyone else involved in the hackathon. Discriminatory language or behavior of any kind is not allowed. +
  2. +
  3. Only register if you can commit a minimum of 3 hours a day.
  4. +
  5. Keep in contact with your team. All project discussions should take place within the dedicated team Slack Channel. This way, our Hackathon Facilitators and Staff can stay up to date on your progress and offer support when needed. We want to make sure that everyone on the team is aware of all goings-on. +
  6. +
  7. We want to ensure that everyone on the team has a chance to participate and add their unique skills and perspectives. Let's work together to make sure everyone is included and valued. More experienced team members should keep in mind that some members may be less experienced, and may need extra support and guidance. By offering more time and assistance to those who may need it, we can ensure that everyone has an opportunity to grow their skills and contribute to the project. Remember, this is a team effort and we want to work together to achieve our goals rather than rushing ahead. +
  8. +
  9. If you need to drop off from the event before it ends, you must inform your team and the team facilitator. If you drop off without informing your team, you will be ineligible to participate in the next hackathon. +
  10. +
  11. If you witness or experience any behavior that violates this code of conduct, please report it immediately to your facilitator, the HackTeam or the Code Institute Community Team.
  12. + +
+

By participating in a Code Institute Hackathon, you agree to abide by this code of conduct and any decisions made by Code Institute regarding violations of it.

+
+
+ + + + +{% endblock %} \ No newline at end of file From f52e868cb2d953eb5d73f46ae58fcd376900d4aa Mon Sep 17 00:00:00 2001 From: Kdoggg666 Date: Fri, 7 Jul 2023 12:46:38 +0000 Subject: [PATCH 2/3] Add Code of Conduct link in nav and footer --- templates/includes/footer.html | 3 +++ templates/includes/navbar.html | 1 + 2 files changed, 4 insertions(+) diff --git a/templates/includes/footer.html b/templates/includes/footer.html index 306a4a5b..e99bfdca 100644 --- a/templates/includes/footer.html +++ b/templates/includes/footer.html @@ -3,6 +3,9 @@

Policies

    +
  • + Code of Conduct +
  • Community Guidelines
  • diff --git a/templates/includes/navbar.html b/templates/includes/navbar.html index e8380b4b..84c0b34f 100644 --- a/templates/includes/navbar.html +++ b/templates/includes/navbar.html @@ -42,6 +42,7 @@ {% else %} From 377410050a7a5654a2b261b5bb91566625b57e97 Mon Sep 17 00:00:00 2001 From: Kdoggg666 Date: Fri, 7 Jul 2023 13:49:50 +0000 Subject: [PATCH 3/3] Fix formatting in CoC views, urls and template --- home/views.py | 3 ++- resources/urls.py | 1 - templates/code-of-conduct.html | 48 ++++++++++++++++++++-------------- 3 files changed, 31 insertions(+), 21 deletions(-) diff --git a/home/views.py b/home/views.py index 27cb719f..1d74091d 100644 --- a/home/views.py +++ b/home/views.py @@ -147,8 +147,9 @@ def test_404(request): response.status_code = 404 return response + def codeofconduct(request): """ A view to show the hackathon code of conduct. """ - return render(request, 'code-of-conduct.html') \ No newline at end of file + return render(request, 'code-of-conduct.html') diff --git a/resources/urls.py b/resources/urls.py index 6559a955..d2b92c7f 100644 --- a/resources/urls.py +++ b/resources/urls.py @@ -7,5 +7,4 @@ path('delete//', views.delete_resource, name='delete_resource'), path('edit//', views.edit_resource, name='edit_resource'), - ] diff --git a/templates/code-of-conduct.html b/templates/code-of-conduct.html index aed97372..bbb24e9d 100644 --- a/templates/code-of-conduct.html +++ b/templates/code-of-conduct.html @@ -6,29 +6,39 @@

    CODE OF CONDUCT

    -

    Here at Code Institute we want to create a safe and welcoming environment for all hackathon participants. +

    Here at Code Institute we want to create a safe and welcoming environment for all hackathon + participants. It's important to keep open communication with your team throughout the hackathon, as suddenly dropping off without letting them know can impact their progress and motivation, and may lead to incomplete tasks and disorganization. By participating in this event, you agree to follow this code of conduct:

    -
      -
    1. Be respectful and inclusive towards all other participants, facilitators, Hackteam, Staff or anyone else involved in the hackathon. Discriminatory language or behavior of any kind is not allowed. -
    2. -
    3. Only register if you can commit a minimum of 3 hours a day.
    4. -
    5. Keep in contact with your team. All project discussions should take place within the dedicated team Slack Channel. This way, our Hackathon Facilitators and Staff can stay up to date on your progress and offer support when needed. We want to make sure that everyone on the team is aware of all goings-on. -
    6. -
    7. We want to ensure that everyone on the team has a chance to participate and add their unique skills and perspectives. Let's work together to make sure everyone is included and valued. More experienced team members should keep in mind that some members may be less experienced, and may need extra support and guidance. By offering more time and assistance to those who may need it, we can ensure that everyone has an opportunity to grow their skills and contribute to the project. Remember, this is a team effort and we want to work together to achieve our goals rather than rushing ahead. -
    8. -
    9. If you need to drop off from the event before it ends, you must inform your team and the team facilitator. If you drop off without informing your team, you will be ineligible to participate in the next hackathon. -
    10. -
    11. If you witness or experience any behavior that violates this code of conduct, please report it immediately to your facilitator, the HackTeam or the Code Institute Community Team.
    12. - -
    -

    By participating in a Code Institute Hackathon, you agree to abide by this code of conduct and any decisions made by Code Institute regarding violations of it.

    +
      +
    1. Be respectful and inclusive towards all other participants, facilitators, Hackteam, Staff or anyone else + involved in the hackathon. Discriminatory language or behavior of any kind is not allowed. +
    2. +
    3. Only register if you can commit a minimum of 3 hours a day.
    4. +
    5. Keep in contact with your team. All project discussions should take place within the dedicated team + Slack Channel. This way, our Hackathon Facilitators and Staff can stay up to date on your progress and + offer support when needed. We want to make sure that everyone on the team is aware of all goings-on. +
    6. +
    7. We want to ensure that everyone on the team has a chance to participate and add their unique skills and + perspectives. Let's work together to make sure everyone is included and valued. More experienced team + members should keep in mind that some members may be less experienced, and may need extra support and + guidance. By offering more time and assistance to those who may need it, we can ensure that everyone has + an opportunity to grow their skills and contribute to the project. Remember, this is a team effort and + we want to work together to achieve our goals rather than rushing ahead. +
    8. +
    9. If you need to drop off from the event before it ends, you must inform your team and the team + facilitator. If you drop off without informing your team, you will be ineligible to participate in the + next hackathon. +
    10. +
    11. If you witness or experience any behavior that violates this code of conduct, please report it + immediately to your facilitator, the HackTeam or the Code Institute Community Team.
    12. + +
    +

    By participating in a Code Institute Hackathon, you agree to abide by this code of conduct and any decisions + made by Code Institute regarding violations of it.

    - - - -{% endblock %} \ No newline at end of file +{% endblock %}