From 622263827ba2c44739dccb035943c48489f3166e Mon Sep 17 00:00:00 2001 From: Johannes Christ Date: Fri, 25 Mar 2022 10:23:07 +0100 Subject: Fix link to code jam image Closes #704. --- pydis_site/templates/events/sidebar/code-jams/7.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pydis_site/templates') diff --git a/pydis_site/templates/events/sidebar/code-jams/7.html b/pydis_site/templates/events/sidebar/code-jams/7.html index d4615c2a..4aefdbd9 100644 --- a/pydis_site/templates/events/sidebar/code-jams/7.html +++ b/pydis_site/templates/events/sidebar/code-jams/7.html @@ -1,7 +1,7 @@ {% load static %}
- Summer Code Jam 2020 + Summer Code Jam 2020 Django -- cgit v1.2.3 From 122bd7adcf289751ffd9320bf92a962823b720f2 Mon Sep 17 00:00:00 2001 From: Hassan Abouelela Date: Sat, 23 Apr 2022 00:06:31 +0400 Subject: Invert Deleted Message Log Order Inverts the order messages are displayed in on the logs page to match the order they would be displayed in on discord (and how they would be read) Signed-off-by: Hassan Abouelela --- pydis_site/templates/staff/logs.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pydis_site/templates') diff --git a/pydis_site/templates/staff/logs.html b/pydis_site/templates/staff/logs.html index 7bd6ba29..bccde9cb 100644 --- a/pydis_site/templates/staff/logs.html +++ b/pydis_site/templates/staff/logs.html @@ -14,7 +14,7 @@
  • Date: {{ deletion_context.creation }}
  • - {% for message in deletion_context.deletedmessage_set.all %} + {% for message in deletion_context.deletedmessage_set.all reversed %}
    Date: Sat, 30 Apr 2022 18:31:05 +0100 Subject: Add message ID to delete logs --- pydis_site/templates/staff/logs.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pydis_site/templates') diff --git a/pydis_site/templates/staff/logs.html b/pydis_site/templates/staff/logs.html index bccde9cb..5e2a200b 100644 --- a/pydis_site/templates/staff/logs.html +++ b/pydis_site/templates/staff/logs.html @@ -22,7 +22,7 @@
    -- cgit v1.2.3 From 754070ef247ea6d0e28d7a9f14fc41a2080201f6 Mon Sep 17 00:00:00 2001 From: mbaruh Date: Sat, 18 Jun 2022 20:41:30 +0300 Subject: Initial CJ9 info --- pydis_site/static/images/events/Replit.png | Bin 0 -> 12114 bytes .../events/summer_code_jam_2022/site_banner.png | Bin 0 -> 301066 bytes pydis_site/templates/events/index.html | 3 + .../templates/events/pages/code-jams/9/_index.html | 40 ++++++++++++ .../templates/events/pages/code-jams/9/rules.html | 69 +++++++++++++++++++++ .../templates/events/pages/code-jams/_index.html | 8 +++ .../templates/events/sidebar/code-jams/9.html | 20 ++++++ .../events/sidebar/code-jams/ongoing-code-jam.html | 6 +- .../templates/events/sidebar/events-list.html | 10 +-- .../templates/events/sidebar/ongoing-event.html | 6 +- 10 files changed, 151 insertions(+), 11 deletions(-) create mode 100644 pydis_site/static/images/events/Replit.png create mode 100644 pydis_site/static/images/events/summer_code_jam_2022/site_banner.png create mode 100644 pydis_site/templates/events/pages/code-jams/9/_index.html create mode 100644 pydis_site/templates/events/pages/code-jams/9/rules.html create mode 100644 pydis_site/templates/events/sidebar/code-jams/9.html (limited to 'pydis_site/templates') diff --git a/pydis_site/static/images/events/Replit.png b/pydis_site/static/images/events/Replit.png new file mode 100644 index 00000000..a8202641 Binary files /dev/null and b/pydis_site/static/images/events/Replit.png differ diff --git a/pydis_site/static/images/events/summer_code_jam_2022/site_banner.png b/pydis_site/static/images/events/summer_code_jam_2022/site_banner.png new file mode 100644 index 00000000..30b3dfbc Binary files /dev/null and b/pydis_site/static/images/events/summer_code_jam_2022/site_banner.png differ diff --git a/pydis_site/templates/events/index.html b/pydis_site/templates/events/index.html index 158ec56b..ccbbabf0 100644 --- a/pydis_site/templates/events/index.html +++ b/pydis_site/templates/events/index.html @@ -9,6 +9,9 @@ {% block event_content %}

    Code Jams

    +

    Each year, we organize at least one code jam, one during the summer and sometimes one during the winter. During these events, members of our community will work together in teams to create something amazing using a technology we picked for them. One such technology that was picked for the Summer 2021 Code Jam was text user interfaces (TUIS), where teams could pick from a pre-approved list of frameworks.

    To help fuel the creative process, we provide a specific theme, like Think Inside the Box or Early Internet. At the end of the Code Jam, the projects are judged by Python Discord server staff members and guest judges from the larger Python community. The judges will consider creativity, code quality, teamwork, and adherence to the theme.

    If you want to read more about Code Jams, visit our Code Jam info page or watch this video showcasing the best projects created during the Winter Code Jam 2020: Ancient Technology:

    diff --git a/pydis_site/templates/events/pages/code-jams/9/_index.html b/pydis_site/templates/events/pages/code-jams/9/_index.html new file mode 100644 index 00000000..c8d5fbf7 --- /dev/null +++ b/pydis_site/templates/events/pages/code-jams/9/_index.html @@ -0,0 +1,40 @@ +{% extends "events/base_sidebar.html" %} + +{% block title %}Summer Code Jam 2022{% endblock %} + +{% block breadcrumb %} +
  • Events
  • +
  • Code Jams
  • +
  • Summer Code Jam 2022
  • +{% endblock %} + +{% block event_content %} +

    Once a year we host a code jam for members of our server to participate in. The code jam is an event where we place you + in a team with 5 other random server members. You then have 11 days to code some sort of application or program in Python. + Your program must use the specified technology/framework and incorporate the theme chosen by the server. +

    +

    + After the 11 days are complete, your team has 4 days to finish documentation and create a video presentation showcasing + and walking through the program that your team has created. More details and specifics of this will be released within the next 2 weeks. +

    + +

    Important Dates

    +
      +
    • Saturday, June 18 - Form to submit theme suggestions opens
    • +
    • Wednesday, June 29 - The Qualifier is released
    • +
    • Wednesday, July 6 - Voting for the theme opens
    • +
    • Wednesday, July 13 - The Qualifier closes
    • +
    • Thursday, July 21 - Code Jam Begins
    • +
    • Sunday, July 31 - Coding portion of the jam ends
    • +
    • Sunday, August 4 - Code Jam submissions are closed
    • +
    +

    How to Join

    +

    The Qualifier isn't released yet, but to receive the most up-to-date information and to get notified + when the Qualifier is released you can join the server: discord.gg/python.

    +{% endblock %} + +{% block sidebar %} + + {% include "events/sidebar/code-jams/9.html" %} + +{% endblock %} diff --git a/pydis_site/templates/events/pages/code-jams/9/rules.html b/pydis_site/templates/events/pages/code-jams/9/rules.html new file mode 100644 index 00000000..72c0372e --- /dev/null +++ b/pydis_site/templates/events/pages/code-jams/9/rules.html @@ -0,0 +1,69 @@ +{% extends "events/base_sidebar.html" %} + +{% block title %}Summer Code Jam 2022{% endblock %} + +{% block breadcrumb %} +
  • Events
  • +
  • Code Jams
  • +
  • Summer Code Jam 2022
  • +
  • Rules
  • +{% endblock %} + +{% block event_content %} +
      +
    1. Your solution must use one of the approved frameworks (a list will be released soon). It is not permitted to circumvent this rule by e.g. using the approved framework as a wrapper for another framework.

    2. +
    3. Your solution should be platform agnostic. For example, if you use filepaths in your submission, use pathlib to create platform agnostic Path objects instead of hardcoding the paths.

    4. +
    5. +

      + You must document precisely how to install and run your project. + This should be as easy as possible, which means you should consider using dependency managers like pipenv or poetry. + We would also encourage you to use docker and docker-compose to containerize your project, but this isn't a requirement. +

      +
    6. +
    7. + You must get contributions from every member of your team, if you have an issue with someone on your team please contact a member of the administration team. + These contributions do not necessarily have to be code, for example it's absolutely fine for someone to contribute management, documentation, graphics or audio. + + Team members that do not contribute will be removed from the Code Jam, and will not receive their share of any prizes the team may win. + They may also be barred from entering future events. + +
    8. +
    9. You must use GitHub as source control.

    10. +
    11. +

      + All code and assets must be compatible with the MIT license. + This is because we will be merging your submission into our summer-code-jam-2022 repo at the end of the jam, + and this repo is licensed with the MIT license. + Projects that include assets that are incompatible with this license may be disqualified. +

      +
    12. +
    13. All code must be written and committed within the time constrictions of the jam. Late commits may be reverted, so make sure you leave enough time to bug test your program.

    14. +
    15. +

      + Use English as the main language for your project, including names, comments, documentation, and commit messages. + Any text displayed in your application should also be in English, + although you are allowed to provide the user with options for internationalisation and translation. +

      +
    16. +
    17. +

      + Your team, once the coding portion of the code jam is complete, must create a video presentation that showcases and explains your final product. + This must be in a video format and must be uploaded somewhere for the judges to view (i.e. unlisted Youtube video, Vimeo, etc.) + The video can be as simple as a screen recording with annotated text. + Teams who do not submit a final video presentation may be disqualified. +

      +
    18. +
    + +
    + Please note that our regular + community rules and code of conduct + also apply during the event and that we reserve the right to make changes to these rules at any time. +
    +{% endblock %} + +{% block sidebar %} + + {% include "events/sidebar/code-jams/9.html" %} + +{% endblock %} diff --git a/pydis_site/templates/events/pages/code-jams/_index.html b/pydis_site/templates/events/pages/code-jams/_index.html index 207d4b9a..04e01a24 100644 --- a/pydis_site/templates/events/pages/code-jams/_index.html +++ b/pydis_site/templates/events/pages/code-jams/_index.html @@ -8,6 +8,14 @@ {% block title %}Code Jams{% endblock %} {% block event_content %} +

    If you've been around the server for a while, or you just happened to join at the right time, you may have heard of something known as a Code Jam. diff --git a/pydis_site/templates/events/sidebar/code-jams/9.html b/pydis_site/templates/events/sidebar/code-jams/9.html new file mode 100644 index 00000000..69bc7dfd --- /dev/null +++ b/pydis_site/templates/events/sidebar/code-jams/9.html @@ -0,0 +1,20 @@ +{% load static %} +

    +

    Important Links

    + Rules + The Code Style Guide + +
    +
    + Summer Code Jam 2022 + + + Digital Ocean + + + JetBrains + + + Replit + +
    diff --git a/pydis_site/templates/events/sidebar/code-jams/ongoing-code-jam.html b/pydis_site/templates/events/sidebar/code-jams/ongoing-code-jam.html index f4fa3a37..37569e57 100644 --- a/pydis_site/templates/events/sidebar/code-jams/ongoing-code-jam.html +++ b/pydis_site/templates/events/sidebar/code-jams/ongoing-code-jam.html @@ -1,8 +1,8 @@ {% load static %}
    - - - Summer Code Jam 2021 + + + Summer Code Jam 2022
    diff --git a/pydis_site/templates/events/sidebar/events-list.html b/pydis_site/templates/events/sidebar/events-list.html index 5dfe5dc2..b8745231 100644 --- a/pydis_site/templates/events/sidebar/events-list.html +++ b/pydis_site/templates/events/sidebar/events-list.html @@ -1,10 +1,10 @@ diff --git a/pydis_site/templates/events/sidebar/ongoing-event.html b/pydis_site/templates/events/sidebar/ongoing-event.html index 37dfdf77..e375fa38 100644 --- a/pydis_site/templates/events/sidebar/ongoing-event.html +++ b/pydis_site/templates/events/sidebar/ongoing-event.html @@ -1,8 +1,8 @@ {% load static %}
    - - - Summer Code Jam 2021 + + + Summer Code Jam 2022
    -- cgit v1.2.3 From d62ce6f8b4fe18e0b31e783d6009ac6f94a6ec9c Mon Sep 17 00:00:00 2001 From: kosayoda Date: Sat, 18 Jun 2022 19:41:24 -0400 Subject: Hotfix: Fit button size to mobile screens. Unfortunately, responsive buttons land in 0.9.4 so until django-simple-bulma has that we can settle for a slightly less eye-catching button. --- pydis_site/templates/events/pages/code-jams/_index.html | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'pydis_site/templates') diff --git a/pydis_site/templates/events/pages/code-jams/_index.html b/pydis_site/templates/events/pages/code-jams/_index.html index 04e01a24..6c21233c 100644 --- a/pydis_site/templates/events/pages/code-jams/_index.html +++ b/pydis_site/templates/events/pages/code-jams/_index.html @@ -8,14 +8,17 @@ {% block title %}Code Jams{% endblock %} {% block event_content %} -
    - - Code Jam 2022 is Coming Up This July! - - + +

    If you've been around the server for a while, or you just happened to join at the right time, you may have heard of something known as a Code Jam. -- cgit v1.2.3 From 64b5d63798af1c7a53c9b57c7314db3c5cc1ad30 Mon Sep 17 00:00:00 2001 From: kosayoda Date: Sat, 18 Jun 2022 19:53:38 -0400 Subject: Emphasize code jam title. --- pydis_site/templates/events/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pydis_site/templates') diff --git a/pydis_site/templates/events/index.html b/pydis_site/templates/events/index.html index ccbbabf0..d230d28c 100644 --- a/pydis_site/templates/events/index.html +++ b/pydis_site/templates/events/index.html @@ -10,7 +10,7 @@

    Code Jams

    - The 2022 Summer Code Jam qualifier will open June 29th. Check out the details here. + The 2022 Summer Code Jam qualifier will open June 29th. Check out the details here.

    Each year, we organize at least one code jam, one during the summer and sometimes one during the winter. During these events, members of our community will work together in teams to create something amazing using a technology we picked for them. One such technology that was picked for the Summer 2021 Code Jam was text user interfaces (TUIS), where teams could pick from a pre-approved list of frameworks.

    To help fuel the creative process, we provide a specific theme, like Think Inside the Box or Early Internet. At the end of the Code Jam, the projects are judged by Python Discord server staff members and guest judges from the larger Python community. The judges will consider creativity, code quality, teamwork, and adherence to the theme.

    -- cgit v1.2.3 From 8cf311381f5e0ede3a13b7b65e23eb1a725df2ef Mon Sep 17 00:00:00 2001 From: kosayoda Date: Sat, 18 Jun 2022 21:28:30 -0400 Subject: Add Summer CJ 2022 banner to frontpage. --- pydis_site/templates/home/index.html | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'pydis_site/templates') diff --git a/pydis_site/templates/home/index.html b/pydis_site/templates/home/index.html index c7350cac..95c8dd5f 100644 --- a/pydis_site/templates/home/index.html +++ b/pydis_site/templates/home/index.html @@ -9,6 +9,13 @@ {% block content %} {% include "base/navbar.html" %} + +
    + + Summer Code Jam 2022 + +
    +
    @@ -37,7 +44,15 @@ >
    + + {# Code Jam Banner #} +
    + + Summer Code Jam 2022 + +
    +
    {# Animated wave elements #} -- cgit v1.2.3 From 477502b3acadffb5b88f1872fb063a864b74c753 Mon Sep 17 00:00:00 2001 From: mbaruh Date: Tue, 21 Jun 2022 21:49:57 +0300 Subject: Add prizes section to CJ9 page --- .../templates/events/pages/code-jams/9/_index.html | 68 ++++++++++++++++++++++ 1 file changed, 68 insertions(+) (limited to 'pydis_site/templates') diff --git a/pydis_site/templates/events/pages/code-jams/9/_index.html b/pydis_site/templates/events/pages/code-jams/9/_index.html index c8d5fbf7..fc1e7c02 100644 --- a/pydis_site/templates/events/pages/code-jams/9/_index.html +++ b/pydis_site/templates/events/pages/code-jams/9/_index.html @@ -1,5 +1,7 @@ {% extends "events/base_sidebar.html" %} +{% load static %} + {% block title %}Summer Code Jam 2022{% endblock %} {% block breadcrumb %} @@ -31,6 +33,72 @@

    How to Join

    The Qualifier isn't released yet, but to receive the most up-to-date information and to get notified when the Qualifier is released you can join the server: discord.gg/python.

    + +

    Prizes

    +

    + Our Code Jam Sponsors have provided prizes for the winners of the code jam. + Also, thanks to our Patreon patrons supporting this server, we are able to send members of the winning teams + Python Discord t-shirts and possibly other goodies. +

    + +
    +
    +
    +
    + Digital Ocean +
    +
    + +

    + Scalable compute platform with add-on storage, security, and monitoring capabilities. + We make it simple to launch in the cloud and scale up as you grow—whether you’re running one virtual machine or ten thousand. +

    +

    Prizes
    + DigitalOcean credits to the members of a winning team.

    +
    +
    +
    +
    + +
    +
    +
    +
    + JetBrains +
    +
    + +

    + Whatever platform or language you work with, JetBrains has a development tool for you. + We help developers work faster by automating common, repetitive tasks to enable them to stay focused on code design and the big picture. + We provide tools to explore and familiarize with code bases faster. Our products make it easy for you to take care of quality during all stages of development and spend less time on maintenance tasks. +

    +

    Prizes
    + 1-year JetBrain licenses to the members of a winning team.

    +
    +
    +
    +
    + +
    +
    +
    +
    + Replit +
    +
    + +

    Start coding instantly, right from your browser. + With GitHub integration and support for nearly every major programming language, Replit is the best place to code. + Our mission is to bring the next billion software creators online. + We build powerful, simple tools and platforms for learners, educators, and developers. +

    +

    Prizes
    + Three months of the Replit hacker plan to the members of a winning team.

    +
    +
    +
    +
    {% endblock %} {% block sidebar %} -- cgit v1.2.3 From 96800f94027be42c69b5e75474597ed9e2241483 Mon Sep 17 00:00:00 2001 From: mbaruh Date: Tue, 21 Jun 2022 22:42:23 +0300 Subject: Add frameworks page to CJ9 --- .../templates/events/pages/code-jams/9/_index.html | 7 ++ .../events/pages/code-jams/9/frameworks.html | 109 +++++++++++++++++++++ .../templates/events/sidebar/code-jams/9.html | 1 + 3 files changed, 117 insertions(+) create mode 100644 pydis_site/templates/events/pages/code-jams/9/frameworks.html (limited to 'pydis_site/templates') diff --git a/pydis_site/templates/events/pages/code-jams/9/_index.html b/pydis_site/templates/events/pages/code-jams/9/_index.html index fc1e7c02..6e458481 100644 --- a/pydis_site/templates/events/pages/code-jams/9/_index.html +++ b/pydis_site/templates/events/pages/code-jams/9/_index.html @@ -34,6 +34,13 @@

    The Qualifier isn't released yet, but to receive the most up-to-date information and to get notified when the Qualifier is released you can join the server: discord.gg/python.

    +

    Technology

    +

    + The chosen technology/tech stack for this year is WebSockets. + Each team must make use of the approved frameworks to create a WebSockets-based app. + For more information of websockets, check out this wikipedia article. +

    +

    Prizes

    Our Code Jam Sponsors have provided prizes for the winners of the code jam. diff --git a/pydis_site/templates/events/pages/code-jams/9/frameworks.html b/pydis_site/templates/events/pages/code-jams/9/frameworks.html new file mode 100644 index 00000000..15e280aa --- /dev/null +++ b/pydis_site/templates/events/pages/code-jams/9/frameworks.html @@ -0,0 +1,109 @@ +{% extends "events/base_sidebar.html" %} + +{% load static %} + +{% block title %}Summer Code Jam 2022{% endblock %} + +{% block breadcrumb %} +

  • Events
  • +
  • Code Jams
  • +
  • Summer Code Jam 2022
  • +
  • Approved Frameworks
  • +{% endblock %} + +{% block event_content %} +

    Below is the list of approved frameworks that you can use for the code jam. + Please work with your team to choose a library that everyone can and want to develop with. + If there is a library not listed below that you think should be here, you're welcome to discuss it with the Events Team over at the server. +

    +
    +
    +
    +

    websockets

    +

    websockets is a library for building WebSocket servers and clients in Python with a focus on correctness, simplicity, robustness, and performance. + Built on top of asyncio, Python’s standard asynchronous I/O framework, it provides an elegant coroutine-based API. +

    +
    +
    + +
    +
    +
    +
    +

    Flask-SocketIO

    +

    Flask-SocketIO gives Flask applications access to low latency bi-directional communications between the clients and the server. +

    +
    +
    + +
    +
    +
    +
    +

    Django Channels

    +

    Channels is a project that takes Django and extends its abilities beyond HTTP - to handle WebSockets, chat protocols, IoT protocols, and more. + It’s built on a Python specification called ASGI. +

    +
    +
    + +
    +
    +
    +
    +

    wsproto

    +

    wsproto is a WebSocket protocol stack written to be as flexible as possible. + To that end it is written in pure Python and performs no I/O of its own. + Instead it relies on the user to provide a bridge between it and whichever I/O mechanism is in use, allowing it to be used in single-threaded, multi-threaded or event-driven code. +

    +
    +
    + +
    +
    +
    +
    +

    Starlette

    +

    Starlette is a lightweight ASGI framework/toolkit, which is ideal for building async web services in Python. +

    +
    +
    + +
    +
    +
    +
    +

    FastAPI

    +

    FastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.6+ based on standard Python type hints. +

    +
    +
    + +
    + + +{% endblock %} + +{% block sidebar %} + + {% include "events/sidebar/code-jams/9.html" %} + +{% endblock %} diff --git a/pydis_site/templates/events/sidebar/code-jams/9.html b/pydis_site/templates/events/sidebar/code-jams/9.html index 69bc7dfd..2351973f 100644 --- a/pydis_site/templates/events/sidebar/code-jams/9.html +++ b/pydis_site/templates/events/sidebar/code-jams/9.html @@ -2,6 +2,7 @@ -- cgit v1.2.3 From cd6e2b5e29f6b4bc3e7c26b1044b2cf19b8b50c0 Mon Sep 17 00:00:00 2001 From: mina <75038675+minalike@users.noreply.github.com> Date: Thu, 23 Jun 2022 10:22:02 -0400 Subject: Update mentions of Code Jam frequency from twice a year to once a year Code Jam 6 of January 2020 was our last Winter Code Jam --- pydis_site/templates/events/index.html | 2 +- pydis_site/templates/events/pages/code-jams/_index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'pydis_site/templates') diff --git a/pydis_site/templates/events/index.html b/pydis_site/templates/events/index.html index d230d28c..13aaff9c 100644 --- a/pydis_site/templates/events/index.html +++ b/pydis_site/templates/events/index.html @@ -12,7 +12,7 @@
    The 2022 Summer Code Jam qualifier will open June 29th. Check out the details here.
    -

    Each year, we organize at least one code jam, one during the summer and sometimes one during the winter. During these events, members of our community will work together in teams to create something amazing using a technology we picked for them. One such technology that was picked for the Summer 2021 Code Jam was text user interfaces (TUIS), where teams could pick from a pre-approved list of frameworks.

    +

    Every year we hold a community-wide Summer Code Jam. For this event, members of our community are assigned to teams to collaborate and create something amazing using a technology we picked for them. One such technology that was picked for the Summer 2021 Code Jam was text user interfaces (TUIs), where teams could pick from a pre-approved list of frameworks.

    To help fuel the creative process, we provide a specific theme, like Think Inside the Box or Early Internet. At the end of the Code Jam, the projects are judged by Python Discord server staff members and guest judges from the larger Python community. The judges will consider creativity, code quality, teamwork, and adherence to the theme.

    If you want to read more about Code Jams, visit our Code Jam info page or watch this video showcasing the best projects created during the Winter Code Jam 2020: Ancient Technology:

    diff --git a/pydis_site/templates/events/pages/code-jams/_index.html b/pydis_site/templates/events/pages/code-jams/_index.html index 6c21233c..cef0579b 100644 --- a/pydis_site/templates/events/pages/code-jams/_index.html +++ b/pydis_site/templates/events/pages/code-jams/_index.html @@ -42,7 +42,7 @@

    How often do these happen?

    - Our Code Jams happen twice a year. We have a Winter Jam and a Summer Jam. + Our Code Jams happen once a year ever summer.

    What happens if I have to drop out?

    -- cgit v1.2.3 From 87c07de8fdb4cf0577bb5cf46f01cb01aaf61b26 Mon Sep 17 00:00:00 2001 From: mina <75038675+minalike@users.noreply.github.com> Date: Thu, 23 Jun 2022 10:24:27 -0400 Subject: Make Code Jam information page more discoverable Make "Code Jams" a hyperlink on the main Events page Add related links sidebar to Events page --- pydis_site/templates/events/index.html | 2 +- pydis_site/templates/events/sidebar/events-list.html | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'pydis_site/templates') diff --git a/pydis_site/templates/events/index.html b/pydis_site/templates/events/index.html index 13aaff9c..62d62111 100644 --- a/pydis_site/templates/events/index.html +++ b/pydis_site/templates/events/index.html @@ -8,7 +8,7 @@ {% block event_content %}
    -

    Code Jams

    +

    Code Jams

    The 2022 Summer Code Jam qualifier will open June 29th. Check out the details here.
    diff --git a/pydis_site/templates/events/sidebar/events-list.html b/pydis_site/templates/events/sidebar/events-list.html index b8745231..8deac80e 100644 --- a/pydis_site/templates/events/sidebar/events-list.html +++ b/pydis_site/templates/events/sidebar/events-list.html @@ -8,3 +8,10 @@
  • December: Advent of Code
  • + +
    + + +
    -- cgit v1.2.3 From 2ed2504111e842ac2ac83a52837be5fe69942539 Mon Sep 17 00:00:00 2001 From: mina <75038675+minalike@users.noreply.github.com> Date: Thu, 23 Jun 2022 11:30:16 -0400 Subject: Update pydis_site/templates/events/pages/code-jams/_index.html Co-authored-by: Kieran Siek --- pydis_site/templates/events/pages/code-jams/_index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pydis_site/templates') diff --git a/pydis_site/templates/events/pages/code-jams/_index.html b/pydis_site/templates/events/pages/code-jams/_index.html index cef0579b..5e3cd930 100644 --- a/pydis_site/templates/events/pages/code-jams/_index.html +++ b/pydis_site/templates/events/pages/code-jams/_index.html @@ -42,7 +42,7 @@

    How often do these happen?

    - Our Code Jams happen once a year ever summer. + Our Code Jams happen once a year every summer.

    What happens if I have to drop out?

    -- cgit v1.2.3 From 2d9f823ba82b88761258e93c3868b3d2b4a887c3 Mon Sep 17 00:00:00 2001 From: kosayoda Date: Sun, 26 Jun 2022 23:04:39 -0400 Subject: Replace missing FA icons in interactive timeline. `fa-duck` and `fa-alien-monster` (renamed `fa-alien-8bit` in the latest FontAwesome) are part of the Pro plan, which we no longer have. --- pydis_site/templates/home/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pydis_site/templates') diff --git a/pydis_site/templates/home/index.html b/pydis_site/templates/home/index.html index 95c8dd5f..33c84a97 100644 --- a/pydis_site/templates/home/index.html +++ b/pydis_site/templates/home/index.html @@ -100,8 +100,8 @@ - - + +
    -- cgit v1.2.3 From 382f5cc427dedc95056e04db38980a6a9fd15f73 Mon Sep 17 00:00:00 2001 From: kosayoda Date: Sun, 26 Jun 2022 23:05:13 -0400 Subject: Improve icon size and alignment. --- pydis_site/static/css/home/index.css | 3 +-- pydis_site/templates/home/index.html | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'pydis_site/templates') diff --git a/pydis_site/static/css/home/index.css b/pydis_site/static/css/home/index.css index e1d70370..e117a35b 100644 --- a/pydis_site/static/css/home/index.css +++ b/pydis_site/static/css/home/index.css @@ -126,8 +126,7 @@ h1 { margin: 0 4% 0 4%; background-color: #3EB2EF; color: white; - font-size: 15px; - line-height: 33px; + line-height: 31px; border:none; box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); transition: all 0.3s cubic-bezier(.25,.8,.25,1); diff --git a/pydis_site/templates/home/index.html b/pydis_site/templates/home/index.html index 33c84a97..fcbb87e4 100644 --- a/pydis_site/templates/home/index.html +++ b/pydis_site/templates/home/index.html @@ -99,9 +99,9 @@
    - + - +
    -- cgit v1.2.3 From 9f275f199f4388c89fe8d600a7f102cbec4aa5c5 Mon Sep 17 00:00:00 2001 From: Bluenix Date: Tue, 28 Jun 2022 22:06:42 +0200 Subject: Reorder frameworks after recommended use --- .../events/pages/code-jams/9/frameworks.html | 66 ++++++++++++---------- 1 file changed, 36 insertions(+), 30 deletions(-) (limited to 'pydis_site/templates') diff --git a/pydis_site/templates/events/pages/code-jams/9/frameworks.html b/pydis_site/templates/events/pages/code-jams/9/frameworks.html index 15e280aa..25eed595 100644 --- a/pydis_site/templates/events/pages/code-jams/9/frameworks.html +++ b/pydis_site/templates/events/pages/code-jams/9/frameworks.html @@ -16,86 +16,92 @@ Please work with your team to choose a library that everyone can and want to develop with. If there is a library not listed below that you think should be here, you're welcome to discuss it with the Events Team over at the server.

    -
    + +
    -

    websockets

    -

    websockets is a library for building WebSocket servers and clients in Python with a focus on correctness, simplicity, robustness, and performance. - Built on top of asyncio, Python’s standard asynchronous I/O framework, it provides an elegant coroutine-based API. +

    FastAPI

    +

    FastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.6+ based on standard Python type hints.

    +
    -

    Flask-SocketIO

    -

    Flask-SocketIO gives Flask applications access to low latency bi-directional communications between the clients and the server. +

    Starlette

    +

    Starlette is a lightweight ASGI framework/toolkit, which is ideal for building async web services in Python.

    +
    -

    Django Channels

    -

    Channels is a project that takes Django and extends its abilities beyond HTTP - to handle WebSockets, chat protocols, IoT protocols, and more. - It’s built on a Python specification called ASGI. +

    websockets

    +

    websockets is a library for building WebSocket servers and clients in Python with a focus on correctness, simplicity, robustness, and performance. + Built on top of asyncio, Python’s standard asynchronous I/O framework, it provides an elegant coroutine-based API.

    +
    -

    wsproto

    -

    wsproto is a WebSocket protocol stack written to be as flexible as possible. - To that end it is written in pure Python and performs no I/O of its own. - Instead it relies on the user to provide a bridge between it and whichever I/O mechanism is in use, allowing it to be used in single-threaded, multi-threaded or event-driven code. +

    Django Channels

    +

    Channels is a project that takes Django and extends its abilities beyond HTTP - to handle WebSockets, chat protocols, IoT protocols, and more. + It’s built on a Python specification called ASGI.

    +
    -

    Starlette

    -

    Starlette is a lightweight ASGI framework/toolkit, which is ideal for building async web services in Python. +

    Flask-SocketIO

    +

    Flask-SocketIO gives Flask applications access to low latency bi-directional communications between the clients and the server.

    -
    + +
    -

    FastAPI

    -

    FastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.6+ based on standard Python type hints. +

    wsproto

    +

    wsproto is a WebSocket protocol stack written to be as flexible as possible. + To that end it is written in pure Python and performs no I/O of its own. + Instead it relies on the user to provide a bridge between it and whichever I/O mechanism is in use, allowing it to be used in single-threaded, multi-threaded or event-driven code.

    -- cgit v1.2.3 From d4e9847673603b0081b971fb19b6502638842a3c Mon Sep 17 00:00:00 2001 From: Bluenix Date: Wed, 29 Jun 2022 00:42:21 +0200 Subject: Reword CJ9 frameworks explanations --- .../templates/events/pages/code-jams/9/frameworks.html | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'pydis_site/templates') diff --git a/pydis_site/templates/events/pages/code-jams/9/frameworks.html b/pydis_site/templates/events/pages/code-jams/9/frameworks.html index 25eed595..36a6604c 100644 --- a/pydis_site/templates/events/pages/code-jams/9/frameworks.html +++ b/pydis_site/templates/events/pages/code-jams/9/frameworks.html @@ -21,7 +21,7 @@

    FastAPI

    -

    FastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.6+ based on standard Python type hints. +

    FastAPI is a modern web framework great for WebSockets based on standard Python type hints which provides great editor support.

    @@ -49,8 +49,7 @@

    websockets

    -

    websockets is a library for building WebSocket servers and clients in Python with a focus on correctness, simplicity, robustness, and performance. - Built on top of asyncio, Python’s standard asynchronous I/O framework, it provides an elegant coroutine-based API. +

    websockets is a library for building both WebSocket clients and servers with focus on simplicity and performance.

    @@ -64,8 +63,7 @@

    Django Channels

    -

    Channels is a project that takes Django and extends its abilities beyond HTTP - to handle WebSockets, chat protocols, IoT protocols, and more. - It’s built on a Python specification called ASGI. +

    Django Channels adds WebSocket-support to Django - built on ASGI like other web frameworks.

    @@ -93,9 +91,7 @@

    wsproto

    -

    wsproto is a WebSocket protocol stack written to be as flexible as possible. - To that end it is written in pure Python and performs no I/O of its own. - Instead it relies on the user to provide a bridge between it and whichever I/O mechanism is in use, allowing it to be used in single-threaded, multi-threaded or event-driven code. +

    wsproto is a pure-Python WebSocket protocol stack written to be as flexible as possible by having the user build the bridge to the I/O.

    -- cgit v1.2.3 From ca2631dd16a0381356c02e2dc511b12285aacfd0 Mon Sep 17 00:00:00 2001 From: Bluenix Date: Wed, 29 Jun 2022 23:50:28 +0200 Subject: Update CJ9 qualifier information --- pydis_site/templates/events/pages/code-jams/9/_index.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'pydis_site/templates') diff --git a/pydis_site/templates/events/pages/code-jams/9/_index.html b/pydis_site/templates/events/pages/code-jams/9/_index.html index 6e458481..ec4af573 100644 --- a/pydis_site/templates/events/pages/code-jams/9/_index.html +++ b/pydis_site/templates/events/pages/code-jams/9/_index.html @@ -31,9 +31,11 @@
  • Sunday, August 4 - Code Jam submissions are closed
  • How to Join

    -

    The Qualifier isn't released yet, but to receive the most up-to-date information and to get notified - when the Qualifier is released you can join the server: discord.gg/python.

    - +

    + Before being able to join the code jam, you must complete a qualifier which tests your knowledge in Python. + The qualifier can be found on our GitHub + and once completed you should submit your solution using the sign-up form. +

    Technology

    The chosen technology/tech stack for this year is WebSockets. -- cgit v1.2.3 From 4847f18d50158dcfbe8c9a84b54bcfe25e0b7452 Mon Sep 17 00:00:00 2001 From: Bluenix Date: Thu, 30 Jun 2022 00:02:45 +0200 Subject: Update events index page about the CJ9 qualifier --- pydis_site/templates/events/index.html | 2 +- pydis_site/templates/events/pages/code-jams/_index.html | 11 +++-------- 2 files changed, 4 insertions(+), 9 deletions(-) (limited to 'pydis_site/templates') diff --git a/pydis_site/templates/events/index.html b/pydis_site/templates/events/index.html index 62d62111..db3e32f7 100644 --- a/pydis_site/templates/events/index.html +++ b/pydis_site/templates/events/index.html @@ -10,7 +10,7 @@

    Code Jams

    - The 2022 Summer Code Jam qualifier will open June 29th. Check out the details here. + The 2022 Summer Code Jam is currently underway and you can still enter! The qualifier is open until July 13; check out the details here.

    Every year we hold a community-wide Summer Code Jam. For this event, members of our community are assigned to teams to collaborate and create something amazing using a technology we picked for them. One such technology that was picked for the Summer 2021 Code Jam was text user interfaces (TUIs), where teams could pick from a pre-approved list of frameworks.

    To help fuel the creative process, we provide a specific theme, like Think Inside the Box or Early Internet. At the end of the Code Jam, the projects are judged by Python Discord server staff members and guest judges from the larger Python community. The judges will consider creativity, code quality, teamwork, and adherence to the theme.

    diff --git a/pydis_site/templates/events/pages/code-jams/_index.html b/pydis_site/templates/events/pages/code-jams/_index.html index 5e3cd930..74efcfaa 100644 --- a/pydis_site/templates/events/pages/code-jams/_index.html +++ b/pydis_site/templates/events/pages/code-jams/_index.html @@ -9,14 +9,9 @@ {% block event_content %}
    - - - Code Jam 2022 is Coming This July! - - - - - +
    + The 2022 Summer Code Jam is currently underway and you can still enter! The qualifier is open until July 13; check out the details here. +

    -- cgit v1.2.3 From 924489925a0eafecca67c041377f14a9ba632844 Mon Sep 17 00:00:00 2001 From: Bluenix Date: Thu, 30 Jun 2022 00:07:28 +0200 Subject: Strike out passed dates --- pydis_site/templates/events/pages/code-jams/9/_index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pydis_site/templates') diff --git a/pydis_site/templates/events/pages/code-jams/9/_index.html b/pydis_site/templates/events/pages/code-jams/9/_index.html index ec4af573..7c57b799 100644 --- a/pydis_site/templates/events/pages/code-jams/9/_index.html +++ b/pydis_site/templates/events/pages/code-jams/9/_index.html @@ -22,8 +22,8 @@

    Important Dates

      -
    • Saturday, June 18 - Form to submit theme suggestions opens
    • -
    • Wednesday, June 29 - The Qualifier is released
    • +
    • Saturday, June 18 - Form to submit theme suggestions opens
    • +
    • Wednesday, June 29 - The Qualifier is released
    • Wednesday, July 6 - Voting for the theme opens
    • Wednesday, July 13 - The Qualifier closes
    • Thursday, July 21 - Code Jam Begins
    • -- cgit v1.2.3 From 9792dbcf8ac13785b20b60fbf3d89a30c4d13fa4 Mon Sep 17 00:00:00 2001 From: Bluenix Date: Thu, 30 Jun 2022 00:09:54 +0200 Subject: Add ASGI specification to list of approved CJ9 frameworks --- pydis_site/templates/events/pages/code-jams/9/frameworks.html | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'pydis_site/templates') diff --git a/pydis_site/templates/events/pages/code-jams/9/frameworks.html b/pydis_site/templates/events/pages/code-jams/9/frameworks.html index 36a6604c..63593ce4 100644 --- a/pydis_site/templates/events/pages/code-jams/9/frameworks.html +++ b/pydis_site/templates/events/pages/code-jams/9/frameworks.html @@ -87,6 +87,14 @@
    +
    +
    +
    +

    ASGI

    +

    ASGI is the specification your favourite frameworks are built on. This is not a framework in of itself, but listed here for completeness.

    +
    +
    +
    -- cgit v1.2.3 From 05cbea4a822d78d1b61caeaa5cf2dc47c85e819e Mon Sep 17 00:00:00 2001 From: Bluenix Date: Thu, 30 Jun 2022 00:18:57 +0200 Subject: Add ASGI-card footer with link to specification --- pydis_site/templates/events/pages/code-jams/9/frameworks.html | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pydis_site/templates') diff --git a/pydis_site/templates/events/pages/code-jams/9/frameworks.html b/pydis_site/templates/events/pages/code-jams/9/frameworks.html index 63593ce4..7e5f4050 100644 --- a/pydis_site/templates/events/pages/code-jams/9/frameworks.html +++ b/pydis_site/templates/events/pages/code-jams/9/frameworks.html @@ -94,6 +94,10 @@

    ASGI is the specification your favourite frameworks are built on. This is not a framework in of itself, but listed here for completeness.

    + +
    -- cgit v1.2.3 From 1edf8686e00f8a3f81790da6e17717ec2816fe78 Mon Sep 17 00:00:00 2001 From: Bluenix Date: Thu, 30 Jun 2022 00:19:28 +0200 Subject: Remove italics from CJ9 framework cards --- .../templates/events/pages/code-jams/9/frameworks.html | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'pydis_site/templates') diff --git a/pydis_site/templates/events/pages/code-jams/9/frameworks.html b/pydis_site/templates/events/pages/code-jams/9/frameworks.html index 7e5f4050..67e57072 100644 --- a/pydis_site/templates/events/pages/code-jams/9/frameworks.html +++ b/pydis_site/templates/events/pages/code-jams/9/frameworks.html @@ -21,8 +21,7 @@

    FastAPI

    -

    FastAPI is a modern web framework great for WebSockets based on standard Python type hints which provides great editor support. -

    +

    FastAPI is a modern web framework great for WebSockets based on standard Python type hints which provides great editor support.

    -- cgit v1.2.3 From e5ed03d810048742901892922bc413c8ff86c85a Mon Sep 17 00:00:00 2001 From: Bluenix Date: Thu, 30 Jun 2022 00:23:40 +0200 Subject: Fix missing space after FastAPI link card --- pydis_site/templates/events/pages/code-jams/9/frameworks.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pydis_site/templates') diff --git a/pydis_site/templates/events/pages/code-jams/9/frameworks.html b/pydis_site/templates/events/pages/code-jams/9/frameworks.html index 1d0ccf11..916f249b 100644 --- a/pydis_site/templates/events/pages/code-jams/9/frameworks.html +++ b/pydis_site/templates/events/pages/code-jams/9/frameworks.html @@ -17,7 +17,7 @@ If there is a library not listed below that you think should be here, you're welcome to discuss it with the Events Team over at the server.

    -
    +

    FastAPI

    -- cgit v1.2.3 From a6ad20d9fdb133b605a6d2d6f6513f39a8c29356 Mon Sep 17 00:00:00 2001 From: Bluenix Date: Thu, 30 Jun 2022 00:42:53 +0200 Subject: Fix ASGI link class name --- pydis_site/templates/events/pages/code-jams/9/frameworks.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pydis_site/templates') diff --git a/pydis_site/templates/events/pages/code-jams/9/frameworks.html b/pydis_site/templates/events/pages/code-jams/9/frameworks.html index 916f249b..a154edc7 100644 --- a/pydis_site/templates/events/pages/code-jams/9/frameworks.html +++ b/pydis_site/templates/events/pages/code-jams/9/frameworks.html @@ -94,7 +94,7 @@
    -- cgit v1.2.3 From a2de9e9b5eec9efd6cce2578a6b2c3bb4b818e4a Mon Sep 17 00:00:00 2001 From: kosayoda Date: Wed, 29 Jun 2022 20:14:43 -0400 Subject: Update front page banner. --- pydis_site/templates/home/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pydis_site/templates') diff --git a/pydis_site/templates/home/index.html b/pydis_site/templates/home/index.html index fcbb87e4..cdbac830 100644 --- a/pydis_site/templates/home/index.html +++ b/pydis_site/templates/home/index.html @@ -12,7 +12,7 @@
    - Summer Code Jam 2022 + Summer Code Jam 2022
    @@ -48,7 +48,7 @@ {# Code Jam Banner #}
    -- cgit v1.2.3 From e264eb88f8e7931c83c0ca6843d6389a4e026e38 Mon Sep 17 00:00:00 2001 From: Bluenix Date: Thu, 30 Jun 2022 20:04:42 +0200 Subject: Fix missing "p" inside of element --- pydis_site/templates/events/pages/code-jams/9/frameworks.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pydis_site/templates') diff --git a/pydis_site/templates/events/pages/code-jams/9/frameworks.html b/pydis_site/templates/events/pages/code-jams/9/frameworks.html index a154edc7..91007197 100644 --- a/pydis_site/templates/events/pages/code-jams/9/frameworks.html +++ b/pydis_site/templates/events/pages/code-jams/9/frameworks.html @@ -62,7 +62,7 @@

    Django Channels

    - <>Django Channels adds WebSocket-support to Django - built on ASGI like other web frameworks. +

    Django Channels adds WebSocket-support to Django - built on ASGI like other web frameworks.

    -- cgit v1.2.3 From 79413d48fbf5542dd5aec9991239daccec07ef8f Mon Sep 17 00:00:00 2001 From: Bluenix Date: Fri, 1 Jul 2022 20:46:46 +0200 Subject: Move ASGI card item to bulma notification at the top --- .../events/pages/code-jams/9/frameworks.html | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'pydis_site/templates') diff --git a/pydis_site/templates/events/pages/code-jams/9/frameworks.html b/pydis_site/templates/events/pages/code-jams/9/frameworks.html index 91007197..6ea2acfc 100644 --- a/pydis_site/templates/events/pages/code-jams/9/frameworks.html +++ b/pydis_site/templates/events/pages/code-jams/9/frameworks.html @@ -17,6 +17,16 @@ If there is a library not listed below that you think should be here, you're welcome to discuss it with the Events Team over at the server.

    +
    +

    Most of the below frameworks implement what is called the ASGI Specification. + This specification documents how the frameworks should interact with ASGI servers and call the frameworks. + You are also allowed to work with the ASGI specification directly without a framework, if your team so chooses to. + Refer to the specification online. +

    +
    + +

    Approved Frameworks

    +
    @@ -86,18 +96,6 @@
    -
    -
    -
    -

    ASGI

    -

    ASGI is the specification your favourite frameworks are built on. This is not a framework in of itself, but listed here for completeness.

    -
    -
    - -
    -
    -- cgit v1.2.3 From 0e235abbcf121d9221a2a16a0cfd582331a63f57 Mon Sep 17 00:00:00 2001 From: Bluenix Date: Fri, 1 Jul 2022 23:07:35 +0200 Subject: Remove extra wording in ASGI explanation Co-authored-by: Kieran Siek --- pydis_site/templates/events/pages/code-jams/9/frameworks.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pydis_site/templates') diff --git a/pydis_site/templates/events/pages/code-jams/9/frameworks.html b/pydis_site/templates/events/pages/code-jams/9/frameworks.html index 6ea2acfc..cc171d54 100644 --- a/pydis_site/templates/events/pages/code-jams/9/frameworks.html +++ b/pydis_site/templates/events/pages/code-jams/9/frameworks.html @@ -19,7 +19,7 @@

    Most of the below frameworks implement what is called the ASGI Specification. - This specification documents how the frameworks should interact with ASGI servers and call the frameworks. + This specification documents how the frameworks should interact with ASGI servers. You are also allowed to work with the ASGI specification directly without a framework, if your team so chooses to. Refer to the specification online.

    -- cgit v1.2.3 From 9714f81fed18b3b9494b0dee08a859ed6bdbe756 Mon Sep 17 00:00:00 2001 From: mbaruh Date: Sun, 10 Jul 2022 17:12:31 +0300 Subject: Add starlite and sanic to cj9 frameworks --- .../events/pages/code-jams/9/frameworks.html | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'pydis_site/templates') diff --git a/pydis_site/templates/events/pages/code-jams/9/frameworks.html b/pydis_site/templates/events/pages/code-jams/9/frameworks.html index cc171d54..355bf9c3 100644 --- a/pydis_site/templates/events/pages/code-jams/9/frameworks.html +++ b/pydis_site/templates/events/pages/code-jams/9/frameworks.html @@ -110,6 +110,34 @@
    +
    +
    +
    +

    Starlite

    +

    Starlite is a light and flexible ASGI API framework, using Starlette and Pydantic as foundations. +

    +
    +
    + +
    + +
    +
    +
    +

    Sanic

    +

    Sanic is an ASGI compliant web framework designed for speed and simplicity. +

    +
    +
    + +
    + {% endblock %} -- cgit v1.2.3 From f6d7afceacf4a30630037777dcf7a4c719923e61 Mon Sep 17 00:00:00 2001 From: Bluenix Date: Thu, 14 Jul 2022 01:16:47 +0200 Subject: Remove `flask-socketio` from approved frameworks --- .../templates/events/pages/code-jams/9/frameworks.html | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'pydis_site/templates') diff --git a/pydis_site/templates/events/pages/code-jams/9/frameworks.html b/pydis_site/templates/events/pages/code-jams/9/frameworks.html index 355bf9c3..5bb48bc4 100644 --- a/pydis_site/templates/events/pages/code-jams/9/frameworks.html +++ b/pydis_site/templates/events/pages/code-jams/9/frameworks.html @@ -82,20 +82,6 @@
    -
    -
    -
    -

    Flask-SocketIO

    -

    Flask-SocketIO gives Flask applications access to low latency bi-directional communications between the clients and the server. -

    -
    -
    - -
    -
    -- cgit v1.2.3 From bb29def3418df6f6c9b2d0ad9c428fcac05d0d15 Mon Sep 17 00:00:00 2001 From: Bluenix Date: Thu, 14 Jul 2022 01:54:40 +0200 Subject: Move Starlite and Sanic above wsproto --- .../events/pages/code-jams/9/frameworks.html | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'pydis_site/templates') diff --git a/pydis_site/templates/events/pages/code-jams/9/frameworks.html b/pydis_site/templates/events/pages/code-jams/9/frameworks.html index 5bb48bc4..6efe511a 100644 --- a/pydis_site/templates/events/pages/code-jams/9/frameworks.html +++ b/pydis_site/templates/events/pages/code-jams/9/frameworks.html @@ -85,42 +85,42 @@
    -

    wsproto

    -

    wsproto is a pure-Python WebSocket protocol stack written to be as flexible as possible by having the user build the bridge to the I/O. +

    Starlite

    +

    Starlite is a light and flexible ASGI API framework, using Starlette and Pydantic as foundations.

    -

    Starlite

    -

    Starlite is a light and flexible ASGI API framework, using Starlette and Pydantic as foundations. +

    Sanic

    +

    Sanic is an ASGI compliant web framework designed for speed and simplicity.

    -

    Sanic

    -

    Sanic is an ASGI compliant web framework designed for speed and simplicity. +

    wsproto

    +

    wsproto is a pure-Python WebSocket protocol stack written to be as flexible as possible by having the user build the bridge to the I/O.

    -- cgit v1.2.3 From 8d20f8403d1067fc208a520b585360e9b298d13e Mon Sep 17 00:00:00 2001 From: Bluenix Date: Thu, 14 Jul 2022 01:57:40 +0200 Subject: Add `aiohttp` to approved frameworks --- .../templates/events/pages/code-jams/9/frameworks.html | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'pydis_site/templates') diff --git a/pydis_site/templates/events/pages/code-jams/9/frameworks.html b/pydis_site/templates/events/pages/code-jams/9/frameworks.html index 6efe511a..57071463 100644 --- a/pydis_site/templates/events/pages/code-jams/9/frameworks.html +++ b/pydis_site/templates/events/pages/code-jams/9/frameworks.html @@ -68,6 +68,20 @@
    +
    +
    +
    +

    AioHTTP

    +

    AioHTTP provides both a client and server WebSocket implementation, while avoiding callback-hell. +

    +
    +
    + +
    +
    -- cgit v1.2.3 From 2d8520a0f3211e3d788d431287359b496782c962 Mon Sep 17 00:00:00 2001 From: Bluenix Date: Thu, 14 Jul 2022 02:46:03 +0200 Subject: Add rule about forced usage of WebSockets --- pydis_site/templates/events/pages/code-jams/9/rules.html | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'pydis_site/templates') diff --git a/pydis_site/templates/events/pages/code-jams/9/rules.html b/pydis_site/templates/events/pages/code-jams/9/rules.html index 72c0372e..a88c795a 100644 --- a/pydis_site/templates/events/pages/code-jams/9/rules.html +++ b/pydis_site/templates/events/pages/code-jams/9/rules.html @@ -12,6 +12,15 @@ {% block event_content %}
    1. Your solution must use one of the approved frameworks (a list will be released soon). It is not permitted to circumvent this rule by e.g. using the approved framework as a wrapper for another framework.

    2. +
    3. +

      Your solution must only communicate through WebSockets. Any communication between the client and server (or any two server workers), must utilize WebSockets.

      + +

      + Exceptions to this rule are made for resources such as databases and files, albeit excluding usage other than for storage. + For example, you may use PostgreSQL as a database but not its `NOTIFY` command. + Lastly, working with subprocesses (through stdin/stdout or multiprocessing.Pool()/concurrent.futures.ProcessPoolExecutor()() is also exempted from this rule. +

      +
    4. Your solution should be platform agnostic. For example, if you use filepaths in your submission, use pathlib to create platform agnostic Path objects instead of hardcoding the paths.

    5. -- cgit v1.2.3 From 2d353e93715205d3365730dcc1ae59f61beba87d Mon Sep 17 00:00:00 2001 From: Bluenix Date: Thu, 14 Jul 2022 03:44:39 +0200 Subject: De-capitalize aiohttp in codejam frameworks Co-authored-by: Numerlor <25886452+Numerlor@users.noreply.github.com> --- pydis_site/templates/events/pages/code-jams/9/frameworks.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pydis_site/templates') diff --git a/pydis_site/templates/events/pages/code-jams/9/frameworks.html b/pydis_site/templates/events/pages/code-jams/9/frameworks.html index 57071463..b462c733 100644 --- a/pydis_site/templates/events/pages/code-jams/9/frameworks.html +++ b/pydis_site/templates/events/pages/code-jams/9/frameworks.html @@ -71,8 +71,8 @@

      -

      AioHTTP

      -

      AioHTTP provides both a client and server WebSocket implementation, while avoiding callback-hell. +

      aiohttp

      +

      aiohttp provides both a client and server WebSocket implementation, while avoiding callback-hell.

      -- cgit v1.2.3 From 675843ea18799da30ca9b01647b55ae2fa7b5ede Mon Sep 17 00:00:00 2001 From: Bluenix Date: Thu, 14 Jul 2022 04:14:21 +0200 Subject: Strike over passed dates in codejam information --- pydis_site/templates/events/pages/code-jams/9/_index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pydis_site/templates') diff --git a/pydis_site/templates/events/pages/code-jams/9/_index.html b/pydis_site/templates/events/pages/code-jams/9/_index.html index 7c57b799..f8d6e88b 100644 --- a/pydis_site/templates/events/pages/code-jams/9/_index.html +++ b/pydis_site/templates/events/pages/code-jams/9/_index.html @@ -24,8 +24,8 @@
      • Saturday, June 18 - Form to submit theme suggestions opens
      • Wednesday, June 29 - The Qualifier is released
      • -
      • Wednesday, July 6 - Voting for the theme opens
      • -
      • Wednesday, July 13 - The Qualifier closes
      • +
      • Wednesday, July 6 - Voting for the theme opens
      • +
      • Wednesday, July 13 - The Qualifier closes
      • Thursday, July 21 - Code Jam Begins
      • Sunday, July 31 - Coding portion of the jam ends
      • Sunday, August 4 - Code Jam submissions are closed
      • -- cgit v1.2.3 From 0df412364e619b44e1a266b8e372c57fcc8f93ed Mon Sep 17 00:00:00 2001 From: Bluenix Date: Thu, 14 Jul 2022 04:15:05 +0200 Subject: Remove notification about open codejam qualifier --- pydis_site/templates/events/index.html | 3 --- pydis_site/templates/events/pages/code-jams/_index.html | 6 ------ 2 files changed, 9 deletions(-) (limited to 'pydis_site/templates') diff --git a/pydis_site/templates/events/index.html b/pydis_site/templates/events/index.html index db3e32f7..796a2e34 100644 --- a/pydis_site/templates/events/index.html +++ b/pydis_site/templates/events/index.html @@ -9,9 +9,6 @@ {% block event_content %}

        Code Jams

        -
        - The 2022 Summer Code Jam is currently underway and you can still enter! The qualifier is open until July 13; check out the details here. -

        Every year we hold a community-wide Summer Code Jam. For this event, members of our community are assigned to teams to collaborate and create something amazing using a technology we picked for them. One such technology that was picked for the Summer 2021 Code Jam was text user interfaces (TUIs), where teams could pick from a pre-approved list of frameworks.

        To help fuel the creative process, we provide a specific theme, like Think Inside the Box or Early Internet. At the end of the Code Jam, the projects are judged by Python Discord server staff members and guest judges from the larger Python community. The judges will consider creativity, code quality, teamwork, and adherence to the theme.

        If you want to read more about Code Jams, visit our Code Jam info page or watch this video showcasing the best projects created during the Winter Code Jam 2020: Ancient Technology:

        diff --git a/pydis_site/templates/events/pages/code-jams/_index.html b/pydis_site/templates/events/pages/code-jams/_index.html index 74efcfaa..c7975679 100644 --- a/pydis_site/templates/events/pages/code-jams/_index.html +++ b/pydis_site/templates/events/pages/code-jams/_index.html @@ -8,12 +8,6 @@ {% block title %}Code Jams{% endblock %} {% block event_content %} -
        -
        - The 2022 Summer Code Jam is currently underway and you can still enter! The qualifier is open until July 13; check out the details here. -
        -
        -

        If you've been around the server for a while, or you just happened to join at the right time, you may have heard of something known as a Code Jam. -- cgit v1.2.3 From da38a0cf766e8e9f77d93b8cbda958306b7b980b Mon Sep 17 00:00:00 2001 From: Bluenix Date: Thu, 14 Jul 2022 18:20:52 +0200 Subject: Update site banner for codejam --- pydis_site/templates/home/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pydis_site/templates') diff --git a/pydis_site/templates/home/index.html b/pydis_site/templates/home/index.html index cdbac830..cf6ff8cd 100644 --- a/pydis_site/templates/home/index.html +++ b/pydis_site/templates/home/index.html @@ -12,7 +12,7 @@

        - Summer Code Jam 2022 + Summer Code Jam 2022
        @@ -48,7 +48,7 @@ {# Code Jam Banner #}
        -- cgit v1.2.3 From e8390858bc8a76dcc3b2c46da02a37860a1dfa84 Mon Sep 17 00:00:00 2001 From: Bluenix Date: Thu, 14 Jul 2022 19:20:28 +0200 Subject: Remove accidental stray parenthesis in new codejam rule Co-authored-by: Kieran Siek --- pydis_site/templates/events/pages/code-jams/9/rules.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pydis_site/templates') diff --git a/pydis_site/templates/events/pages/code-jams/9/rules.html b/pydis_site/templates/events/pages/code-jams/9/rules.html index a88c795a..e7a85c70 100644 --- a/pydis_site/templates/events/pages/code-jams/9/rules.html +++ b/pydis_site/templates/events/pages/code-jams/9/rules.html @@ -18,7 +18,7 @@

        Exceptions to this rule are made for resources such as databases and files, albeit excluding usage other than for storage. For example, you may use PostgreSQL as a database but not its `NOTIFY` command. - Lastly, working with subprocesses (through stdin/stdout or multiprocessing.Pool()/concurrent.futures.ProcessPoolExecutor()() is also exempted from this rule. + Lastly, working with subprocesses (through stdin/stdout or multiprocessing.Pool()/concurrent.futures.ProcessPoolExecutor()) is also exempted from this rule.

      • Your solution should be platform agnostic. For example, if you use filepaths in your submission, use pathlib to create platform agnostic Path objects instead of hardcoding the paths.

      • -- cgit v1.2.3 From 974c554da608c0e6c98fbee4beb153b305819c00 Mon Sep 17 00:00:00 2001 From: Bluenix Date: Fri, 15 Jul 2022 01:26:07 +0200 Subject: Reword new codejam rule exception clause Co-authored-by: wookie184 --- pydis_site/templates/events/pages/code-jams/9/rules.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pydis_site/templates') diff --git a/pydis_site/templates/events/pages/code-jams/9/rules.html b/pydis_site/templates/events/pages/code-jams/9/rules.html index e7a85c70..cabdd8f4 100644 --- a/pydis_site/templates/events/pages/code-jams/9/rules.html +++ b/pydis_site/templates/events/pages/code-jams/9/rules.html @@ -16,9 +16,9 @@

        Your solution must only communicate through WebSockets. Any communication between the client and server (or any two server workers), must utilize WebSockets.

        - Exceptions to this rule are made for resources such as databases and files, albeit excluding usage other than for storage. + An exception to this rule is that communication with databases and files is allowed for accessing resources or for storage purposes. For example, you may use PostgreSQL as a database but not its `NOTIFY` command. - Lastly, working with subprocesses (through stdin/stdout or multiprocessing.Pool()/concurrent.futures.ProcessPoolExecutor()) is also exempted from this rule. + Working with subprocesses (through stdin/stdout or multiprocessing.Pool()/concurrent.futures.ProcessPoolExecutor()) is also allowed.

      • Your solution should be platform agnostic. For example, if you use filepaths in your submission, use pathlib to create platform agnostic Path objects instead of hardcoding the paths.

      • -- cgit v1.2.3 From 0d86b4035fbd5ec65620e7680189828971155edb Mon Sep 17 00:00:00 2001 From: Bluenix Date: Fri, 15 Jul 2022 01:31:29 +0200 Subject: Add note about approval for non-WebSocket communication --- pydis_site/templates/events/pages/code-jams/9/rules.html | 2 ++ 1 file changed, 2 insertions(+) (limited to 'pydis_site/templates') diff --git a/pydis_site/templates/events/pages/code-jams/9/rules.html b/pydis_site/templates/events/pages/code-jams/9/rules.html index cabdd8f4..263e84e1 100644 --- a/pydis_site/templates/events/pages/code-jams/9/rules.html +++ b/pydis_site/templates/events/pages/code-jams/9/rules.html @@ -20,6 +20,8 @@ For example, you may use PostgreSQL as a database but not its `NOTIFY` command. Working with subprocesses (through stdin/stdout or multiprocessing.Pool()/concurrent.futures.ProcessPoolExecutor()) is also allowed.

        + +

        If you're interested in utilizing a particular non-WebSocket method of communication, reach out to the Events Team for discussion and approval

      • Your solution should be platform agnostic. For example, if you use filepaths in your submission, use pathlib to create platform agnostic Path objects instead of hardcoding the paths.

      • -- cgit v1.2.3 From 5ad1c2f5e8a5352eebdbb4da996506cbeb0dfc0b Mon Sep 17 00:00:00 2001 From: Bluenix Date: Fri, 15 Jul 2022 02:43:24 +0200 Subject: Remove trailing space in codejam rules --- pydis_site/templates/events/pages/code-jams/9/rules.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pydis_site/templates') diff --git a/pydis_site/templates/events/pages/code-jams/9/rules.html b/pydis_site/templates/events/pages/code-jams/9/rules.html index 263e84e1..5ad75d67 100644 --- a/pydis_site/templates/events/pages/code-jams/9/rules.html +++ b/pydis_site/templates/events/pages/code-jams/9/rules.html @@ -16,7 +16,7 @@

        Your solution must only communicate through WebSockets. Any communication between the client and server (or any two server workers), must utilize WebSockets.

        - An exception to this rule is that communication with databases and files is allowed for accessing resources or for storage purposes. + An exception to this rule is that communication with databases and files is allowed for accessing resources or for storage purposes. For example, you may use PostgreSQL as a database but not its `NOTIFY` command. Working with subprocesses (through stdin/stdout or multiprocessing.Pool()/concurrent.futures.ProcessPoolExecutor()) is also allowed.

        -- cgit v1.2.3 From 1a47cc9390bc08f033f677fd1238f5ef437d7071 Mon Sep 17 00:00:00 2001 From: Bluenix Date: Sun, 17 Jul 2022 18:28:25 +0200 Subject: Copy over qualifier description from codejam 8 --- .../templates/events/pages/code-jams/9/_index.html | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'pydis_site/templates') diff --git a/pydis_site/templates/events/pages/code-jams/9/_index.html b/pydis_site/templates/events/pages/code-jams/9/_index.html index f8d6e88b..8624bfbb 100644 --- a/pydis_site/templates/events/pages/code-jams/9/_index.html +++ b/pydis_site/templates/events/pages/code-jams/9/_index.html @@ -30,12 +30,22 @@
      • Sunday, July 31 - Coding portion of the jam ends
      • Sunday, August 4 - Code Jam submissions are closed
      -

      How to Join

      + +

      The Qualifier

      +

      + The qualifier is a coding challenge that you are required to complete before registering for the code jam. + This is meant as a basic assessment of your skills to ensure you have enough python knowledge to effectively contribute in a team environment. +

      +

      View the Qualifier

      - Before being able to join the code jam, you must complete a qualifier which tests your knowledge in Python. - The qualifier can be found on our GitHub - and once completed you should submit your solution using the sign-up form. + Please note the requirements for the qualifier. +

        +
      • The qualifier must be completed using Python 3.10
      • +
      • No external modules are allowed, only those available through the standard library.
      • +
      • The Qualifier must be submitted through the Code Jam sign-up form.
      • +

      +

      Technology

      The chosen technology/tech stack for this year is WebSockets. -- cgit v1.2.3 From 473c96a8353e5bea5a639657fac8058d8f44033a Mon Sep 17 00:00:00 2001 From: mina <75038675+minalike@users.noreply.github.com> Date: Tue, 19 Jul 2022 01:01:44 -0400 Subject: Add back green box link to CJ 9 page This was the easiest way of navigating to the CJ9 page previously other than the home page. Let's keep it for the duration of the jam --- pydis_site/templates/events/index.html | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pydis_site/templates') diff --git a/pydis_site/templates/events/index.html b/pydis_site/templates/events/index.html index 796a2e34..640682d0 100644 --- a/pydis_site/templates/events/index.html +++ b/pydis_site/templates/events/index.html @@ -9,6 +9,9 @@ {% block event_content %}

      Code Jams

      +

      Every year we hold a community-wide Summer Code Jam. For this event, members of our community are assigned to teams to collaborate and create something amazing using a technology we picked for them. One such technology that was picked for the Summer 2021 Code Jam was text user interfaces (TUIs), where teams could pick from a pre-approved list of frameworks.

      To help fuel the creative process, we provide a specific theme, like Think Inside the Box or Early Internet. At the end of the Code Jam, the projects are judged by Python Discord server staff members and guest judges from the larger Python community. The judges will consider creativity, code quality, teamwork, and adherence to the theme.

      If you want to read more about Code Jams, visit our Code Jam info page or watch this video showcasing the best projects created during the Winter Code Jam 2020: Ancient Technology:

      -- cgit v1.2.3 From 6a1ab5b856200afc4d98703b07a5aceb74051c1c Mon Sep 17 00:00:00 2001 From: mina <75038675+minalike@users.noreply.github.com> Date: Tue, 19 Jul 2022 01:03:19 -0400 Subject: Add CJ9 page link to side bar Technically it's an ongoing jam, not a previous jam. But I think adding this link will help with discoverability if you're already on the CJ Info page. Can be updated once a theme is announced --- pydis_site/templates/events/sidebar/code-jams/previous-code-jams.html | 1 + 1 file changed, 1 insertion(+) (limited to 'pydis_site/templates') diff --git a/pydis_site/templates/events/sidebar/code-jams/previous-code-jams.html b/pydis_site/templates/events/sidebar/code-jams/previous-code-jams.html index 21b2ccb4..4493ed43 100644 --- a/pydis_site/templates/events/sidebar/code-jams/previous-code-jams.html +++ b/pydis_site/templates/events/sidebar/code-jams/previous-code-jams.html @@ -1,6 +1,7 @@
      -- cgit v1.2.3 From fadda91a5e1733751cc1f68973803d931f2b189f Mon Sep 17 00:00:00 2001 From: Bluenix Date: Thu, 21 Jul 2022 23:56:15 +0200 Subject: Update codejams sidebar about cj9 theme announcement --- pydis_site/templates/events/sidebar/code-jams/previous-code-jams.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pydis_site/templates') diff --git a/pydis_site/templates/events/sidebar/code-jams/previous-code-jams.html b/pydis_site/templates/events/sidebar/code-jams/previous-code-jams.html index 4493ed43..28412c53 100644 --- a/pydis_site/templates/events/sidebar/code-jams/previous-code-jams.html +++ b/pydis_site/templates/events/sidebar/code-jams/previous-code-jams.html @@ -1,7 +1,7 @@
      {% endblock %} - -{% block page_content %} - {{ block.super }} -{% endblock %} -- cgit v1.2.3 From c5e03fbb8f7a4ebc2f75ce9f8099ba9ef1366f1e Mon Sep 17 00:00:00 2001 From: Ibrahim Date: Tue, 16 Aug 2022 20:13:21 +0530 Subject: striked passed date --- pydis_site/templates/events/pages/code-jams/9/_index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pydis_site/templates') diff --git a/pydis_site/templates/events/pages/code-jams/9/_index.html b/pydis_site/templates/events/pages/code-jams/9/_index.html index 7c2617d7..ca7c4f90 100644 --- a/pydis_site/templates/events/pages/code-jams/9/_index.html +++ b/pydis_site/templates/events/pages/code-jams/9/_index.html @@ -27,8 +27,8 @@
    6. Wednesday, July 6 - Voting for the theme opens
    7. Wednesday, July 13 - The Qualifier closes
    8. Thursday, July 21 - Code Jam Begins
    9. -
    10. Sunday, July 31 - Coding portion of the jam ends
    11. -
    12. Sunday, August 4 - Code Jam submissions are closed
    13. +
    14. Sunday, July 31 - Coding portion of the jam ends
    15. +
    16. Sunday, August 4 - Code Jam submissions are closed
    17. The Qualifier

      -- cgit v1.2.3 From 04babac2f281487adcddbf1e92d9d028896e086e Mon Sep 17 00:00:00 2001 From: Hassan Abouelela Date: Tue, 16 Aug 2022 21:21:59 +0400 Subject: Add Tag Metadata Uses the commit API to obtain tag metadata such as when it was last edited, and by whom. Signed-off-by: Hassan Abouelela --- .../apps/content/migrations/0001_add_tags.py | 5 +- pydis_site/apps/content/models/tag.py | 14 ++- pydis_site/apps/content/utils.py | 124 ++++++++++++++++++--- pydis_site/static/css/content/tag.css | 6 +- pydis_site/templates/content/tag.html | 22 +++- 5 files changed, 146 insertions(+), 25 deletions(-) (limited to 'pydis_site/templates') diff --git a/pydis_site/apps/content/migrations/0001_add_tags.py b/pydis_site/apps/content/migrations/0001_add_tags.py index 2e9d8c45..73525243 100644 --- a/pydis_site/apps/content/migrations/0001_add_tags.py +++ b/pydis_site/apps/content/migrations/0001_add_tags.py @@ -1,4 +1,4 @@ -# Generated by Django 4.0.6 on 2022-08-16 16:17 +# Generated by Django 4.0.6 on 2022-08-16 17:38 import django.db.models.deletion from django.db import migrations, models @@ -25,10 +25,11 @@ class Migration(migrations.Migration): name='Tag', fields=[ ('last_updated', models.DateTimeField(auto_now=True, help_text='The date and time this data was last fetched.')), + ('sha', models.CharField(help_text="The tag's hash, as calculated by GitHub.", max_length=40)), ('name', models.CharField(help_text="The tag's name.", max_length=50, primary_key=True, serialize=False)), ('group', models.CharField(help_text='The group the tag belongs to.', max_length=50, null=True)), ('body', models.TextField(help_text='The content of the tag.')), - ('last_commit', models.OneToOneField(help_text='The commit this file was last touched in.', null=True, on_delete=django.db.models.deletion.CASCADE, to='content.commit')), + ('last_commit', models.ForeignKey(help_text='The commit this file was last touched in.', null=True, on_delete=django.db.models.deletion.CASCADE, to='content.commit')), ], ), ] diff --git a/pydis_site/apps/content/models/tag.py b/pydis_site/apps/content/models/tag.py index 1c89fe1e..3c729768 100644 --- a/pydis_site/apps/content/models/tag.py +++ b/pydis_site/apps/content/models/tag.py @@ -1,3 +1,4 @@ +import collections.abc import json from django.db import models @@ -22,13 +23,10 @@ class Commit(models.Model): """The URL to the commit on GitHub.""" return self.URL_BASE + self.sha - @property - def format_users(self) -> str: + def format_users(self) -> collections.abc.Iterable[str]: """Return a nice representation of the user(s)' name and email.""" - authors = [] for author in json.loads(self.author): - authors.append(f"{author['name']} <{author['email']}>") - return ", ".join(authors) + yield f"{author['name']} <{author['email']}>" class Tag(models.Model): @@ -40,7 +38,11 @@ class Tag(models.Model): help_text="The date and time this data was last fetched.", auto_now=True, ) - last_commit = models.OneToOneField( + sha = models.CharField( + help_text="The tag's hash, as calculated by GitHub.", + max_length=40, + ) + last_commit = models.ForeignKey( Commit, help_text="The commit this file was last touched in.", null=True, diff --git a/pydis_site/apps/content/utils.py b/pydis_site/apps/content/utils.py index 11100ba5..7b078de6 100644 --- a/pydis_site/apps/content/utils.py +++ b/pydis_site/apps/content/utils.py @@ -1,5 +1,6 @@ import datetime import functools +import json import tarfile import tempfile import typing @@ -15,11 +16,26 @@ from django.utils import timezone from markdown.extensions.toc import TocExtension from pydis_site import settings -from .models import Tag +from .models import Commit, Tag TAG_CACHE_TTL = datetime.timedelta(hours=1) +def github_client(**kwargs) -> httpx.Client: + """Get a client to access the GitHub API with important settings pre-configured.""" + client = httpx.Client( + base_url=settings.GITHUB_API, + follow_redirects=True, + timeout=settings.TIMEOUT_PERIOD, + **kwargs + ) + if settings.GITHUB_TOKEN: # pragma: no cover + if not client.headers.get("Authorization"): + client.headers = {"Authorization": f"token {settings.GITHUB_TOKEN}"} + + return client + + def get_category(path: Path) -> dict[str, str]: """Load category information by name from _info.yml.""" if not path.is_dir(): @@ -60,19 +76,31 @@ def fetch_tags() -> list[Tag]: The entire repository is downloaded and extracted locally because getting file content would require one request per file, and can get rate-limited. """ - if settings.GITHUB_TOKEN: # pragma: no cover - headers = {"Authorization": f"token {settings.GITHUB_TOKEN}"} - else: - headers = {} + client = github_client() + + # Grab metadata + metadata = client.get("/repos/python-discord/bot/contents/bot/resources") + metadata.raise_for_status() + + hashes = {} + for entry in metadata.json(): + if entry["type"] == "dir": + # Tag group + files = client.get(entry["url"]) + files.raise_for_status() + files = files.json() + else: + files = [entry] - tar_file = httpx.get( - f"{settings.GITHUB_API}/repos/python-discord/bot/tarball", - follow_redirects=True, - timeout=settings.TIMEOUT_PERIOD, - headers=headers, - ) + for file in files: + hashes[file["name"]] = file["sha"] + + # Download the files + tar_file = client.get("/repos/python-discord/bot/tarball") tar_file.raise_for_status() + client.close() + tags = [] with tempfile.TemporaryDirectory() as folder: with tarfile.open(fileobj=BytesIO(tar_file.content)) as repo: @@ -83,20 +111,83 @@ def fetch_tags() -> list[Tag]: repo.extractall(folder, included) for tag_file in Path(folder).rglob("*.md"): + name = tag_file.name group = None if tag_file.parent.name != "tags": # Tags in sub-folders are considered part of a group group = tag_file.parent.name tags.append(Tag( - name=tag_file.name.removesuffix(".md"), + name=name.removesuffix(".md"), + sha=hashes[name], group=group, body=tag_file.read_text(encoding="utf-8"), + last_commit=None, )) return tags +def set_tag_commit(tag: Tag) -> Tag: + """Fetch commit information from the API, and save it for the tag.""" + path = "/bot/resources/tags" + if tag.group: + path += f"/{tag.group}" + path += f"/{tag.name}.md" + + # Fetch and set the commit + with github_client() as client: + data = client.get("/repos/python-discord/bot/commits", params={"path": path}) + data.raise_for_status() + data = data.json()[0] + + commit = data["commit"] + author, committer = commit["author"], commit["committer"] + + date = datetime.datetime.strptime(committer["date"], settings.GITHUB_TIMESTAMP_FORMAT) + date = date.replace(tzinfo=datetime.timezone.utc) + + if author["email"] == committer["email"]: + commit_author = [author] + else: + commit_author = [author, committer] + + commit_obj, _ = Commit.objects.get_or_create( + sha=data["sha"], + message=commit["message"], + date=date, + author=json.dumps(commit_author), + ) + tag.last_commit = commit_obj + tag.save() + + return tag + + +def record_tags(tags: list[Tag]) -> None: + """Sync the database with an updated set of tags.""" + # Remove entries which no longer exist + Tag.objects.exclude(name__in=[tag.name for tag in tags]).delete() + + # Insert/update the tags + for tag in tags: + try: + old_tag = Tag.objects.get(name=tag.name) + except Tag.DoesNotExist: + # The tag is not in the database yet, + # pretend it's previous state is the current state + old_tag = tag + + if old_tag.sha == tag.sha and old_tag.last_commit is not None: + # We still have an up-to-date commit entry + tag.last_commit = old_tag.last_commit + + tag.save() + + # Drop old, unused commits + Commit.objects.filter(tag__isnull=True).delete() + + def get_tags() -> list[Tag]: """Return a list of all tags visible to the application, from the cache or API.""" if settings.STATIC_BUILD: # pragma: no cover @@ -113,9 +204,7 @@ def get_tags() -> list[Tag]: tags = get_tags_static() else: tags = fetch_tags() - Tag.objects.exclude(name__in=[tag.name for tag in tags]).delete() - for tag in tags: - tag.save() + record_tags(tags) return tags else: @@ -127,6 +216,9 @@ def get_tag(path: str) -> typing.Union[Tag, list[Tag]]: """ Return a tag based on the search location. + If certain tag data is out of sync (for instance a commit date is missing), + an extra request will be made to sync the information. + The tag name and group must match. If only one argument is provided in the path, it's assumed to either be a group name, or a no-group tag name. @@ -142,6 +234,8 @@ def get_tag(path: str) -> typing.Union[Tag, list[Tag]]: matches = [] for tag in get_tags(): if tag.name == name and tag.group == group: + if tag.last_commit is None: + set_tag_commit(tag) return tag elif tag.group == name and group is None: matches.append(tag) diff --git a/pydis_site/static/css/content/tag.css b/pydis_site/static/css/content/tag.css index 32a605a8..79795f9e 100644 --- a/pydis_site/static/css/content/tag.css +++ b/pydis_site/static/css/content/tag.css @@ -5,5 +5,9 @@ } .content a *:hover { - color: black; + color: dimgray; +} + +span.update-time { + text-decoration: black underline dotted; } diff --git a/pydis_site/templates/content/tag.html b/pydis_site/templates/content/tag.html index 9bd65744..513009da 100644 --- a/pydis_site/templates/content/tag.html +++ b/pydis_site/templates/content/tag.html @@ -9,10 +9,30 @@ {% endblock %} {% block title_element %} -
      +
      {{ block.super }}
      + + {% endblock %} -- cgit v1.2.3 From 7c240c68e24c0f3bf041522ce21de271cb92c6f3 Mon Sep 17 00:00:00 2001 From: Hassan Abouelela Date: Tue, 16 Aug 2022 22:08:39 +0400 Subject: Better Split Up Tag Commit Messages Signed-off-by: Hassan Abouelela --- pydis_site/apps/content/models/tag.py | 5 +++++ pydis_site/templates/content/tag.html | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'pydis_site/templates') diff --git a/pydis_site/apps/content/models/tag.py b/pydis_site/apps/content/models/tag.py index 3c729768..c504ce21 100644 --- a/pydis_site/apps/content/models/tag.py +++ b/pydis_site/apps/content/models/tag.py @@ -23,6 +23,11 @@ class Commit(models.Model): """The URL to the commit on GitHub.""" return self.URL_BASE + self.sha + def lines(self) -> collections.abc.Iterable[str]: + """Return each line in the commit message.""" + for line in self.message.split("\n"): + yield line + def format_users(self) -> collections.abc.Iterable[str]: """Return a nice representation of the user(s)' name and email.""" for author in json.loads(self.author): diff --git a/pydis_site/templates/content/tag.html b/pydis_site/templates/content/tag.html index 513009da..655dd786 100644 --- a/pydis_site/templates/content/tag.html +++ b/pydis_site/templates/content/tag.html @@ -31,7 +31,9 @@ {% endfor %} - + {% for line in tag.last_commit.lines %} + + {% endfor %}
    -- cgit v1.2.3 From c0384c626121684ad4e354aeb817fdbd2741fc4f Mon Sep 17 00:00:00 2001 From: Hassan Abouelela Date: Tue, 23 Aug 2022 01:09:01 +0400 Subject: Improve Tag Commit Naming Signed-off-by: Hassan Abouelela --- pydis_site/apps/content/models/tag.py | 6 +++--- pydis_site/apps/content/urls.py | 2 +- pydis_site/templates/content/tag.html | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'pydis_site/templates') diff --git a/pydis_site/apps/content/models/tag.py b/pydis_site/apps/content/models/tag.py index c504ce21..73d6cb79 100644 --- a/pydis_site/apps/content/models/tag.py +++ b/pydis_site/apps/content/models/tag.py @@ -5,7 +5,7 @@ from django.db import models class Commit(models.Model): - """A git commit.""" + """A git commit from the Python Discord Bot project.""" URL_BASE = "https://github.com/python-discord/bot/commit/" @@ -28,8 +28,8 @@ class Commit(models.Model): for line in self.message.split("\n"): yield line - def format_users(self) -> collections.abc.Iterable[str]: - """Return a nice representation of the user(s)' name and email.""" + def format_authors(self) -> collections.abc.Iterable[str]: + """Return a nice representation of the author(s)' name and email.""" for author in json.loads(self.author): yield f"{author['name']} <{author['email']}>" diff --git a/pydis_site/apps/content/urls.py b/pydis_site/apps/content/urls.py index 03c0015a..163d05bc 100644 --- a/pydis_site/apps/content/urls.py +++ b/pydis_site/apps/content/urls.py @@ -63,5 +63,5 @@ urlpatterns = [ views.PageOrCategoryView.as_view(), name='page_category', distill_func=get_all_pages - ) + ), ] diff --git a/pydis_site/templates/content/tag.html b/pydis_site/templates/content/tag.html index 655dd786..fa9e44f5 100644 --- a/pydis_site/templates/content/tag.html +++ b/pydis_site/templates/content/tag.html @@ -27,7 +27,7 @@