From 5c37aee79c04d9199dc47b9d60f9899a0f6571d9 Mon Sep 17 00:00:00 2001 From: Leon Sandøy Date: Wed, 19 May 2021 09:02:21 +0200 Subject: Dramatically simplify resources. We don't need _category_info, we don't need subcategories, we this will be much simpler now. Also, rglob is nice. --- .../resources/communities/_category_info.yaml | 2 -- .../resources/courses/_category_info.yaml | 4 --- .../resources/interactive/_category_info.yaml | 4 --- .../resources/podcasts/_category_info.yaml | 4 --- .../resources/reading/_category_info.yaml | 2 -- .../resources/reading/books/_category_info.yaml | 5 --- .../reading/tutorials/_category_info.yaml | 5 --- .../resources/resources/tools/_category_info.yaml | 4 --- .../tools/accessibility/screen_readers.yaml | 7 ++++ .../resources/tools/accessibility/talon_voice.yaml | 6 ++++ .../tools/accessibility_tools/_category_info.yaml | 5 --- .../tools/accessibility_tools/screen_readers.yaml | 7 ---- .../tools/accessibility_tools/talon_voice.yaml | 6 ---- .../resources/tools/editors/_category_info.yaml | 5 --- .../resources/tools/ides/_category_info.yaml | 5 --- .../resources/resources/videos/_category_info.yaml | 2 -- pydis_site/apps/resources/tests/test_views.py | 13 +++----- .../testing_resources/testing/_category_info.yaml | 1 - .../testing/foobar/_category_info.yaml | 1 - pydis_site/apps/resources/urls.py | 2 +- pydis_site/apps/resources/utils.py | 37 ++++------------------ pydis_site/apps/resources/views/resources_list.py | 25 ++------------- 22 files changed, 27 insertions(+), 125 deletions(-) delete mode 100644 pydis_site/apps/resources/resources/communities/_category_info.yaml delete mode 100644 pydis_site/apps/resources/resources/courses/_category_info.yaml delete mode 100644 pydis_site/apps/resources/resources/interactive/_category_info.yaml delete mode 100644 pydis_site/apps/resources/resources/podcasts/_category_info.yaml delete mode 100644 pydis_site/apps/resources/resources/reading/_category_info.yaml delete mode 100644 pydis_site/apps/resources/resources/reading/books/_category_info.yaml delete mode 100644 pydis_site/apps/resources/resources/reading/tutorials/_category_info.yaml delete mode 100644 pydis_site/apps/resources/resources/tools/_category_info.yaml create mode 100644 pydis_site/apps/resources/resources/tools/accessibility/screen_readers.yaml create mode 100644 pydis_site/apps/resources/resources/tools/accessibility/talon_voice.yaml delete mode 100644 pydis_site/apps/resources/resources/tools/accessibility_tools/_category_info.yaml delete mode 100644 pydis_site/apps/resources/resources/tools/accessibility_tools/screen_readers.yaml delete mode 100644 pydis_site/apps/resources/resources/tools/accessibility_tools/talon_voice.yaml delete mode 100644 pydis_site/apps/resources/resources/tools/editors/_category_info.yaml delete mode 100644 pydis_site/apps/resources/resources/tools/ides/_category_info.yaml delete mode 100644 pydis_site/apps/resources/resources/videos/_category_info.yaml delete mode 100644 pydis_site/apps/resources/tests/testing_resources/testing/_category_info.yaml delete mode 100644 pydis_site/apps/resources/tests/testing_resources/testing/foobar/_category_info.yaml (limited to 'pydis_site/apps') diff --git a/pydis_site/apps/resources/resources/communities/_category_info.yaml b/pydis_site/apps/resources/resources/communities/_category_info.yaml deleted file mode 100644 index b9cb6533..00000000 --- a/pydis_site/apps/resources/resources/communities/_category_info.yaml +++ /dev/null @@ -1,2 +0,0 @@ -description: Partnered communities that share part of our mission. -name: Communities diff --git a/pydis_site/apps/resources/resources/courses/_category_info.yaml b/pydis_site/apps/resources/resources/courses/_category_info.yaml deleted file mode 100644 index 948b48de..00000000 --- a/pydis_site/apps/resources/resources/courses/_category_info.yaml +++ /dev/null @@ -1,4 +0,0 @@ -description: Listing of best Python courses. -name: Courses -default_icon: regular/graduation-cap -default_icon_color: black diff --git a/pydis_site/apps/resources/resources/interactive/_category_info.yaml b/pydis_site/apps/resources/resources/interactive/_category_info.yaml deleted file mode 100644 index 7e8f34d9..00000000 --- a/pydis_site/apps/resources/resources/interactive/_category_info.yaml +++ /dev/null @@ -1,4 +0,0 @@ -description: Learn Python with interactive courses, games, and programming challenges. -name: Interactive -default_icon: branding/python -default_icon_color: black diff --git a/pydis_site/apps/resources/resources/podcasts/_category_info.yaml b/pydis_site/apps/resources/resources/podcasts/_category_info.yaml deleted file mode 100644 index 1d2d3ba5..00000000 --- a/pydis_site/apps/resources/resources/podcasts/_category_info.yaml +++ /dev/null @@ -1,4 +0,0 @@ -description: Notable podcasts about the Python ecosystem. -name: Podcasts -default_icon: regular/microphone-alt -default_icon_color: black diff --git a/pydis_site/apps/resources/resources/reading/_category_info.yaml b/pydis_site/apps/resources/resources/reading/_category_info.yaml deleted file mode 100644 index 64b87e47..00000000 --- a/pydis_site/apps/resources/resources/reading/_category_info.yaml +++ /dev/null @@ -1,2 +0,0 @@ -description: Books and tutorials related to Python and popular third-party libraries and frameworks. -name: Reading diff --git a/pydis_site/apps/resources/resources/reading/books/_category_info.yaml b/pydis_site/apps/resources/resources/reading/books/_category_info.yaml deleted file mode 100644 index ae092a20..00000000 --- a/pydis_site/apps/resources/resources/reading/books/_category_info.yaml +++ /dev/null @@ -1,5 +0,0 @@ -description: The best books for learning Python or Python Frameworks. -name: Books -default_icon: branding/python -default_icon_color: black -position: 0 diff --git a/pydis_site/apps/resources/resources/reading/tutorials/_category_info.yaml b/pydis_site/apps/resources/resources/reading/tutorials/_category_info.yaml deleted file mode 100644 index a18b837d..00000000 --- a/pydis_site/apps/resources/resources/reading/tutorials/_category_info.yaml +++ /dev/null @@ -1,5 +0,0 @@ -description: Tutorials and references for those that are just getting started with Python. -name: Tutorials -default_icon: branding/python -default_icon_color: black -position: 1 diff --git a/pydis_site/apps/resources/resources/tools/_category_info.yaml b/pydis_site/apps/resources/resources/tools/_category_info.yaml deleted file mode 100644 index 6b16baa6..00000000 --- a/pydis_site/apps/resources/resources/tools/_category_info.yaml +++ /dev/null @@ -1,4 +0,0 @@ -description: This page is a curated list of tools that we regularly recommend in the community. - If you have a suggestion for something to add to this page, please create an issue in - our meta repo, and we'll consider adding it. -name: Tools diff --git a/pydis_site/apps/resources/resources/tools/accessibility/screen_readers.yaml b/pydis_site/apps/resources/resources/tools/accessibility/screen_readers.yaml new file mode 100644 index 00000000..39372956 --- /dev/null +++ b/pydis_site/apps/resources/resources/tools/accessibility/screen_readers.yaml @@ -0,0 +1,7 @@ +description: Screen readers are software programs that allow blind + or visually impaired users to read the text displayed on a computer screen with a speech synthesizer or braille display. + There are many different screen reader program options, + with this link describing many of them and their capabilities. +name: Screen Readers - American Foundation for the Blind +title_url: https://www.afb.org/blindness-and-low-vision/using-technology/assistive-technology-products/screen-readers +position: 1 diff --git a/pydis_site/apps/resources/resources/tools/accessibility/talon_voice.yaml b/pydis_site/apps/resources/resources/tools/accessibility/talon_voice.yaml new file mode 100644 index 00000000..9df5f66f --- /dev/null +++ b/pydis_site/apps/resources/resources/tools/accessibility/talon_voice.yaml @@ -0,0 +1,6 @@ +description: Talon is a tool being built that aims to bring programming, + realtime video gaming, command line, and full desktop computer proficiency to people + who have limited or no use of their hands. +name: Talon Voice +title_url: https://talonvoice.com/ +position: 0 diff --git a/pydis_site/apps/resources/resources/tools/accessibility_tools/_category_info.yaml b/pydis_site/apps/resources/resources/tools/accessibility_tools/_category_info.yaml deleted file mode 100644 index e770db07..00000000 --- a/pydis_site/apps/resources/resources/tools/accessibility_tools/_category_info.yaml +++ /dev/null @@ -1,5 +0,0 @@ -description: Accessibility tools that help people write Python code. -name: Accessibility Tools -default_icon: branding/python -default_icon_color: black -position: 2 diff --git a/pydis_site/apps/resources/resources/tools/accessibility_tools/screen_readers.yaml b/pydis_site/apps/resources/resources/tools/accessibility_tools/screen_readers.yaml deleted file mode 100644 index 39372956..00000000 --- a/pydis_site/apps/resources/resources/tools/accessibility_tools/screen_readers.yaml +++ /dev/null @@ -1,7 +0,0 @@ -description: Screen readers are software programs that allow blind - or visually impaired users to read the text displayed on a computer screen with a speech synthesizer or braille display. - There are many different screen reader program options, - with this link describing many of them and their capabilities. -name: Screen Readers - American Foundation for the Blind -title_url: https://www.afb.org/blindness-and-low-vision/using-technology/assistive-technology-products/screen-readers -position: 1 diff --git a/pydis_site/apps/resources/resources/tools/accessibility_tools/talon_voice.yaml b/pydis_site/apps/resources/resources/tools/accessibility_tools/talon_voice.yaml deleted file mode 100644 index 9df5f66f..00000000 --- a/pydis_site/apps/resources/resources/tools/accessibility_tools/talon_voice.yaml +++ /dev/null @@ -1,6 +0,0 @@ -description: Talon is a tool being built that aims to bring programming, - realtime video gaming, command line, and full desktop computer proficiency to people - who have limited or no use of their hands. -name: Talon Voice -title_url: https://talonvoice.com/ -position: 0 diff --git a/pydis_site/apps/resources/resources/tools/editors/_category_info.yaml b/pydis_site/apps/resources/resources/tools/editors/_category_info.yaml deleted file mode 100644 index 3cdfff3a..00000000 --- a/pydis_site/apps/resources/resources/tools/editors/_category_info.yaml +++ /dev/null @@ -1,5 +0,0 @@ -description: Lightweight code editors supporting Python -name: Editors -default_icon: branding/python -default_icon_color: black -position: 1 diff --git a/pydis_site/apps/resources/resources/tools/ides/_category_info.yaml b/pydis_site/apps/resources/resources/tools/ides/_category_info.yaml deleted file mode 100644 index 614625a6..00000000 --- a/pydis_site/apps/resources/resources/tools/ides/_category_info.yaml +++ /dev/null @@ -1,5 +0,0 @@ -description: Fully-integrated development environments for serious Python work. -name: IDEs -default_icon: branding/python -default_icon_color: black -position: 0 diff --git a/pydis_site/apps/resources/resources/videos/_category_info.yaml b/pydis_site/apps/resources/resources/videos/_category_info.yaml deleted file mode 100644 index 8192e021..00000000 --- a/pydis_site/apps/resources/resources/videos/_category_info.yaml +++ /dev/null @@ -1,2 +0,0 @@ -description: Excellent Youtube channels with content related to Python. -name: Videos diff --git a/pydis_site/apps/resources/tests/test_views.py b/pydis_site/apps/resources/tests/test_views.py index 53685eef..568f4d13 100644 --- a/pydis_site/apps/resources/tests/test_views.py +++ b/pydis_site/apps/resources/tests/test_views.py @@ -19,16 +19,13 @@ class TestResourcesView(TestCase): class TestResourcesListView(TestCase): - @patch("pydis_site.apps.resources.views.resources_list.RESOURCES_PATH", TESTING_RESOURCES_PATH) def test_valid_resource_list_200(self): """Check does site return code 200 when visiting valid resource list.""" - url = reverse("resources:resources", ("testing",)) + url = reverse("resources:resources") response = self.client.get(url) self.assertEqual(response.status_code, 200) - @patch("pydis_site.apps.resources.views.resources_list.RESOURCES_PATH", TESTING_RESOURCES_PATH) - def test_invalid_resource_list_404(self): - """Check does site return code 404 when trying to visit invalid resource list.""" - url = reverse("resources:resources", ("invalid",)) - response = self.client.get(url) - self.assertEqual(response.status_code, 404) + @patch("pydis_site.apps.resources.utils.RESOURCES_PATH", TESTING_RESOURCES_PATH) + def test_filter_resource_list(self): + """TODO: Check that we can correctly filter resources with GET parameters.""" + pass diff --git a/pydis_site/apps/resources/tests/testing_resources/testing/_category_info.yaml b/pydis_site/apps/resources/tests/testing_resources/testing/_category_info.yaml deleted file mode 100644 index bae17ea3..00000000 --- a/pydis_site/apps/resources/tests/testing_resources/testing/_category_info.yaml +++ /dev/null @@ -1 +0,0 @@ -name: Testing diff --git a/pydis_site/apps/resources/tests/testing_resources/testing/foobar/_category_info.yaml b/pydis_site/apps/resources/tests/testing_resources/testing/foobar/_category_info.yaml deleted file mode 100644 index eaac32d9..00000000 --- a/pydis_site/apps/resources/tests/testing_resources/testing/foobar/_category_info.yaml +++ /dev/null @@ -1 +0,0 @@ -name: Foobar diff --git a/pydis_site/apps/resources/urls.py b/pydis_site/apps/resources/urls.py index 19142081..cd4f53e7 100644 --- a/pydis_site/apps/resources/urls.py +++ b/pydis_site/apps/resources/urls.py @@ -5,5 +5,5 @@ from pydis_site.apps.resources import views app_name = "resources" urlpatterns = [ path("", views.ResourcesView.as_view(), name="index"), - path("/", views.ResourcesListView.as_view(), name="resources") + path("list/", views.ResourcesListView.as_view(), name="resources") ] diff --git a/pydis_site/apps/resources/utils.py b/pydis_site/apps/resources/utils.py index 1855fc80..6e21e2ba 100644 --- a/pydis_site/apps/resources/utils.py +++ b/pydis_site/apps/resources/utils.py @@ -2,41 +2,16 @@ import typing as t from pathlib import Path import yaml +from django.conf import settings +RESOURCES_PATH = Path(settings.BASE_DIR, "pydis_site", "apps", "resources", "resources") -def get_resources(path: Path) -> t.List[t.Dict]: + +def get_resources() -> t.List[t.Dict]: """Loads resource YAMLs from provided path.""" resources = [] - for item in path.iterdir(): - if item.is_file() and item.suffix == ".yaml" and item.name != "_category_info.yaml": - resources.append(yaml.safe_load(item.read_text())) + for item in RESOURCES_PATH.rglob("*.yaml"): + resources.append(yaml.safe_load(item.read_text())) return resources - - -def get_subcategories(path: Path) -> t.List[t.Dict]: - """Loads resources subcategories with their resources by provided path.""" - subcategories = [] - - for item in path.iterdir(): - if item.is_dir() and item.joinpath("_category_info.yaml").exists(): - subcategories.append({ - "category_info": { - **yaml.safe_load( - item.joinpath("_category_info.yaml").read_text() - ), - "raw_name": item.name - }, - "resources": [ - yaml.safe_load(subitem.read_text()) - for subitem in item.iterdir() - if ( - subitem.is_file() - and subitem.suffix == ".yaml" - and subitem.name != "_category_info.yaml" - ) - ] - }) - - return subcategories diff --git a/pydis_site/apps/resources/views/resources_list.py b/pydis_site/apps/resources/views/resources_list.py index 55f22993..0ec74d78 100644 --- a/pydis_site/apps/resources/views/resources_list.py +++ b/pydis_site/apps/resources/views/resources_list.py @@ -1,14 +1,8 @@ -from pathlib import Path from typing import Any, Dict -import yaml -from django.conf import settings -from django.http import Http404 from django.views.generic import TemplateView -from pydis_site.apps.resources.utils import get_resources, get_subcategories - -RESOURCES_PATH = Path(settings.BASE_DIR, "pydis_site", "apps", "resources", "resources") +from pydis_site.apps.resources.utils import get_resources class ResourcesListView(TemplateView): @@ -19,21 +13,6 @@ class ResourcesListView(TemplateView): def get_context_data(self, **kwargs) -> Dict[str, Any]: """Add resources and subcategories data into context.""" context = super().get_context_data(**kwargs) - - resource_path = RESOURCES_PATH / self.kwargs["category"] - if ( - not resource_path.is_dir() - or not resource_path.joinpath("_category_info.yaml").exists() - ): - raise Http404 - - context["resources"] = get_resources(resource_path) - context["subcategories"] = get_subcategories(resource_path) - context["category_info"] = { - **yaml.safe_load( - resource_path.joinpath("_category_info.yaml").read_text() - ), - "raw_name": resource_path.name - } + context["resources"] = get_resources() return context -- cgit v1.2.3 From 3bd5c0c9f6438bde2c913a3820d4128b8faf5140 Mon Sep 17 00:00:00 2001 From: Leon Sandøy Date: Sun, 23 May 2021 10:40:45 +0200 Subject: Add tags to all the resources. Also updates all amazon links with GoodReads. --- .../resources/resources/communities/adafruit.yaml | 23 ++++++++++++++++------ .../communities/awesome_programming_discord.yaml | 8 ++++++++ .../apps/resources/resources/communities/kivy.yaml | 9 +++++++++ .../resources/resources/communities/microsoft.yaml | 8 ++++++++ .../resources/resources/communities/pallets.yaml | 8 ++++++++ .../resources/resources/communities/panda3d.yaml | 9 +++++++++ .../communities/people_postgres_data.yaml | 8 ++++++++ .../resources/resources/communities/pyglet.yaml | 9 +++++++++ .../resources/communities/python_subreddit.yaml | 14 +++++++++++++ .../resources/communities/real_python.yaml | 8 ++++++++ .../resources/resources/communities/rlbot.yaml | 13 ------------ .../resources/resources/communities/subreddit.yaml | 6 ------ .../automate_the_boring_stuff_with_python.yaml | 8 ++++++++ ...uction_to_computer_science_and_programming.yaml | 9 +++++++++ .../courses/practical_python_programming.yaml | 7 +++++++ .../resources/courses/university_of_michigan.yaml | 7 +++++++ .../resources/courses/university_of_toronto.yaml | 8 ++++++++ .../resources/interactive/code_combat.yaml | 9 +++++++++ .../resources/resources/interactive/edublocks.yaml | 7 +++++++ .../resources/resources/interactive/exercism.yaml | 8 ++++++++ .../resources/interactive/jetbrains_academy.yaml | 7 +++++++ .../resources/interactive/python_morsels.yaml | 7 +++++++ .../resources/interactive/python_tutor.yaml | 8 ++++++++ .../resources/resources/interactive/sololearn.yaml | 8 ++++++++ .../resources/podcasts/podcast_dunder_init.yaml | 8 ++++++++ .../resources/resources/podcasts/python_bytes.yaml | 8 ++++++++ .../resources/podcasts/talk_python_to_me.yaml | 8 ++++++++ .../resources/podcasts/test_and_code.yaml | 9 +++++++++ .../podcasts/the_real_python_podcast.yaml | 8 ++++++++ .../reading/books/automate_the_boring_stuff.yaml | 15 +++++++++++--- .../resources/reading/books/byte_of_python.yaml | 14 ++++++++++--- .../resources/reading/books/effective_python.yaml | 15 ++++++++++---- .../reading/books/flask_web_development.yaml | 14 ++++++++++--- .../resources/reading/books/fluent_python.yaml | 14 ++++++++++--- .../reading/books/hitchhikers_guide_to_python.yaml | 15 +++++++++++--- .../reading/books/inferential_thinking.yaml | 9 +++++++++ .../resources/reading/books/mission_python.yaml | 14 ++++++++++--- .../neural_networks_from_scratch_in_python.yaml | 11 +++++++++++ .../resources/reading/books/python_cookbook.yaml | 13 +++++++++--- .../reading/books/python_crash_course.yaml | 14 ++++++++++--- .../resources/reading/books/python_tricks.yaml | 15 +++++++++++--- .../resources/reading/books/think_python.yaml | 13 +++++++++--- .../reading/books/two_scoops_of_django.yaml | 17 +++++++++++----- .../tutorials/getting_started_with_kivy.yaml | 8 ++++++++ ...ng_started_with_python_for_non_programmers.yaml | 7 +++++++ ...etting_started_with_python_for_programmers.yaml | 7 +++++++ .../reading/tutorials/python_cheat_sheet.yaml | 7 +++++++ .../reading/tutorials/python_developer_guide.yaml | 8 ++++++++ .../reading/tutorials/simple_guide_to_git.yaml | 7 +++++++ .../reading/tutorials/the_flask_mega_tutorial.yaml | 8 ++++++++ .../resources/reading/tutorials/wtf_python.yaml | 9 +++++++++ .../tools/accessibility/screen_readers.yaml | 4 ++++ .../resources/tools/accessibility/talon_voice.yaml | 3 +++ .../resources/resources/tools/editors/atom.yaml | 3 +++ .../resources/tools/editors/google_collab.yaml | 5 +++++ .../resources/tools/editors/mu_editor.yaml | 10 ++++++++++ .../resources/tools/editors/sublime_text.yaml | 3 +++ .../tools/editors/visual_studio_code.yaml | 3 +++ .../resources/resources/tools/ides/pycharm.yaml | 4 ++++ .../resources/resources/tools/ides/repl_it.yaml | 5 +++++ .../resources/resources/tools/ides/spyder.yaml | 5 +++++ .../resources/resources/tools/ides/thonny.yaml | 5 +++++ .../resources/resources/videos/corey_schafer.yaml | 11 +++++++++++ .../apps/resources/resources/videos/jetbrains.yaml | 10 ++++++++++ .../resources/videos/jim_shaped_coding.yaml | 10 ++++++++++ .../apps/resources/resources/videos/microsoft.yaml | 7 +++++++ .../resources/resources/videos/python_discord.yaml | 9 +++++++++ .../apps/resources/resources/videos/sentdex.yaml | 11 +++++++++++ 68 files changed, 555 insertions(+), 64 deletions(-) create mode 100644 pydis_site/apps/resources/resources/communities/python_subreddit.yaml delete mode 100644 pydis_site/apps/resources/resources/communities/rlbot.yaml delete mode 100644 pydis_site/apps/resources/resources/communities/subreddit.yaml (limited to 'pydis_site/apps') diff --git a/pydis_site/apps/resources/resources/communities/adafruit.yaml b/pydis_site/apps/resources/resources/communities/adafruit.yaml index e5c81a6c..f226a20c 100644 --- a/pydis_site/apps/resources/resources/communities/adafruit.yaml +++ b/pydis_site/apps/resources/resources/communities/adafruit.yaml @@ -7,9 +7,20 @@ title_image: https://www.mouser.com/images/suppliers/logos/adafruit.png title_url: https://discord.gg/adafruit position: 4 urls: -- icon: branding/discord - url: https://discord.gg/adafruit - color: blurple -- icon: regular/link - url: https://adafruit.com/ - color: teal + - icon: branding/discord + url: https://discord.gg/adafruit + color: blurple + - icon: regular/link + url: https://adafruit.com/ + color: teal +tags: + topics: + - microcontrollers + - arduino + - circuitpython + - adafruit + payment_tiers: + - free + complexity: + - beginner + - intermediate diff --git a/pydis_site/apps/resources/resources/communities/awesome_programming_discord.yaml b/pydis_site/apps/resources/resources/communities/awesome_programming_discord.yaml index 335ac507..d3ebedb8 100644 --- a/pydis_site/apps/resources/resources/communities/awesome_programming_discord.yaml +++ b/pydis_site/apps/resources/resources/communities/awesome_programming_discord.yaml @@ -7,3 +7,11 @@ title_icon_color: black title_url: https://github.com/mhxion/awesome-programming-discord name: awesome-programming-discord position: 10 +tags: + topics: + - programming + payment_tiers: + - free + complexity: + - beginner + - intermediate diff --git a/pydis_site/apps/resources/resources/communities/kivy.yaml b/pydis_site/apps/resources/resources/communities/kivy.yaml index 601d7dba..641236b4 100644 --- a/pydis_site/apps/resources/resources/communities/kivy.yaml +++ b/pydis_site/apps/resources/resources/communities/kivy.yaml @@ -16,3 +16,12 @@ urls: - icon: branding/github url: https://github.com/kivy color: black +tags: + topics: + - user interface + - game development + payment_tiers: + - free + complexity: + - beginner + - intermediate diff --git a/pydis_site/apps/resources/resources/communities/microsoft.yaml b/pydis_site/apps/resources/resources/communities/microsoft.yaml index b36c3a85..3019fb9d 100644 --- a/pydis_site/apps/resources/resources/communities/microsoft.yaml +++ b/pydis_site/apps/resources/resources/communities/microsoft.yaml @@ -10,3 +10,11 @@ urls: - icon: regular/link url: https://www.microsoft.com/en-us/boards/pycon2020.aspx color: teal +tags: + topics: + - python + payment_tiers: + - free + complexity: + - beginner + - intermediate diff --git a/pydis_site/apps/resources/resources/communities/pallets.yaml b/pydis_site/apps/resources/resources/communities/pallets.yaml index 239b1491..4328b469 100644 --- a/pydis_site/apps/resources/resources/communities/pallets.yaml +++ b/pydis_site/apps/resources/resources/communities/pallets.yaml @@ -11,3 +11,11 @@ urls: - icon: regular/link url: https://www.palletsprojects.com/ color: teal +tags: + topics: + - web development + payment_tiers: + - free + complexity: + - beginner + - intermediate diff --git a/pydis_site/apps/resources/resources/communities/panda3d.yaml b/pydis_site/apps/resources/resources/communities/panda3d.yaml index 4235793d..8f1d0f9b 100644 --- a/pydis_site/apps/resources/resources/communities/panda3d.yaml +++ b/pydis_site/apps/resources/resources/communities/panda3d.yaml @@ -10,3 +10,12 @@ urls: - icon: regular/link url: https://www.panda3d.org/ color: teal +tags: + topics: + - user interface + - game development + payment_tiers: + - free + complexity: + - beginner + - intermediate diff --git a/pydis_site/apps/resources/resources/communities/people_postgres_data.yaml b/pydis_site/apps/resources/resources/communities/people_postgres_data.yaml index 1c17d343..cd13a18a 100644 --- a/pydis_site/apps/resources/resources/communities/people_postgres_data.yaml +++ b/pydis_site/apps/resources/resources/communities/people_postgres_data.yaml @@ -16,3 +16,11 @@ urls: - icon: branding/reddit url: https://reddit.com/r/postgresql color: orangered +tags: + topics: + - databases + payment_tiers: + - free + complexity: + - beginner + - intermediate diff --git a/pydis_site/apps/resources/resources/communities/pyglet.yaml b/pydis_site/apps/resources/resources/communities/pyglet.yaml index 784f514e..68cca2af 100644 --- a/pydis_site/apps/resources/resources/communities/pyglet.yaml +++ b/pydis_site/apps/resources/resources/communities/pyglet.yaml @@ -13,3 +13,12 @@ urls: - icon: regular/link url: http://pyglet.org/ color: teal +tags: + topics: + - user interface + - game development + payment_tiers: + - free + complexity: + - beginner + - intermediate diff --git a/pydis_site/apps/resources/resources/communities/python_subreddit.yaml b/pydis_site/apps/resources/resources/communities/python_subreddit.yaml new file mode 100644 index 00000000..b2176ff5 --- /dev/null +++ b/pydis_site/apps/resources/resources/communities/python_subreddit.yaml @@ -0,0 +1,14 @@ +description: News about the Python programming language, and language-related discussion. +name: r/Python +title_icon: branding/reddit +title_icon_color: orangered +title_url: https://www.reddit.com/r/Python/ +position: 0 +tags: + topics: + - python + payment_tiers: + - free + complexity: + - beginner + - intermediate diff --git a/pydis_site/apps/resources/resources/communities/real_python.yaml b/pydis_site/apps/resources/resources/communities/real_python.yaml index 1fc74d93..f1e71125 100644 --- a/pydis_site/apps/resources/resources/communities/real_python.yaml +++ b/pydis_site/apps/resources/resources/communities/real_python.yaml @@ -10,3 +10,11 @@ urls: - icon: branding/youtube url: https://www.youtube.com/channel/UCI0vQvr9aFn27yR6Ej6n5UA color: youtube-red +tags: + topics: + - python + payment_tiers: + - free + complexity: + - beginner + - intermediate diff --git a/pydis_site/apps/resources/resources/communities/rlbot.yaml b/pydis_site/apps/resources/resources/communities/rlbot.yaml deleted file mode 100644 index d12c1dec..00000000 --- a/pydis_site/apps/resources/resources/communities/rlbot.yaml +++ /dev/null @@ -1,13 +0,0 @@ -description: RLBot is a community of programmers making awesome Rocket League bots. - They've created a framework that you can use to write bots in a number of languages (including Python), - and they host regular tournaments where botmakers can pit their creations against each other. -title_image: https://i.imgur.com/S8L1muZ.png -title_url: https://discord.gg/4JJdJKb -position: 7 -urls: - - icon: branding/discord - url: https://discord.gg/4JJdJKb - color: blurple - - icon: regular/link - url: https://www.rlbot.org/ - color: teal diff --git a/pydis_site/apps/resources/resources/communities/subreddit.yaml b/pydis_site/apps/resources/resources/communities/subreddit.yaml deleted file mode 100644 index d3ddb15a..00000000 --- a/pydis_site/apps/resources/resources/communities/subreddit.yaml +++ /dev/null @@ -1,6 +0,0 @@ -description: News about the Python programming language, and language-related discussion. -name: r/Python -title_icon: branding/reddit -title_icon_color: orangered -title_url: https://www.reddit.com/r/Python/ -position: 0 diff --git a/pydis_site/apps/resources/resources/courses/automate_the_boring_stuff_with_python.yaml b/pydis_site/apps/resources/resources/courses/automate_the_boring_stuff_with_python.yaml index 66034ea2..52872d2c 100644 --- a/pydis_site/apps/resources/resources/courses/automate_the_boring_stuff_with_python.yaml +++ b/pydis_site/apps/resources/resources/courses/automate_the_boring_stuff_with_python.yaml @@ -3,3 +3,11 @@ description: The interactive course version of Al Sweigart's excellent book for name: Automate the Boring Stuff with Python title_url: https://www.udemy.com/automate/?couponCode=FOR_LIKE_10_BUCKS position: 3 +tags: + topics: + - python + - automation + payment_tiers: + - paid + complexity: + - beginner diff --git a/pydis_site/apps/resources/resources/courses/mit_introduction_to_computer_science_and_programming.yaml b/pydis_site/apps/resources/resources/courses/mit_introduction_to_computer_science_and_programming.yaml index 5560b2cb..3de01803 100644 --- a/pydis_site/apps/resources/resources/courses/mit_introduction_to_computer_science_and_programming.yaml +++ b/pydis_site/apps/resources/resources/courses/mit_introduction_to_computer_science_and_programming.yaml @@ -4,3 +4,12 @@ description: This MITx offering teaches computer science with Python. name: 'MIT: Introduction to Computer Science and Programming' title_url: https://www.edx.org/course/introduction-computer-science-mitx-6-00-1x-11 position: 1 +tags: + topics: + - python + - computer science + payment_tiers: + - free + - paid + complexity: + - beginner diff --git a/pydis_site/apps/resources/resources/courses/practical_python_programming.yaml b/pydis_site/apps/resources/resources/courses/practical_python_programming.yaml index b801ca8c..ded29ce1 100644 --- a/pydis_site/apps/resources/resources/courses/practical_python_programming.yaml +++ b/pydis_site/apps/resources/resources/courses/practical_python_programming.yaml @@ -7,3 +7,10 @@ description: Created and taught by David Beazley Date: Sun, 23 May 2021 10:43:13 +0200 Subject: Remove www from the URL for inferential thinking. The www subdomain gives an SSL error for an expired certificate, so we don't want to use that one. --- .../apps/resources/resources/reading/books/inferential_thinking.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pydis_site/apps') diff --git a/pydis_site/apps/resources/resources/reading/books/inferential_thinking.yaml b/pydis_site/apps/resources/resources/reading/books/inferential_thinking.yaml index f4983e56..f1ac2b3c 100644 --- a/pydis_site/apps/resources/resources/reading/books/inferential_thinking.yaml +++ b/pydis_site/apps/resources/resources/reading/books/inferential_thinking.yaml @@ -5,7 +5,7 @@ name: Inferential Thinking position: 13 urls: - icon: regular/link - url: https://www.inferentialthinking.com/chapters/intro + url: https://inferentialthinking.com/chapters/intro color: teal tags: topics: -- cgit v1.2.3 From 7c67ea311eebeb5273d02469295fa4218348e213 Mon Sep 17 00:00:00 2001 From: Leon Sandøy Date: Sun, 23 May 2021 10:51:55 +0200 Subject: Test boilerplate --- pydis_site/apps/resources/tests/test_resources.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 pydis_site/apps/resources/tests/test_resources.py (limited to 'pydis_site/apps') diff --git a/pydis_site/apps/resources/tests/test_resources.py b/pydis_site/apps/resources/tests/test_resources.py new file mode 100644 index 00000000..81638e2f --- /dev/null +++ b/pydis_site/apps/resources/tests/test_resources.py @@ -0,0 +1,9 @@ +from django.test import TestCase + + +class TestResources(TestCase): + """Test our resource filtering systems.""" + + def test_utils_to_retrieve_tags(self): + """Test that the utils that retrieve the tags work as intended.""" + pass -- cgit v1.2.3 From df7ca78d6958c99a39b50ea8c3c40de849fe71e0 Mon Sep 17 00:00:00 2001 From: swfarnsworth Date: Sat, 5 Jun 2021 11:56:54 -0400 Subject: Collapse resources into one directory, migrate to new tagging system. This commit fails the lint test from pipenv, though the main branch is on poetry now. --- pydis_site/apps/resources/resources/adafruit.yaml | 24 +++++++++++++++ pydis_site/apps/resources/resources/atom.yaml | 14 +++++++++ .../resources/automate_the_boring_stuff_book.yaml | 23 +++++++++++++++ .../automate_the_boring_stuff_course.yaml | 14 +++++++++ .../resources/awesome_programming_discord.yaml | 18 ++++++++++++ .../apps/resources/resources/byte_of_python.yaml | 24 +++++++++++++++ .../apps/resources/resources/code_combat.yaml | 22 ++++++++++++++ .../resources/resources/communities/adafruit.yaml | 26 ----------------- .../communities/awesome_programming_discord.yaml | 17 ----------- .../apps/resources/resources/communities/kivy.yaml | 27 ----------------- .../resources/resources/communities/microsoft.yaml | 20 ------------- .../resources/resources/communities/pallets.yaml | 21 ------------- .../resources/resources/communities/panda3d.yaml | 21 ------------- .../communities/people_postgres_data.yaml | 26 ----------------- .../resources/resources/communities/pyglet.yaml | 24 --------------- .../resources/communities/python_subreddit.yaml | 14 --------- .../resources/communities/real_python.yaml | 20 ------------- .../apps/resources/resources/corey_schafer.yaml | 31 ++++++++++++++++++++ .../automate_the_boring_stuff_with_python.yaml | 13 --------- ...uction_to_computer_science_and_programming.yaml | 15 ---------- .../courses/practical_python_programming.yaml | 16 ---------- .../resources/courses/university_of_michigan.yaml | 12 -------- .../resources/courses/university_of_toronto.yaml | 19 ------------ pydis_site/apps/resources/resources/edublocks.yaml | 18 ++++++++++++ .../apps/resources/resources/effective_python.yaml | 23 +++++++++++++++ pydis_site/apps/resources/resources/exercism.yaml | 22 ++++++++++++++ .../resources/resources/flask_web_development.yaml | 23 +++++++++++++++ .../apps/resources/resources/fluent_python.yaml | 23 +++++++++++++++ .../resources/getting_started_with_kivy.yaml | 14 +++++++++ ...ng_started_with_python_for_non_programmers.yaml | 13 +++++++++ ...etting_started_with_python_for_programmers.yaml | 14 +++++++++ .../apps/resources/resources/google_collab.yaml | 17 +++++++++++ .../resources/hitchhikers_guide_to_python.yaml | 20 +++++++++++++ .../resources/resources/inferential_thinking.yaml | 18 ++++++++++++ .../resources/interactive/code_combat.yaml | 20 ------------- .../resources/resources/interactive/edublocks.yaml | 17 ----------- .../resources/resources/interactive/exercism.yaml | 21 ------------- .../resources/interactive/jetbrains_academy.yaml | 15 ---------- .../resources/interactive/python_morsels.yaml | 17 ----------- .../resources/interactive/python_tutor.yaml | 12 -------- .../resources/resources/interactive/sololearn.yaml | 15 ---------- .../resources/resources/jetbrains_academy.yaml | 18 ++++++++++++ .../apps/resources/resources/jetbrains_videos.yaml | 23 +++++++++++++++ .../resources/resources/jim_shaped_coding.yaml | 24 +++++++++++++++ pydis_site/apps/resources/resources/kivy.yaml | 28 ++++++++++++++++++ pydis_site/apps/resources/resources/microsoft.yaml | 22 ++++++++++++++ .../apps/resources/resources/microsoft_videos.yaml | 26 +++++++++++++++++ .../apps/resources/resources/mission_python.yaml | 22 ++++++++++++++ ...uction_to_computer_science_and_programming.yaml | 16 ++++++++++ pydis_site/apps/resources/resources/mu_editor.yaml | 15 ++++++++++ .../neural_networks_from_scratch_in_python.yaml | 21 +++++++++++++ pydis_site/apps/resources/resources/pallets.yaml | 22 ++++++++++++++ pydis_site/apps/resources/resources/panda3d.yaml | 23 +++++++++++++++ .../resources/resources/people_postgres_data.yaml | 27 +++++++++++++++++ .../resources/resources/podcast_dunder_init.yaml | 14 +++++++++ .../resources/podcasts/podcast_dunder_init.yaml | 13 --------- .../resources/resources/podcasts/python_bytes.yaml | 13 --------- .../resources/podcasts/talk_python_to_me.yaml | 13 --------- .../resources/podcasts/test_and_code.yaml | 14 --------- .../podcasts/the_real_python_podcast.yaml | 15 ---------- .../resources/practical_python_programming.yaml | 18 ++++++++++++ pydis_site/apps/resources/resources/pycharm.yaml | 14 +++++++++ pydis_site/apps/resources/resources/pyglet.yaml | 25 ++++++++++++++++ .../apps/resources/resources/python_bytes.yaml | 15 ++++++++++ .../resources/resources/python_cheat_sheet.yaml | 13 +++++++++ .../apps/resources/resources/python_cookbook.yaml | 23 +++++++++++++++ .../resources/resources/python_crash_course.yaml | 29 ++++++++++++++++++ .../resources/python_developer_guide.yaml | 13 +++++++++ .../resources/resources/python_discord_videos.yaml | 19 ++++++++++++ .../apps/resources/resources/python_morsels.yaml | 19 ++++++++++++ .../apps/resources/resources/python_subreddit.yaml | 16 ++++++++++ .../apps/resources/resources/python_tricks.yaml | 21 +++++++++++++ .../apps/resources/resources/python_tutor.yaml | 14 +++++++++ .../reading/books/automate_the_boring_stuff.yaml | 23 --------------- .../resources/reading/books/byte_of_python.yaml | 23 --------------- .../resources/reading/books/effective_python.yaml | 22 -------------- .../reading/books/flask_web_development.yaml | 22 -------------- .../resources/reading/books/fluent_python.yaml | 22 -------------- .../reading/books/hitchhikers_guide_to_python.yaml | 20 ------------- .../reading/books/inferential_thinking.yaml | 18 ------------ .../resources/reading/books/mission_python.yaml | 21 ------------- .../neural_networks_from_scratch_in_python.yaml | 21 ------------- .../resources/reading/books/python_cookbook.yaml | 21 ------------- .../reading/books/python_crash_course.yaml | 28 ------------------ .../resources/reading/books/python_tricks.yaml | 21 ------------- .../resources/reading/books/think_python.yaml | 24 --------------- .../reading/books/two_scoops_of_django.yaml | 21 ------------- .../tutorials/getting_started_with_kivy.yaml | 13 --------- ...ng_started_with_python_for_non_programmers.yaml | 12 -------- ...etting_started_with_python_for_programmers.yaml | 12 -------- .../reading/tutorials/python_cheat_sheet.yaml | 12 -------- .../reading/tutorials/python_developer_guide.yaml | 13 --------- .../reading/tutorials/simple_guide_to_git.yaml | 13 --------- .../reading/tutorials/the_flask_mega_tutorial.yaml | 12 -------- .../resources/reading/tutorials/wtf_python.yaml | 17 ----------- .../apps/resources/resources/real_python.yaml | 22 ++++++++++++++ pydis_site/apps/resources/resources/repl_it.yaml | 14 +++++++++ .../apps/resources/resources/screen_readers.yaml | 17 +++++++++++ pydis_site/apps/resources/resources/sentdex.yaml | 34 ++++++++++++++++++++++ .../resources/resources/simple_guide_to_git.yaml | 14 +++++++++ pydis_site/apps/resources/resources/sololearn.yaml | 17 +++++++++++ pydis_site/apps/resources/resources/spyder.yaml | 14 +++++++++ .../apps/resources/resources/sublime_text.yaml | 14 +++++++++ .../resources/resources/talk_python_to_me.yaml | 14 +++++++++ .../apps/resources/resources/talon_voice.yaml | 15 ++++++++++ .../apps/resources/resources/test_and_code.yaml | 15 ++++++++++ .../resources/the_flask_mega_tutorial.yaml | 13 +++++++++ .../resources/the_real_python_podcast.yaml | 16 ++++++++++ .../apps/resources/resources/think_python.yaml | 26 +++++++++++++++++ pydis_site/apps/resources/resources/thonny.yaml | 14 +++++++++ .../tools/accessibility/screen_readers.yaml | 11 ------- .../resources/tools/accessibility/talon_voice.yaml | 9 ------ .../resources/resources/tools/editors/atom.yaml | 8 ----- .../resources/tools/editors/google_collab.yaml | 12 -------- .../resources/tools/editors/mu_editor.yaml | 17 ----------- .../resources/tools/editors/sublime_text.yaml | 8 ----- .../tools/editors/visual_studio_code.yaml | 7 ----- .../resources/resources/tools/ides/pycharm.yaml | 9 ------ .../resources/resources/tools/ides/repl_it.yaml | 10 ------- .../resources/resources/tools/ides/spyder.yaml | 10 ------- .../resources/resources/tools/ides/thonny.yaml | 10 ------- .../resources/resources/two_scoops_of_django.yaml | 22 ++++++++++++++ .../resources/university_of_michigan.yaml | 13 +++++++++ .../resources/resources/university_of_toronto.yaml | 20 +++++++++++++ .../resources/resources/videos/corey_schafer.yaml | 30 ------------------- .../apps/resources/resources/videos/jetbrains.yaml | 22 -------------- .../resources/videos/jim_shaped_coding.yaml | 23 --------------- .../apps/resources/resources/videos/microsoft.yaml | 25 ---------------- .../resources/resources/videos/python_discord.yaml | 17 ----------- .../apps/resources/resources/videos/sentdex.yaml | 33 --------------------- .../resources/resources/visual_studio_code.yaml | 13 +++++++++ .../apps/resources/resources/wtf_python.yaml | 18 ++++++++++++ 132 files changed, 1260 insertions(+), 1148 deletions(-) create mode 100644 pydis_site/apps/resources/resources/adafruit.yaml create mode 100644 pydis_site/apps/resources/resources/atom.yaml create mode 100644 pydis_site/apps/resources/resources/automate_the_boring_stuff_book.yaml create mode 100644 pydis_site/apps/resources/resources/automate_the_boring_stuff_course.yaml create mode 100644 pydis_site/apps/resources/resources/awesome_programming_discord.yaml create mode 100644 pydis_site/apps/resources/resources/byte_of_python.yaml create mode 100644 pydis_site/apps/resources/resources/code_combat.yaml delete mode 100644 pydis_site/apps/resources/resources/communities/adafruit.yaml delete mode 100644 pydis_site/apps/resources/resources/communities/awesome_programming_discord.yaml delete mode 100644 pydis_site/apps/resources/resources/communities/kivy.yaml delete mode 100644 pydis_site/apps/resources/resources/communities/microsoft.yaml delete mode 100644 pydis_site/apps/resources/resources/communities/pallets.yaml delete mode 100644 pydis_site/apps/resources/resources/communities/panda3d.yaml delete mode 100644 pydis_site/apps/resources/resources/communities/people_postgres_data.yaml delete mode 100644 pydis_site/apps/resources/resources/communities/pyglet.yaml delete mode 100644 pydis_site/apps/resources/resources/communities/python_subreddit.yaml delete mode 100644 pydis_site/apps/resources/resources/communities/real_python.yaml create mode 100644 pydis_site/apps/resources/resources/corey_schafer.yaml delete mode 100644 pydis_site/apps/resources/resources/courses/automate_the_boring_stuff_with_python.yaml delete mode 100644 pydis_site/apps/resources/resources/courses/mit_introduction_to_computer_science_and_programming.yaml delete mode 100644 pydis_site/apps/resources/resources/courses/practical_python_programming.yaml delete mode 100644 pydis_site/apps/resources/resources/courses/university_of_michigan.yaml delete mode 100644 pydis_site/apps/resources/resources/courses/university_of_toronto.yaml create mode 100644 pydis_site/apps/resources/resources/edublocks.yaml create mode 100644 pydis_site/apps/resources/resources/effective_python.yaml create mode 100644 pydis_site/apps/resources/resources/exercism.yaml create mode 100644 pydis_site/apps/resources/resources/flask_web_development.yaml create mode 100644 pydis_site/apps/resources/resources/fluent_python.yaml create mode 100644 pydis_site/apps/resources/resources/getting_started_with_kivy.yaml create mode 100644 pydis_site/apps/resources/resources/getting_started_with_python_for_non_programmers.yaml create mode 100644 pydis_site/apps/resources/resources/getting_started_with_python_for_programmers.yaml create mode 100644 pydis_site/apps/resources/resources/google_collab.yaml create mode 100644 pydis_site/apps/resources/resources/hitchhikers_guide_to_python.yaml create mode 100644 pydis_site/apps/resources/resources/inferential_thinking.yaml delete mode 100644 pydis_site/apps/resources/resources/interactive/code_combat.yaml delete mode 100644 pydis_site/apps/resources/resources/interactive/edublocks.yaml delete mode 100644 pydis_site/apps/resources/resources/interactive/exercism.yaml delete mode 100644 pydis_site/apps/resources/resources/interactive/jetbrains_academy.yaml delete mode 100644 pydis_site/apps/resources/resources/interactive/python_morsels.yaml delete mode 100644 pydis_site/apps/resources/resources/interactive/python_tutor.yaml delete mode 100644 pydis_site/apps/resources/resources/interactive/sololearn.yaml create mode 100644 pydis_site/apps/resources/resources/jetbrains_academy.yaml create mode 100644 pydis_site/apps/resources/resources/jetbrains_videos.yaml create mode 100644 pydis_site/apps/resources/resources/jim_shaped_coding.yaml create mode 100644 pydis_site/apps/resources/resources/kivy.yaml create mode 100644 pydis_site/apps/resources/resources/microsoft.yaml create mode 100644 pydis_site/apps/resources/resources/microsoft_videos.yaml create mode 100644 pydis_site/apps/resources/resources/mission_python.yaml create mode 100644 pydis_site/apps/resources/resources/mit_introduction_to_computer_science_and_programming.yaml create mode 100644 pydis_site/apps/resources/resources/mu_editor.yaml create mode 100644 pydis_site/apps/resources/resources/neural_networks_from_scratch_in_python.yaml create mode 100644 pydis_site/apps/resources/resources/pallets.yaml create mode 100644 pydis_site/apps/resources/resources/panda3d.yaml create mode 100644 pydis_site/apps/resources/resources/people_postgres_data.yaml create mode 100644 pydis_site/apps/resources/resources/podcast_dunder_init.yaml delete mode 100644 pydis_site/apps/resources/resources/podcasts/podcast_dunder_init.yaml delete mode 100644 pydis_site/apps/resources/resources/podcasts/python_bytes.yaml delete mode 100644 pydis_site/apps/resources/resources/podcasts/talk_python_to_me.yaml delete mode 100644 pydis_site/apps/resources/resources/podcasts/test_and_code.yaml delete mode 100644 pydis_site/apps/resources/resources/podcasts/the_real_python_podcast.yaml create mode 100644 pydis_site/apps/resources/resources/practical_python_programming.yaml create mode 100644 pydis_site/apps/resources/resources/pycharm.yaml create mode 100644 pydis_site/apps/resources/resources/pyglet.yaml create mode 100644 pydis_site/apps/resources/resources/python_bytes.yaml create mode 100644 pydis_site/apps/resources/resources/python_cheat_sheet.yaml create mode 100644 pydis_site/apps/resources/resources/python_cookbook.yaml create mode 100644 pydis_site/apps/resources/resources/python_crash_course.yaml create mode 100644 pydis_site/apps/resources/resources/python_developer_guide.yaml create mode 100644 pydis_site/apps/resources/resources/python_discord_videos.yaml create mode 100644 pydis_site/apps/resources/resources/python_morsels.yaml create mode 100644 pydis_site/apps/resources/resources/python_subreddit.yaml create mode 100644 pydis_site/apps/resources/resources/python_tricks.yaml create mode 100644 pydis_site/apps/resources/resources/python_tutor.yaml delete mode 100644 pydis_site/apps/resources/resources/reading/books/automate_the_boring_stuff.yaml delete mode 100644 pydis_site/apps/resources/resources/reading/books/byte_of_python.yaml delete mode 100644 pydis_site/apps/resources/resources/reading/books/effective_python.yaml delete mode 100644 pydis_site/apps/resources/resources/reading/books/flask_web_development.yaml delete mode 100644 pydis_site/apps/resources/resources/reading/books/fluent_python.yaml delete mode 100644 pydis_site/apps/resources/resources/reading/books/hitchhikers_guide_to_python.yaml delete mode 100644 pydis_site/apps/resources/resources/reading/books/inferential_thinking.yaml delete mode 100644 pydis_site/apps/resources/resources/reading/books/mission_python.yaml delete mode 100644 pydis_site/apps/resources/resources/reading/books/neural_networks_from_scratch_in_python.yaml delete mode 100644 pydis_site/apps/resources/resources/reading/books/python_cookbook.yaml delete mode 100644 pydis_site/apps/resources/resources/reading/books/python_crash_course.yaml delete mode 100644 pydis_site/apps/resources/resources/reading/books/python_tricks.yaml delete mode 100644 pydis_site/apps/resources/resources/reading/books/think_python.yaml delete mode 100644 pydis_site/apps/resources/resources/reading/books/two_scoops_of_django.yaml delete mode 100644 pydis_site/apps/resources/resources/reading/tutorials/getting_started_with_kivy.yaml delete mode 100644 pydis_site/apps/resources/resources/reading/tutorials/getting_started_with_python_for_non_programmers.yaml delete mode 100644 pydis_site/apps/resources/resources/reading/tutorials/getting_started_with_python_for_programmers.yaml delete mode 100644 pydis_site/apps/resources/resources/reading/tutorials/python_cheat_sheet.yaml delete mode 100644 pydis_site/apps/resources/resources/reading/tutorials/python_developer_guide.yaml delete mode 100644 pydis_site/apps/resources/resources/reading/tutorials/simple_guide_to_git.yaml delete mode 100644 pydis_site/apps/resources/resources/reading/tutorials/the_flask_mega_tutorial.yaml delete mode 100644 pydis_site/apps/resources/resources/reading/tutorials/wtf_python.yaml create mode 100644 pydis_site/apps/resources/resources/real_python.yaml create mode 100644 pydis_site/apps/resources/resources/repl_it.yaml create mode 100644 pydis_site/apps/resources/resources/screen_readers.yaml create mode 100644 pydis_site/apps/resources/resources/sentdex.yaml create mode 100644 pydis_site/apps/resources/resources/simple_guide_to_git.yaml create mode 100644 pydis_site/apps/resources/resources/sololearn.yaml create mode 100644 pydis_site/apps/resources/resources/spyder.yaml create mode 100644 pydis_site/apps/resources/resources/sublime_text.yaml create mode 100644 pydis_site/apps/resources/resources/talk_python_to_me.yaml create mode 100644 pydis_site/apps/resources/resources/talon_voice.yaml create mode 100644 pydis_site/apps/resources/resources/test_and_code.yaml create mode 100644 pydis_site/apps/resources/resources/the_flask_mega_tutorial.yaml create mode 100644 pydis_site/apps/resources/resources/the_real_python_podcast.yaml create mode 100644 pydis_site/apps/resources/resources/think_python.yaml create mode 100644 pydis_site/apps/resources/resources/thonny.yaml delete mode 100644 pydis_site/apps/resources/resources/tools/accessibility/screen_readers.yaml delete mode 100644 pydis_site/apps/resources/resources/tools/accessibility/talon_voice.yaml delete mode 100644 pydis_site/apps/resources/resources/tools/editors/atom.yaml delete mode 100644 pydis_site/apps/resources/resources/tools/editors/google_collab.yaml delete mode 100644 pydis_site/apps/resources/resources/tools/editors/mu_editor.yaml delete mode 100644 pydis_site/apps/resources/resources/tools/editors/sublime_text.yaml delete mode 100644 pydis_site/apps/resources/resources/tools/editors/visual_studio_code.yaml delete mode 100644 pydis_site/apps/resources/resources/tools/ides/pycharm.yaml delete mode 100644 pydis_site/apps/resources/resources/tools/ides/repl_it.yaml delete mode 100644 pydis_site/apps/resources/resources/tools/ides/spyder.yaml delete mode 100644 pydis_site/apps/resources/resources/tools/ides/thonny.yaml create mode 100644 pydis_site/apps/resources/resources/two_scoops_of_django.yaml create mode 100644 pydis_site/apps/resources/resources/university_of_michigan.yaml create mode 100644 pydis_site/apps/resources/resources/university_of_toronto.yaml delete mode 100644 pydis_site/apps/resources/resources/videos/corey_schafer.yaml delete mode 100644 pydis_site/apps/resources/resources/videos/jetbrains.yaml delete mode 100644 pydis_site/apps/resources/resources/videos/jim_shaped_coding.yaml delete mode 100644 pydis_site/apps/resources/resources/videos/microsoft.yaml delete mode 100644 pydis_site/apps/resources/resources/videos/python_discord.yaml delete mode 100644 pydis_site/apps/resources/resources/videos/sentdex.yaml create mode 100644 pydis_site/apps/resources/resources/visual_studio_code.yaml create mode 100644 pydis_site/apps/resources/resources/wtf_python.yaml (limited to 'pydis_site/apps') diff --git a/pydis_site/apps/resources/resources/adafruit.yaml b/pydis_site/apps/resources/resources/adafruit.yaml new file mode 100644 index 00000000..1945274c --- /dev/null +++ b/pydis_site/apps/resources/resources/adafruit.yaml @@ -0,0 +1,24 @@ +description: Adafruit is an open-source electronics manufacturer + that makes all the components you need to start your own Python-powered hardware projects. + Their official community host regular show-and-tells, + provide help with your projects, + and the Adafruit devs do all the CircuitPython Development right out in the open. +title_image: https://www.mouser.com/images/suppliers/logos/adafruit.png +title_url: https://discord.gg/adafruit +urls: + - icon: branding/discord + url: https://discord.gg/adafruit + color: blurple + - icon: regular/link + url: https://adafruit.com/ + color: teal +tags: + topics: + - microcontrollers + payment_tiers: + - free + complexity: + - beginner + - intermediate + type: + - community diff --git a/pydis_site/apps/resources/resources/atom.yaml b/pydis_site/apps/resources/resources/atom.yaml new file mode 100644 index 00000000..3a46a45f --- /dev/null +++ b/pydis_site/apps/resources/resources/atom.yaml @@ -0,0 +1,14 @@ +description: A free Electron-based editor, a "hackable text editor for the 21st century", maintained + by the GitHub team. +name: Atom +title_url: https://atom.io/ +tags: + topics: + - general + payment_tiers: + - free + complexity: + - beginner + - intermediate + type: + - tool diff --git a/pydis_site/apps/resources/resources/automate_the_boring_stuff_book.yaml b/pydis_site/apps/resources/resources/automate_the_boring_stuff_book.yaml new file mode 100644 index 00000000..deaca948 --- /dev/null +++ b/pydis_site/apps/resources/resources/automate_the_boring_stuff_book.yaml @@ -0,0 +1,23 @@ +description: One of the best books out there for Python beginners. This book will + teach you the basics of Python, while also teaching invaluable automation tools + and techniques for solving common problems. You'll learn how to go about scraping + the web, manipulating files and automating keyboard and mouse input. Ideal for an + office worker who wants to make himself more useful. +name: Automate the Boring Stuff with Python +urls: +- icon: regular/book + url: https://automatetheboringstuff.com/ + color: black +- icon: branding/goodreads + url: https://www.goodreads.com/book/show/22514127-automate-the-boring-stuff-with-python + color: goodreads-cream +tags: + topics: + - general + payment_tiers: + - free + - paid + complexity: + - beginner + type: + - book diff --git a/pydis_site/apps/resources/resources/automate_the_boring_stuff_course.yaml b/pydis_site/apps/resources/resources/automate_the_boring_stuff_course.yaml new file mode 100644 index 00000000..b93ef868 --- /dev/null +++ b/pydis_site/apps/resources/resources/automate_the_boring_stuff_course.yaml @@ -0,0 +1,14 @@ +description: The interactive course version of Al Sweigart's excellent book for beginners, taught by the author himself. + This link has a discounted version of the course which will always cost 10 dollars. Thanks, Al! +name: Automate the Boring Stuff with Python +title_url: https://www.udemy.com/automate/?couponCode=FOR_LIKE_10_BUCKS +tags: + topics: + - general + payment_tiers: + - paid + complexity: + - beginner + type: + - course + - interactive diff --git a/pydis_site/apps/resources/resources/awesome_programming_discord.yaml b/pydis_site/apps/resources/resources/awesome_programming_discord.yaml new file mode 100644 index 00000000..4233f26e --- /dev/null +++ b/pydis_site/apps/resources/resources/awesome_programming_discord.yaml @@ -0,0 +1,18 @@ +description: We have listed our favourite communities, + but there are many more excellent communities out there! + An awesome list collating the best programming related Discord servers is available on GitHub + and has all sorts of topics from blockchain to virtual reality! +title_icon: branding/github +title_icon_color: black +title_url: https://github.com/mhxion/awesome-programming-discord +name: awesome-programming-discord +tags: + topics: + - general + payment_tiers: + - free + complexity: + - beginner + - intermediate + type: + - community diff --git a/pydis_site/apps/resources/resources/byte_of_python.yaml b/pydis_site/apps/resources/resources/byte_of_python.yaml new file mode 100644 index 00000000..618578d1 --- /dev/null +++ b/pydis_site/apps/resources/resources/byte_of_python.yaml @@ -0,0 +1,24 @@ +description: A free book on programming using the Python language. + It serves as a tutorial or guide to the Python language for a beginner audience. + If all you know about computers is how to save text files, then this is the book for you. +name: A Byte of Python +urls: +- icon: regular/link + url: https://python.swaroopch.com/ + color: teal +- icon: regular/book + url: http://www.lulu.com/shop/swaroop-c-h/a-byte-of-python/paperback/product-21142968.html + color: black +- icon: branding/goodreads + url: https://www.goodreads.com/book/show/6762544-a-byte-of-python + color: goodreads-cream +tags: + topics: + - general + payment_tiers: + - free + - paid + complexity: + - beginner + type: + - book diff --git a/pydis_site/apps/resources/resources/code_combat.yaml b/pydis_site/apps/resources/resources/code_combat.yaml new file mode 100644 index 00000000..41dac6b6 --- /dev/null +++ b/pydis_site/apps/resources/resources/code_combat.yaml @@ -0,0 +1,22 @@ +description: Learn Python while gaming - an open-source project with thousands of + contributors, which teaches you Python through a deep, top-down RPG. +name: Code Combat +urls: +- icon: regular/link + url: https://codecombat.com/ + color: teal +- icon: branding/github + url: https://github.com/codecombat/codecombat + color: black +tags: + topics: + - general + - algorithms and data structures + payment_tiers: + - free + - subscription + complexity: + - beginner + - intermediate + type: + - interactive diff --git a/pydis_site/apps/resources/resources/communities/adafruit.yaml b/pydis_site/apps/resources/resources/communities/adafruit.yaml deleted file mode 100644 index f226a20c..00000000 --- a/pydis_site/apps/resources/resources/communities/adafruit.yaml +++ /dev/null @@ -1,26 +0,0 @@ -description: Adafruit is an open-source electronics manufacturer - that makes all the components you need to start your own Python-powered hardware projects. - Their official community host regular show-and-tells, - provide help with your projects, - and the Adafruit devs do all the CircuitPython Development right out in the open. -title_image: https://www.mouser.com/images/suppliers/logos/adafruit.png -title_url: https://discord.gg/adafruit -position: 4 -urls: - - icon: branding/discord - url: https://discord.gg/adafruit - color: blurple - - icon: regular/link - url: https://adafruit.com/ - color: teal -tags: - topics: - - microcontrollers - - arduino - - circuitpython - - adafruit - payment_tiers: - - free - complexity: - - beginner - - intermediate diff --git a/pydis_site/apps/resources/resources/communities/awesome_programming_discord.yaml b/pydis_site/apps/resources/resources/communities/awesome_programming_discord.yaml deleted file mode 100644 index d3ebedb8..00000000 --- a/pydis_site/apps/resources/resources/communities/awesome_programming_discord.yaml +++ /dev/null @@ -1,17 +0,0 @@ -description: We have listed our favourite communities, - but there are many more excellent communities out there! - An awesome list collating the best programming related Discord servers is available on GitHub - and has all sorts of topics from blockchain to virtual reality! -title_icon: branding/github -title_icon_color: black -title_url: https://github.com/mhxion/awesome-programming-discord -name: awesome-programming-discord -position: 10 -tags: - topics: - - programming - payment_tiers: - - free - complexity: - - beginner - - intermediate diff --git a/pydis_site/apps/resources/resources/communities/kivy.yaml b/pydis_site/apps/resources/resources/communities/kivy.yaml deleted file mode 100644 index 641236b4..00000000 --- a/pydis_site/apps/resources/resources/communities/kivy.yaml +++ /dev/null @@ -1,27 +0,0 @@ -description: The Kivy project, through the Kivy framework and its sister projects, - aims to provide all the tools to create desktop and mobile applications in Python. - Allowing rapid development of multitouch applications with custom and exciting user interfaces. -icon_image: https://raw.githubusercontent.com/kivy/kivy-website/master/logos/kivy-logo-black-256.png -icon_size: 50 -title_image: https://i.imgur.com/EVP3jZR.png -title_url: https://discord.gg/djPtTRJ -position: 5 -urls: - - icon: branding/discord - url: https://discord.gg/djPtTRJ - color: blurple - - icon: regular/link - url: https://kivy.org/ - color: teal - - icon: branding/github - url: https://github.com/kivy - color: black -tags: - topics: - - user interface - - game development - payment_tiers: - - free - complexity: - - beginner - - intermediate diff --git a/pydis_site/apps/resources/resources/communities/microsoft.yaml b/pydis_site/apps/resources/resources/communities/microsoft.yaml deleted file mode 100644 index 3019fb9d..00000000 --- a/pydis_site/apps/resources/resources/communities/microsoft.yaml +++ /dev/null @@ -1,20 +0,0 @@ -description: Microsoft Python is a Discord server for discussing all things relating to using Python with Microsoft products, - they have channels for Azure, VS Code, IoT, Data Science and much more! -title_image: https://1000logos.net/wp-content/uploads/2017/04/Microsoft-Logo.png -title_url: https://discord.gg/b8YJQPx -position: 1 -urls: - - icon: branding/discord - url: https://discord.gg/b8YJQPx - color: blurple - - icon: regular/link - url: https://www.microsoft.com/en-us/boards/pycon2020.aspx - color: teal -tags: - topics: - - python - payment_tiers: - - free - complexity: - - beginner - - intermediate diff --git a/pydis_site/apps/resources/resources/communities/pallets.yaml b/pydis_site/apps/resources/resources/communities/pallets.yaml deleted file mode 100644 index 4328b469..00000000 --- a/pydis_site/apps/resources/resources/communities/pallets.yaml +++ /dev/null @@ -1,21 +0,0 @@ -description: The Pallets Projects develop Python libraries such as the Flask web framework, - the Jinja templating library, and the Click command line toolkit. Join to discuss - and get help from the Pallets community. -title_image: https://i.imgur.com/sV9Ypdf.png -title_url: https://discord.gg/t6rrQZH -position: 6 -urls: - - icon: branding/discord - url: https://discord.gg/t6rrQZH - color: blurple - - icon: regular/link - url: https://www.palletsprojects.com/ - color: teal -tags: - topics: - - web development - payment_tiers: - - free - complexity: - - beginner - - intermediate diff --git a/pydis_site/apps/resources/resources/communities/panda3d.yaml b/pydis_site/apps/resources/resources/communities/panda3d.yaml deleted file mode 100644 index 8f1d0f9b..00000000 --- a/pydis_site/apps/resources/resources/communities/panda3d.yaml +++ /dev/null @@ -1,21 +0,0 @@ -description: Panda3D is a Python-focused 3-D framework for rapid development of games, - visualizations, and simulations, written in C++ with an emphasis on performance and flexibility. -title_image: http://www.panda3d.org/wp-content/uploads/2019/01/panda3d_logo.png -title_url: https://discord.gg/9XsucTT -position: 9 -urls: - - icon: branding/discord - url: https://discord.gg/9XsucTT - color: blurple - - icon: regular/link - url: https://www.panda3d.org/ - color: teal -tags: - topics: - - user interface - - game development - payment_tiers: - - free - complexity: - - beginner - - intermediate diff --git a/pydis_site/apps/resources/resources/communities/people_postgres_data.yaml b/pydis_site/apps/resources/resources/communities/people_postgres_data.yaml deleted file mode 100644 index cd13a18a..00000000 --- a/pydis_site/apps/resources/resources/communities/people_postgres_data.yaml +++ /dev/null @@ -1,26 +0,0 @@ -description: People, Postgres, Data specializes in building users of Postgres - and related ecosystem including but not limited to technologies such as RDS Postgres, - Aurora for Postgres, Google Postgres, PostgreSQL.Org Postgres, Greenplum, Timescale and ZomboDB. - They take a holistic approach to their community inviting not only technical topics but Professional Development - and Life in general including movies, games, books and travel. -title_image: https://media.discordapp.net/attachments/748954447857844318/750519488268730377/people_postgres_data.png -title_url: https://discord.gg/Ujw8m8v -position: 2 -urls: - - icon: branding/discord - url: https://discord.gg/Ujw8m8v - color: bluple - - icon: regular/link - url: https://postgresconf.org/ - color: teal - - icon: branding/reddit - url: https://reddit.com/r/postgresql - color: orangered -tags: - topics: - - databases - payment_tiers: - - free - complexity: - - beginner - - intermediate diff --git a/pydis_site/apps/resources/resources/communities/pyglet.yaml b/pydis_site/apps/resources/resources/communities/pyglet.yaml deleted file mode 100644 index 68cca2af..00000000 --- a/pydis_site/apps/resources/resources/communities/pyglet.yaml +++ /dev/null @@ -1,24 +0,0 @@ -description: Pyglet is a powerful, - yet easy to use Python library for developing games and other visually-rich applications on Windows, - Mac OS X and Linux. It supports windowing, user interface event handling, Joysticks, OpenGL graphics, - loading images and videos, and playing sounds and music. All of this with a friendly Pythonic API, - that's simple to learn and doesn't get in your way. -title_image: https://i.imgur.com/LfQwXUe.png -title_url: https://discord.gg/QXyegWe -position: 8 -urls: - - icon: branding/discord - url: https://discord.gg/QXyegWe - color: blurple - - icon: regular/link - url: http://pyglet.org/ - color: teal -tags: - topics: - - user interface - - game development - payment_tiers: - - free - complexity: - - beginner - - intermediate diff --git a/pydis_site/apps/resources/resources/communities/python_subreddit.yaml b/pydis_site/apps/resources/resources/communities/python_subreddit.yaml deleted file mode 100644 index b2176ff5..00000000 --- a/pydis_site/apps/resources/resources/communities/python_subreddit.yaml +++ /dev/null @@ -1,14 +0,0 @@ -description: News about the Python programming language, and language-related discussion. -name: r/Python -title_icon: branding/reddit -title_icon_color: orangered -title_url: https://www.reddit.com/r/Python/ -position: 0 -tags: - topics: - - python - payment_tiers: - - free - complexity: - - beginner - - intermediate diff --git a/pydis_site/apps/resources/resources/communities/real_python.yaml b/pydis_site/apps/resources/resources/communities/real_python.yaml deleted file mode 100644 index f1e71125..00000000 --- a/pydis_site/apps/resources/resources/communities/real_python.yaml +++ /dev/null @@ -1,20 +0,0 @@ -description: Dan Bader's treasure trove of quizzes, tutorials and interactive content for learning Python. - An absolute goldmine. -title_image: https://i.imgur.com/WDqhZ36.png -title_url: https://realpython.com/ -position: 3 -urls: - - icon: regular/link - url: https://realpython.com/ - color: teal - - icon: branding/youtube - url: https://www.youtube.com/channel/UCI0vQvr9aFn27yR6Ej6n5UA - color: youtube-red -tags: - topics: - - python - payment_tiers: - - free - complexity: - - beginner - - intermediate diff --git a/pydis_site/apps/resources/resources/corey_schafer.yaml b/pydis_site/apps/resources/resources/corey_schafer.yaml new file mode 100644 index 00000000..c4d9ad5e --- /dev/null +++ b/pydis_site/apps/resources/resources/corey_schafer.yaml @@ -0,0 +1,31 @@ +description: 'Corey has a number of exceptionally high quality tutorial series + on everything from Python basics to Django and Flask: + + Check out his channel for more video series! + ' +title_image: https://i.imgur.com/KIfWw3b.png +urls: + - icon: branding/youtube + url: https://www.youtube.com/channel/UCCezIgC97PvUuR4_gbFUs5g + color: youtube-red + - icon: regular/link + url: https://coreyms.com/ + color: teal +tags: + topics: + - general + - software design + - web development + - tooling + payment_tiers: + - free + complexity: + - beginner + - intermediate + type: + - video diff --git a/pydis_site/apps/resources/resources/courses/automate_the_boring_stuff_with_python.yaml b/pydis_site/apps/resources/resources/courses/automate_the_boring_stuff_with_python.yaml deleted file mode 100644 index 52872d2c..00000000 --- a/pydis_site/apps/resources/resources/courses/automate_the_boring_stuff_with_python.yaml +++ /dev/null @@ -1,13 +0,0 @@ -description: The interactive course version of Al Sweigart's excellent book for beginners, taught by the author himself. - This link has a discounted version of the course which will always cost 10 dollars. Thanks, Al! -name: Automate the Boring Stuff with Python -title_url: https://www.udemy.com/automate/?couponCode=FOR_LIKE_10_BUCKS -position: 3 -tags: - topics: - - python - - automation - payment_tiers: - - paid - complexity: - - beginner diff --git a/pydis_site/apps/resources/resources/courses/mit_introduction_to_computer_science_and_programming.yaml b/pydis_site/apps/resources/resources/courses/mit_introduction_to_computer_science_and_programming.yaml deleted file mode 100644 index 3de01803..00000000 --- a/pydis_site/apps/resources/resources/courses/mit_introduction_to_computer_science_and_programming.yaml +++ /dev/null @@ -1,15 +0,0 @@ -description: This MITx offering teaches computer science with Python. - It covers computational thinking, algorithms, data structures - and the Python programming language itself. -name: 'MIT: Introduction to Computer Science and Programming' -title_url: https://www.edx.org/course/introduction-computer-science-mitx-6-00-1x-11 -position: 1 -tags: - topics: - - python - - computer science - payment_tiers: - - free - - paid - complexity: - - beginner diff --git a/pydis_site/apps/resources/resources/courses/practical_python_programming.yaml b/pydis_site/apps/resources/resources/courses/practical_python_programming.yaml deleted file mode 100644 index ded29ce1..00000000 --- a/pydis_site/apps/resources/resources/courses/practical_python_programming.yaml +++ /dev/null @@ -1,16 +0,0 @@ -description: Created and taught by David Beazley, - this course is a conversion of his instructor-led Python training course used for corporate training - and professional development. It has been in continual development since 2007 - and battle tested in real-world classrooms. Usually, it’s taught in-person over the span of three - or four days–requiring approximately 25-35 hours of intense work. - This includes the completion of approximately 130 hands-on coding exercises. -name: Practical Python Programming -title_url: https://dabeaz-course.github.io/practical-python/ -position: 4 -tags: - topics: - - python - payment_tiers: - - free - complexity: - - beginner diff --git a/pydis_site/apps/resources/resources/courses/university_of_michigan.yaml b/pydis_site/apps/resources/resources/courses/university_of_michigan.yaml deleted file mode 100644 index 4ed48ff2..00000000 --- a/pydis_site/apps/resources/resources/courses/university_of_michigan.yaml +++ /dev/null @@ -1,12 +0,0 @@ -description: A 5-part specialization course that teaches Python from scratch. - The course has no pre-requisites and avoids all but the simplest mathematics. -name: 'University of Michigan: Programming for Everybody' -title_url: https://www.coursera.org/learn/python -position: 2 -tags: - topics: - - python - payment_tiers: - - free - complexity: - - beginner diff --git a/pydis_site/apps/resources/resources/courses/university_of_toronto.yaml b/pydis_site/apps/resources/resources/courses/university_of_toronto.yaml deleted file mode 100644 index e71fb1e6..00000000 --- a/pydis_site/apps/resources/resources/courses/university_of_toronto.yaml +++ /dev/null @@ -1,19 +0,0 @@ -description: A 2-part course that teaches Python. Primarily intended for high school students - and first-year university students who want to learn programming. -name: 'University of Toronto: Learn to Program' -position: 0 -urls: - - icon: regular/graduation-cap - url: https://www.coursera.org/learn/learn-to-program - color: orangered - - icon: regular/graduation-cap - url: https://www.coursera.org/learn/program-code - color: youtube-red -tags: - topics: - - python - payment_tiers: - - free - complexity: - - beginner - - intermediate diff --git a/pydis_site/apps/resources/resources/edublocks.yaml b/pydis_site/apps/resources/resources/edublocks.yaml new file mode 100644 index 00000000..9fd87945 --- /dev/null +++ b/pydis_site/apps/resources/resources/edublocks.yaml @@ -0,0 +1,18 @@ +description: EduBlocks provides a simple drag and drop interface to help beginners get to grips + with the key concepts of Python. There is built-in support for modules such as random, + turtle, processing and pygal to play around with, + and it even allows you to export the Python code you have written in the graphical editor. + EduBlocks also has integration with BBC micro:bit, + Raspberry Pi and CircuitPython allowing you to write code for these devices graphically + and export the code to run on actual devices. +name: EduBlocks +title_url: https://edublocks.org/ +tags: + topics: + - general + payment_tiers: + - free + complexity: + - beginner + type: + - interactive diff --git a/pydis_site/apps/resources/resources/effective_python.yaml b/pydis_site/apps/resources/resources/effective_python.yaml new file mode 100644 index 00000000..5ca94c63 --- /dev/null +++ b/pydis_site/apps/resources/resources/effective_python.yaml @@ -0,0 +1,23 @@ +description: A book that gives 90 best practices for writing excellent Python. Great + for intermediates. +name: Effective Python +urls: +- icon: regular/link + url: https://effectivepython.com/ + color: teal +- icon: branding/goodreads + url: https://www.goodreads.com/book/show/48566725-effective-python + color: goodreads-cream +- icon: branding/github + url: https://github.com/bslatkin/effectivepython + color: black +tags: + topics: + - general + - software design + payment_tiers: + - paid + complexity: + - intermediate + type: + - book diff --git a/pydis_site/apps/resources/resources/exercism.yaml b/pydis_site/apps/resources/resources/exercism.yaml new file mode 100644 index 00000000..7885bb9a --- /dev/null +++ b/pydis_site/apps/resources/resources/exercism.yaml @@ -0,0 +1,22 @@ +description: Level up your programming skills with more than 2600 exercises across + 47 programming languages, Python included. The website provides a mentored mode, + where you can get your code reviewed for each solution you submit. The mentors will + give you insightful advice to make you a better programmer. +name: exercism.io +urls: +- icon: regular/link + url: https://exercism.io/ + color: teal +- icon: branding/github + url: https://github.com/exercism/python + color: black +tags: + topics: + - general + payment_tiers: + - free + complexity: + - beginner + - intermediate + type: + - interactive diff --git a/pydis_site/apps/resources/resources/flask_web_development.yaml b/pydis_site/apps/resources/resources/flask_web_development.yaml new file mode 100644 index 00000000..27e75fe6 --- /dev/null +++ b/pydis_site/apps/resources/resources/flask_web_development.yaml @@ -0,0 +1,23 @@ +description: A comprehensive Flask walkthrough that has you building a complete social + blogging application from scratch. +name: Flask Web Development +urls: +- icon: regular/link + url: http://shop.oreilly.com/product/0636920031116.do + color: teal +- icon: branding/goodreads + url: https://www.goodreads.com/book/show/18774655-flask-web-development + color: goodreads-cream +- icon: branding/github + url: https://github.com/miguelgrinberg/flasky + color: black +tags: + topics: + - web development + payment_tiers: + - paid + complexity: + - beginner + - intermediate + type: + - book diff --git a/pydis_site/apps/resources/resources/fluent_python.yaml b/pydis_site/apps/resources/resources/fluent_python.yaml new file mode 100644 index 00000000..24c2b150 --- /dev/null +++ b/pydis_site/apps/resources/resources/fluent_python.yaml @@ -0,0 +1,23 @@ +description: A veritable tome of intermediate and advanced Python information. A must-read + for any Python professional. By far the most recommended book for intermediates. +name: Fluent Python +urls: +- icon: regular/link + url: https://www.oreilly.com/library/view/fluent-python/9781491946237/ + color: teal +- icon: branding/goodreads + url: https://www.goodreads.com/book/show/22800567-fluent-python + color: goodreads-cream +- icon: branding/github + url: https://github.com/fluentpython + color: black +tags: + topics: + - general + - software design + payment_tiers: + - paid + complexity: + - intermediate + type: + - book diff --git a/pydis_site/apps/resources/resources/getting_started_with_kivy.yaml b/pydis_site/apps/resources/resources/getting_started_with_kivy.yaml new file mode 100644 index 00000000..5dbcd387 --- /dev/null +++ b/pydis_site/apps/resources/resources/getting_started_with_kivy.yaml @@ -0,0 +1,14 @@ +description: A big list of excellent resources for getting started making Kivy applications. +name: Getting Started with Kivy +title_url: https://blog.kivy.org/2019/12/getting-started-with-kivy/ +icon_image: https://raw.githubusercontent.com/kivy/kivy-website/master/logos/kivy-logo-black-256.png +tags: + topics: + - user interface + - game development + payment_tiers: + - free + complexity: + - beginner + type: + - tutorial diff --git a/pydis_site/apps/resources/resources/getting_started_with_python_for_non_programmers.yaml b/pydis_site/apps/resources/resources/getting_started_with_python_for_non_programmers.yaml new file mode 100644 index 00000000..85c061bd --- /dev/null +++ b/pydis_site/apps/resources/resources/getting_started_with_python_for_non_programmers.yaml @@ -0,0 +1,13 @@ +description: A list of beginner resources for programmers with no prior developer experience, + from Python's official guide. +name: Getting Started with Python for Non-Programmers +title_url: https://wiki.python.org/moin/BeginnersGuide/NonProgrammers +tags: + topics: + - general + payment_tiers: + - free + complexity: + - beginner + type: + - tutorial diff --git a/pydis_site/apps/resources/resources/getting_started_with_python_for_programmers.yaml b/pydis_site/apps/resources/resources/getting_started_with_python_for_programmers.yaml new file mode 100644 index 00000000..2565eedd --- /dev/null +++ b/pydis_site/apps/resources/resources/getting_started_with_python_for_programmers.yaml @@ -0,0 +1,14 @@ +description: A list of beginner resources for programmers coming from other languages, + from Python's official guide. +name: Getting Started with Python for Programmers +title_url: https://wiki.python.org/moin/BeginnersGuide/Programmers +position: 0 +tags: + topics: + - general + payment_tiers: + - free + complexity: + - intermediate + type: + - tutorial diff --git a/pydis_site/apps/resources/resources/google_collab.yaml b/pydis_site/apps/resources/resources/google_collab.yaml new file mode 100644 index 00000000..65876c0e --- /dev/null +++ b/pydis_site/apps/resources/resources/google_collab.yaml @@ -0,0 +1,17 @@ +description: Google Collab is a high-powered custom version of Jupyter Notebook which supports e.g. + !apt-get to install arbitrary Debian packages to the runtime, which is very generous with CPU and memory, + and well-integrated with Google Drive. + You can share your Collab Notebooks with other people and work collaboratively. +name: Google Collab +title_url: https://colab.research.google.com/notebooks/intro.ipynb +tags: + topics: + - general + - data science + payment_tiers: + - free + complexity: + - beginner + - intermediate + type: + - tool diff --git a/pydis_site/apps/resources/resources/hitchhikers_guide_to_python.yaml b/pydis_site/apps/resources/resources/hitchhikers_guide_to_python.yaml new file mode 100644 index 00000000..e50f6297 --- /dev/null +++ b/pydis_site/apps/resources/resources/hitchhikers_guide_to_python.yaml @@ -0,0 +1,20 @@ +description: A best practice handbook for both novice and expert Python developers to the installation, + configuration, and usage of Python on a daily basis. +name: The Hitchhiker's Guide to Python +urls: +- icon: regular/link + url: https://python-guide.org/ + color: teal +- icon: branding/goodreads + url: https://www.goodreads.com/book/show/28321007-the-hitchhiker-s-guide-to-python + color: goodreads-cream +tags: + topics: + - general + payment_tiers: + - paid + complexity: + - beginner + - intermediate + type: + - book diff --git a/pydis_site/apps/resources/resources/inferential_thinking.yaml b/pydis_site/apps/resources/resources/inferential_thinking.yaml new file mode 100644 index 00000000..92963948 --- /dev/null +++ b/pydis_site/apps/resources/resources/inferential_thinking.yaml @@ -0,0 +1,18 @@ +description: Inferential Thinking is the textbook for the Foundations of Data Science course at UC Berkley. + It introduces you the fundamentals of both Data Science and Python at a level accessible to all. + It is available both through your browser and in PDF form. +name: Inferential Thinking +urls: + - icon: regular/link + url: https://inferentialthinking.com/chapters/intro + color: teal +tags: + topics: + - data science + payment_tiers: + - free + complexity: + - beginner + - intermediate + type: + - book diff --git a/pydis_site/apps/resources/resources/interactive/code_combat.yaml b/pydis_site/apps/resources/resources/interactive/code_combat.yaml deleted file mode 100644 index 640696a9..00000000 --- a/pydis_site/apps/resources/resources/interactive/code_combat.yaml +++ /dev/null @@ -1,20 +0,0 @@ -description: Learn Python while gaming - an open-source project with thousands of - contributors, which teaches you Python through a deep, top-down RPG. -name: Code Combat -position: 0 -urls: -- icon: regular/link - url: https://codecombat.com/ - color: teal -- icon: branding/github - url: https://github.com/codecombat/codecombat - color: black -tags: - topics: - - python - payment_tiers: - - free - - subscription - complexity: - - beginner - - intermediate diff --git a/pydis_site/apps/resources/resources/interactive/edublocks.yaml b/pydis_site/apps/resources/resources/interactive/edublocks.yaml deleted file mode 100644 index bef33abe..00000000 --- a/pydis_site/apps/resources/resources/interactive/edublocks.yaml +++ /dev/null @@ -1,17 +0,0 @@ -description: EduBlocks provides a simple drag and drop interface to help beginners get to grips - with the key concepts of Python. There is built-in support for modules such as random, - turtle, processing and pygal to play around with, - and it even allows you to export the Python code you have written in the graphical editor. - EduBlocks also has integration with BBC micro:bit, - Raspberry Pi and CircuitPython allowing you to write code for these devices graphically - and export the code to run on actual devices. -name: EduBlocks -title_url: https://edublocks.org/ -position: 5 -tags: - topics: - - python - payment_tiers: - - free - complexity: - - beginner diff --git a/pydis_site/apps/resources/resources/interactive/exercism.yaml b/pydis_site/apps/resources/resources/interactive/exercism.yaml deleted file mode 100644 index 6e3d83db..00000000 --- a/pydis_site/apps/resources/resources/interactive/exercism.yaml +++ /dev/null @@ -1,21 +0,0 @@ -description: Level up your programming skills with more than 2600 exercises across - 47 programming languages, Python included. The website provides a mentored mode, - where you can get your code reviewed for each solution you submit. The mentors will - give you insightful advice to make you a better programmer. -name: exercism.io -position: 1 -urls: -- icon: regular/link - url: https://exercism.io/ - color: teal -- icon: branding/github - url: https://github.com/exercism/python - color: black -tags: - topics: - - python - payment_tiers: - - free - complexity: - - beginner - - intermediate diff --git a/pydis_site/apps/resources/resources/interactive/jetbrains_academy.yaml b/pydis_site/apps/resources/resources/interactive/jetbrains_academy.yaml deleted file mode 100644 index bb3606c9..00000000 --- a/pydis_site/apps/resources/resources/interactive/jetbrains_academy.yaml +++ /dev/null @@ -1,15 +0,0 @@ -description: Learn Python with a wide range of high quality, project-based lessons. - Keep track of your progress as you cover all the basic concepts a Python programmer needs to know, - as well as touching on more advanced areas such as web development with Django, - natural language processing with NLTK, and data science with NumPy, pandas, and scikit-learn! - It requires a paid subscription, but a free trial is available. -name: JetBrains Academy -title_url: https://www.jetbrains.com/academy/ -position: 6 -tags: - topics: - - python - payment_tiers: - - subscription - complexity: - - beginner diff --git a/pydis_site/apps/resources/resources/interactive/python_morsels.yaml b/pydis_site/apps/resources/resources/interactive/python_morsels.yaml deleted file mode 100644 index f51fe198..00000000 --- a/pydis_site/apps/resources/resources/interactive/python_morsels.yaml +++ /dev/null @@ -1,17 +0,0 @@ -description: 'Learn to write more idiomatic Python code with deliberate practice! - - - Sign up for this service and receive one short Python exercise every week. After - you attempt to work through the exercise, you''ll receive a number of solutions - to the exercise with explanations of each one. Each exercise will include automated - tests and some may include bonuses for a little more of a challenge!' -name: Python Morsels -title_url: https://www.pythonmorsels.com/ -position: 3 -tags: - topics: - - python - payment_tiers: - - subscription - complexity: - - intermediate diff --git a/pydis_site/apps/resources/resources/interactive/python_tutor.yaml b/pydis_site/apps/resources/resources/interactive/python_tutor.yaml deleted file mode 100644 index fbde8b24..00000000 --- a/pydis_site/apps/resources/resources/interactive/python_tutor.yaml +++ /dev/null @@ -1,12 +0,0 @@ -description: Write Python code in your web browser, and see it visualized step by step. -name: Python Tutor -title_url: https://www.pythontutor.com/ -position: 2 -tags: - topics: - - python - payment_tiers: - - free - complexity: - - beginner - - intermediate diff --git a/pydis_site/apps/resources/resources/interactive/sololearn.yaml b/pydis_site/apps/resources/resources/interactive/sololearn.yaml deleted file mode 100644 index 605c119f..00000000 --- a/pydis_site/apps/resources/resources/interactive/sololearn.yaml +++ /dev/null @@ -1,15 +0,0 @@ -description: SoloLearn's Python 3 course serves as a simple and convenient introduction to Python. - Containing exercises and quizzes in modules to cover introductory subjects of the language, - you can pick it up and put it down between your busier aspects of life thanks to both PC - and mobile apps being available to use. -name: SoloLearn -title_url: https://www.sololearn.com/Course/Python/ -position: 4 -tags: - topics: - - python - payment_tiers: - - free - - subscription - complexity: - - beginner diff --git a/pydis_site/apps/resources/resources/jetbrains_academy.yaml b/pydis_site/apps/resources/resources/jetbrains_academy.yaml new file mode 100644 index 00000000..63c061ce --- /dev/null +++ b/pydis_site/apps/resources/resources/jetbrains_academy.yaml @@ -0,0 +1,18 @@ +description: Learn Python with a wide range of high quality, project-based lessons. + Keep track of your progress as you cover all the basic concepts a Python programmer needs to know, + as well as touching on more advanced areas such as web development with Django, + natural language processing with NLTK, and data science with NumPy, pandas, and scikit-learn! + It requires a paid subscription, but a free trial is available. +name: JetBrains Academy +title_url: https://www.jetbrains.com/academy/ +tags: + topics: + - general + - web development + - data science + payment_tiers: + - subscription + complexity: + - beginner + type: + - interactive diff --git a/pydis_site/apps/resources/resources/jetbrains_videos.yaml b/pydis_site/apps/resources/resources/jetbrains_videos.yaml new file mode 100644 index 00000000..f13ecbb7 --- /dev/null +++ b/pydis_site/apps/resources/resources/jetbrains_videos.yaml @@ -0,0 +1,23 @@ +description: A collection of videos made by the PyCharm team at JetBrains on subjects such as TDD, + Django, pytest and much more!

+ Episodes of their "What does this package do?" series go over all sorts of libraries in Python + both in the standard library and from the community and give a video explanation of the key concepts. +icon_image: https://upload.wikimedia.org/wikipedia/commons/thumb/1/1a/JetBrains_Logo_2016.svg/1200px-JetBrains_Logo_2016.svg.png +icon_size: 50 +title_image: https://resources.jetbrains.com/storage/products/pycharm/img/meta/pycharm_logo_300x300.png +urls: + - icon: branding/youtube + url: https://www.youtube.com/channel/UCak6beUTLlVmf0E4AmnQkmw + color: youtube-red +tags: + topics: + - general + - testing + - web development + payment_tiers: + - free + complexity: + - beginner + - intermediate + type: + - video diff --git a/pydis_site/apps/resources/resources/jim_shaped_coding.yaml b/pydis_site/apps/resources/resources/jim_shaped_coding.yaml new file mode 100644 index 00000000..a217183e --- /dev/null +++ b/pydis_site/apps/resources/resources/jim_shaped_coding.yaml @@ -0,0 +1,24 @@ +description: 'JimShapedCoding contains a set of YouTube tutorials covering things from Flask to GUI development in Python: + + Check out his channel for more videos!' +title_image: https://i.imgur.com/DlovZPf.png +urls: + - icon: branding/youtube + url: https://www.youtube.com/channel/UCU8d7rcShA7MGuDyYH1aWGg + color: youtube-red +tags: + topics: + - general + - user interface + - web development + payment_tiers: + - free + complexity: + - beginner + - intermediate + type: + - video diff --git a/pydis_site/apps/resources/resources/kivy.yaml b/pydis_site/apps/resources/resources/kivy.yaml new file mode 100644 index 00000000..c4028647 --- /dev/null +++ b/pydis_site/apps/resources/resources/kivy.yaml @@ -0,0 +1,28 @@ +description: The Kivy project, through the Kivy framework and its sister projects, + aims to provide all the tools to create desktop and mobile applications in Python. + Allowing rapid development of multitouch applications with custom and exciting user interfaces. +icon_image: https://raw.githubusercontent.com/kivy/kivy-website/master/logos/kivy-logo-black-256.png +icon_size: 50 +title_image: https://i.imgur.com/EVP3jZR.png +title_url: https://discord.gg/djPtTRJ +urls: + - icon: branding/discord + url: https://discord.gg/djPtTRJ + color: blurple + - icon: regular/link + url: https://kivy.org/ + color: teal + - icon: branding/github + url: https://github.com/kivy + color: black +tags: + topics: + - user interface + - game development + payment_tiers: + - free + complexity: + - beginner + - intermediate + type: + - community diff --git a/pydis_site/apps/resources/resources/microsoft.yaml b/pydis_site/apps/resources/resources/microsoft.yaml new file mode 100644 index 00000000..455131be --- /dev/null +++ b/pydis_site/apps/resources/resources/microsoft.yaml @@ -0,0 +1,22 @@ +description: Microsoft Python is a Discord server for discussing all things relating to using Python with Microsoft products, + they have channels for Azure, VS Code, IoT, Data Science and much more! +title_image: https://1000logos.net/wp-content/uploads/2017/04/Microsoft-Logo.png +title_url: https://discord.gg/b8YJQPx +urls: + - icon: branding/discord + url: https://discord.gg/b8YJQPx + color: blurple + - icon: regular/link + url: https://www.microsoft.com/en-us/boards/pycon2020.aspx + color: teal +tags: + topics: + - general + - tooling + payment_tiers: + - free + complexity: + - beginner + - intermediate + type: + - community diff --git a/pydis_site/apps/resources/resources/microsoft_videos.yaml b/pydis_site/apps/resources/resources/microsoft_videos.yaml new file mode 100644 index 00000000..d0dbc4f4 --- /dev/null +++ b/pydis_site/apps/resources/resources/microsoft_videos.yaml @@ -0,0 +1,26 @@ +description: A trove of tutorials & guides for developers from Microsoft's Developer hub. + Follow the links below for a series of high-quality Python tutorials for beginners. + + Microsoft's Python Development Team also runs a Discord Server for discussions of Python in the Microsoft ecosystem, + including Visual Studio Code and Azure. +title_image: http://img-prod-cms-rt-microsoft-com.akamaized.net/cms/api/am/imageFileData/RE2qVsJ?ver=3f74 +urls: + - icon: branding/youtube + url: https://www.youtube.com/channel/UCsMica-v34Irf9KVTh6xx-g + color: youtube-red + - icon: branding/discord + url: https://aka.ms/python-discord + color: blurple +tags: + topics: + - python + payment_tiers: + - free + complexity: + - beginner + type: + - video diff --git a/pydis_site/apps/resources/resources/mission_python.yaml b/pydis_site/apps/resources/resources/mission_python.yaml new file mode 100644 index 00000000..2a1ffcad --- /dev/null +++ b/pydis_site/apps/resources/resources/mission_python.yaml @@ -0,0 +1,22 @@ +description: Learn programming and Python while building a complete and awesome space-themed + game using cutting-edge Python 3.6 and Pygame Zero. Extensive use of code examples, + images, and walk-throughs make this a pleasure to both read and follow along. Excellent + book for beginners. +name: Mission Python +urls: +- icon: regular/link + url: https://www.sean.co.uk/books/mission-python/index.shtm + color: teal +- icon: branding/goodreads + url: https://www.goodreads.com/book/show/35545850-mission-python + color: goodreads-cream +tags: + topics: + - general + - game development + payment_tiers: + - paid + complexity: + - beginner + type: + - book diff --git a/pydis_site/apps/resources/resources/mit_introduction_to_computer_science_and_programming.yaml b/pydis_site/apps/resources/resources/mit_introduction_to_computer_science_and_programming.yaml new file mode 100644 index 00000000..4aa028ea --- /dev/null +++ b/pydis_site/apps/resources/resources/mit_introduction_to_computer_science_and_programming.yaml @@ -0,0 +1,16 @@ +description: This MITx offering teaches computer science with Python. + It covers computational thinking, algorithms, data structures + and the Python programming language itself. +name: 'MIT: Introduction to Computer Science and Programming' +title_url: https://www.edx.org/course/introduction-computer-science-mitx-6-00-1x-11 +tags: + topics: + - general + - algorithms and data structures + payment_tiers: + - free + - paid + complexity: + - beginner + type: + - course diff --git a/pydis_site/apps/resources/resources/mu_editor.yaml b/pydis_site/apps/resources/resources/mu_editor.yaml new file mode 100644 index 00000000..68c9b7db --- /dev/null +++ b/pydis_site/apps/resources/resources/mu_editor.yaml @@ -0,0 +1,15 @@ +description: An editor aimed at beginners for the purpose of learning how to code + without the distractions more advanced editors sometimes cause. + Particularly useful for use with microcontrollers, + with built-in tools to interact with Adafruit and Arduino boards. +name: Mu-Editor +title_url: https://codewith.mu/ +tags: + topics: + - microcontrollers + payment_tiers: + - free + complexity: + - beginner + type: + - tool diff --git a/pydis_site/apps/resources/resources/neural_networks_from_scratch_in_python.yaml b/pydis_site/apps/resources/resources/neural_networks_from_scratch_in_python.yaml new file mode 100644 index 00000000..ae5005a7 --- /dev/null +++ b/pydis_site/apps/resources/resources/neural_networks_from_scratch_in_python.yaml @@ -0,0 +1,21 @@ +description: '"Neural Networks From Scratch" is a book intended to teach you how to build neural networks on your own, + without any libraries, so you can better understand deep learning and how all of the elements work. + This is so you can go out and do new/novel things with deep learning as well as to become more successful with even more basic models. + This book is to accompany the usual free tutorial videos and sample code from youtube.com/sentdex.' +name: Neural Networks from Scratch in Python +urls: + - icon: regular/link + url: https://nnfs.io/ + color: teal + - icon: branding/goodreads + url: https://www.goodreads.com/book/show/55927899-neural-networks-from-scratch-in-python + color: goodreads-cream +tags: + topics: + - data science + payment_tiers: + - paid + complexity: + - intermediate + type: + - book diff --git a/pydis_site/apps/resources/resources/pallets.yaml b/pydis_site/apps/resources/resources/pallets.yaml new file mode 100644 index 00000000..dc337784 --- /dev/null +++ b/pydis_site/apps/resources/resources/pallets.yaml @@ -0,0 +1,22 @@ +description: The Pallets Projects develop Python libraries such as the Flask web framework, + the Jinja templating library, and the Click command line toolkit. Join to discuss + and get help from the Pallets community. +title_image: https://i.imgur.com/sV9Ypdf.png +title_url: https://discord.gg/t6rrQZH +urls: + - icon: branding/discord + url: https://discord.gg/t6rrQZH + color: blurple + - icon: regular/link + url: https://www.palletsprojects.com/ + color: teal +tags: + topics: + - web development + payment_tiers: + - free + complexity: + - beginner + - intermediate + type: + - community diff --git a/pydis_site/apps/resources/resources/panda3d.yaml b/pydis_site/apps/resources/resources/panda3d.yaml new file mode 100644 index 00000000..286e8b27 --- /dev/null +++ b/pydis_site/apps/resources/resources/panda3d.yaml @@ -0,0 +1,23 @@ +description: Panda3D is a Python-focused 3-D framework for rapid development of games, + visualizations, and simulations, written in C++ with an emphasis on performance and flexibility. +title_image: http://www.panda3d.org/wp-content/uploads/2019/01/panda3d_logo.png +title_url: https://discord.gg/9XsucTT +position: 9 +urls: + - icon: branding/discord + url: https://discord.gg/9XsucTT + color: blurple + - icon: regular/link + url: https://www.panda3d.org/ + color: teal +tags: + topics: + - user interface + - game development + payment_tiers: + - free + complexity: + - beginner + - intermediate + type: + - community diff --git a/pydis_site/apps/resources/resources/people_postgres_data.yaml b/pydis_site/apps/resources/resources/people_postgres_data.yaml new file mode 100644 index 00000000..4f84cb99 --- /dev/null +++ b/pydis_site/apps/resources/resources/people_postgres_data.yaml @@ -0,0 +1,27 @@ +description: People, Postgres, Data specializes in building users of Postgres + and related ecosystem including but not limited to technologies such as RDS Postgres, + Aurora for Postgres, Google Postgres, PostgreSQL.Org Postgres, Greenplum, Timescale and ZomboDB. + They take a holistic approach to their community inviting not only technical topics but Professional Development + and Life in general including movies, games, books and travel. +title_image: https://media.discordapp.net/attachments/748954447857844318/750519488268730377/people_postgres_data.png +title_url: https://discord.gg/Ujw8m8v +urls: + - icon: branding/discord + url: https://discord.gg/Ujw8m8v + color: bluple + - icon: regular/link + url: https://postgresconf.org/ + color: teal + - icon: branding/reddit + url: https://reddit.com/r/postgresql + color: orangered +tags: + topics: + - databases + payment_tiers: + - free + complexity: + - beginner + - intermediate + type: + - community diff --git a/pydis_site/apps/resources/resources/podcast_dunder_init.yaml b/pydis_site/apps/resources/resources/podcast_dunder_init.yaml new file mode 100644 index 00000000..ee3028a3 --- /dev/null +++ b/pydis_site/apps/resources/resources/podcast_dunder_init.yaml @@ -0,0 +1,14 @@ +description: The podcast about Python and the people who make it great. Weekly long-form + interviews with the creators of notable Python packages. +name: Podcast.__init__ +title_url: https://www.podcastinit.com/ +tags: + topics: + - general + payment_tiers: + - free + complexity: + - beginner + - intermediate + type: + - podcast diff --git a/pydis_site/apps/resources/resources/podcasts/podcast_dunder_init.yaml b/pydis_site/apps/resources/resources/podcasts/podcast_dunder_init.yaml deleted file mode 100644 index c22d4a59..00000000 --- a/pydis_site/apps/resources/resources/podcasts/podcast_dunder_init.yaml +++ /dev/null @@ -1,13 +0,0 @@ -description: The podcast about Python and the people who make it great. Weekly long-form - interviews with the creators of notable Python packages. -name: Podcast.__init__ -title_url: https://www.podcastinit.com/ -position: 2 -tags: - topics: - - python - payment_tiers: - - free - complexity: - - beginner - - intermediate diff --git a/pydis_site/apps/resources/resources/podcasts/python_bytes.yaml b/pydis_site/apps/resources/resources/podcasts/python_bytes.yaml deleted file mode 100644 index 9112d1b7..00000000 --- a/pydis_site/apps/resources/resources/podcasts/python_bytes.yaml +++ /dev/null @@ -1,13 +0,0 @@ -description: A byte-sized podcast where Michael Kennedy and Brian Okken work through - this week's notable Python headlines. -name: Python Bytes -title_url: https://pythonbytes.fm/ -position: 1 -tags: - topics: - - python - payment_tiers: - - free - complexity: - - beginner - - intermediate diff --git a/pydis_site/apps/resources/resources/podcasts/talk_python_to_me.yaml b/pydis_site/apps/resources/resources/podcasts/talk_python_to_me.yaml deleted file mode 100644 index 8f63a0fb..00000000 --- a/pydis_site/apps/resources/resources/podcasts/talk_python_to_me.yaml +++ /dev/null @@ -1,13 +0,0 @@ -description: The essential weekly Python podcast. Michael Kennedy and a prominent - name within the Python community dive into a topic that relates to their experience. -name: Talk Python To Me -title_url: https://talkpython.fm/ -position: 0 -tags: - topics: - - python - payment_tiers: - - free - complexity: - - beginner - - intermediate diff --git a/pydis_site/apps/resources/resources/podcasts/test_and_code.yaml b/pydis_site/apps/resources/resources/podcasts/test_and_code.yaml deleted file mode 100644 index 5c3ff1e3..00000000 --- a/pydis_site/apps/resources/resources/podcasts/test_and_code.yaml +++ /dev/null @@ -1,14 +0,0 @@ -description: Brian Okken's weekly podcast on testing. Usually deals with Python, - but also covers many language-agnostic topics from the testing and DevOps world. -name: Test & Code -title_url: https://testandcode.com/ -position: 3 -tags: - topics: - - testing - - devops - payment_tiers: - - free - complexity: - - beginner - - intermediate diff --git a/pydis_site/apps/resources/resources/podcasts/the_real_python_podcast.yaml b/pydis_site/apps/resources/resources/podcasts/the_real_python_podcast.yaml deleted file mode 100644 index 48885f05..00000000 --- a/pydis_site/apps/resources/resources/podcasts/the_real_python_podcast.yaml +++ /dev/null @@ -1,15 +0,0 @@ -description: A weekly Python podcast hosted by Christopher Bailey with interviews, - coding tips, and conversation with guests from the Python community. - The show covers a wide range of topics including Python programming best practices, - career tips, and related software development topics. -name: The Real Python Podcast -title_url: https://realpython.com/podcasts/rpp/ -position: 4 -tags: - topics: - - python - payment_tiers: - - free - complexity: - - beginner - - intermediate diff --git a/pydis_site/apps/resources/resources/practical_python_programming.yaml b/pydis_site/apps/resources/resources/practical_python_programming.yaml new file mode 100644 index 00000000..85b3967a --- /dev/null +++ b/pydis_site/apps/resources/resources/practical_python_programming.yaml @@ -0,0 +1,18 @@ +description: Created and taught by David Beazley, + this course is a conversion of his instructor-led Python training course used for corporate training + and professional development. It has been in continual development since 2007 + and battle tested in real-world classrooms. Usually, it’s taught in-person over the span of three + or four days–requiring approximately 25-35 hours of intense work. + This includes the completion of approximately 130 hands-on coding exercises. +name: Practical Python Programming +title_url: https://dabeaz-course.github.io/practical-python/ +position: 4 +tags: + topics: + - general + payment_tiers: + - free + complexity: + - beginner + type: + - course diff --git a/pydis_site/apps/resources/resources/pycharm.yaml b/pydis_site/apps/resources/resources/pycharm.yaml new file mode 100644 index 00000000..1fda3bff --- /dev/null +++ b/pydis_site/apps/resources/resources/pycharm.yaml @@ -0,0 +1,14 @@ +description: The very best Python IDE, with a wealth of advanced features and convenience + functions. +name: PyCharm +title_url: https://www.jetbrains.com/pycharm/ +tags: + topics: + - general + payment_tiers: + - free + - paid + complexity: + - intermediate + type: + - tool diff --git a/pydis_site/apps/resources/resources/pyglet.yaml b/pydis_site/apps/resources/resources/pyglet.yaml new file mode 100644 index 00000000..1f74557f --- /dev/null +++ b/pydis_site/apps/resources/resources/pyglet.yaml @@ -0,0 +1,25 @@ +description: Pyglet is a powerful, + yet easy to use Python library for developing games and other visually-rich applications on Windows, + Mac OS X and Linux. It supports windowing, user interface event handling, Joysticks, OpenGL graphics, + loading images and videos, and playing sounds and music. All of this with a friendly Pythonic API, + that's simple to learn and doesn't get in your way. +title_image: https://i.imgur.com/LfQwXUe.png +title_url: https://discord.gg/QXyegWe +urls: + - icon: branding/discord + url: https://discord.gg/QXyegWe + color: blurple + - icon: regular/link + url: http://pyglet.org/ + color: teal +tags: + topics: + - user interface + - game development + payment_tiers: + - free + complexity: + - beginner + - intermediate + type: + - community diff --git a/pydis_site/apps/resources/resources/python_bytes.yaml b/pydis_site/apps/resources/resources/python_bytes.yaml new file mode 100644 index 00000000..578fff2e --- /dev/null +++ b/pydis_site/apps/resources/resources/python_bytes.yaml @@ -0,0 +1,15 @@ +description: A byte-sized podcast where Michael Kennedy and Brian Okken work through + this week's notable Python headlines. +name: Python Bytes +title_url: https://pythonbytes.fm/ +position: 1 +tags: + topics: + - general + payment_tiers: + - free + complexity: + - beginner + - intermediate + type: + - podcast diff --git a/pydis_site/apps/resources/resources/python_cheat_sheet.yaml b/pydis_site/apps/resources/resources/python_cheat_sheet.yaml new file mode 100644 index 00000000..9bec6d57 --- /dev/null +++ b/pydis_site/apps/resources/resources/python_cheat_sheet.yaml @@ -0,0 +1,13 @@ +description: A Python 3 cheat sheet with useful information and tips, as well as common + pitfalls for beginners. This is a PDF. +name: Python Cheat Sheet +title_url: https://perso.limsi.fr/pointal/_media/python:cours:mementopython3-english.pdf +tags: + topics: + - python + payment_tiers: + - free + complexity: + - beginner + type: + - tutorial diff --git a/pydis_site/apps/resources/resources/python_cookbook.yaml b/pydis_site/apps/resources/resources/python_cookbook.yaml new file mode 100644 index 00000000..0c4ffd99 --- /dev/null +++ b/pydis_site/apps/resources/resources/python_cookbook.yaml @@ -0,0 +1,23 @@ +description: A book full of very smart problem-solving recipes for various Python topics, + including moving from Python 2 to Python 3. +name: Python Cookbook +urls: +- icon: regular/link + url: http://shop.oreilly.com/product/0636920027072.do + color: teal +- icon: branding/goodreads + url: https://www.goodreads.com/book/show/17152735-python-cookbook + color: goodreads-cream +- icon: branding/github + url: https://github.com/dabeaz/python-cookbook + color: black +tags: + topics: + - general + - software design + payment_tiers: + - paid + complexity: + - intermediate + type: + - book diff --git a/pydis_site/apps/resources/resources/python_crash_course.yaml b/pydis_site/apps/resources/resources/python_crash_course.yaml new file mode 100644 index 00000000..41f0973d --- /dev/null +++ b/pydis_site/apps/resources/resources/python_crash_course.yaml @@ -0,0 +1,29 @@ +description: "This fast-paced, thorough introduction to programming with Python will have you writing programs, + solving problems, and making things that work in no time. + In the first half of the book, you’ll learn basic programming concepts, such as variables, lists, classes, and loops, + and practice writing clean code with exercises for each topic. + You’ll also learn how to make your programs interactive and test your code safely before adding it to a project. + In the second half, you’ll put your new knowledge into practice with three substantial projects: + a Space Invaders–inspired arcade game, a set of data visualizations with Python’s handy libraries, + and a simple web app you can deploy online." +name: Python Crash Course +urls: + - icon: regular/link + url: https://nostarch.com/pythoncrashcourse2e + color: teal + - icon: branding/goodreads + url: https://www.goodreads.com/book/show/23241059-python-crash-course + color: goodreads-cream + - icon: branding/github + url: https://ehmatthes.github.io/pcc/ + color: black +tags: + topics: + - general + - game development + payment_tiers: + - paid + complexity: + - beginner + type: + - book diff --git a/pydis_site/apps/resources/resources/python_developer_guide.yaml b/pydis_site/apps/resources/resources/python_developer_guide.yaml new file mode 100644 index 00000000..f17c88ce --- /dev/null +++ b/pydis_site/apps/resources/resources/python_developer_guide.yaml @@ -0,0 +1,13 @@ +description: This guide is a comprehensive resource for contributing to Python – for both new and experienced contributors. + It is maintained by the same community that maintains Python. +name: Python Developer's Guide +title_url: https://devguide.python.org/ +tags: + topics: + - general + payment_tiers: + - free + complexity: + - intermediate + type: + - tutorial diff --git a/pydis_site/apps/resources/resources/python_discord_videos.yaml b/pydis_site/apps/resources/resources/python_discord_videos.yaml new file mode 100644 index 00000000..2a8fed08 --- /dev/null +++ b/pydis_site/apps/resources/resources/python_discord_videos.yaml @@ -0,0 +1,19 @@ +description: It's our channel! We are slowly gathering content here directly related to Python, + our community and the events we host. Come check us out! +title_image: https://raw.githubusercontent.com/python-discord/branding/master/logos/logo_banner/logo_site_banner_dark_512.png +position: 2 +urls: + - icon: branding/youtube + url: https://www.youtube.com/pythondiscord + color: youtube-red +tags: + topics: + - general + - software design + payment_tiers: + - free + complexity: + - beginner + - intermediate + type: + - video diff --git a/pydis_site/apps/resources/resources/python_morsels.yaml b/pydis_site/apps/resources/resources/python_morsels.yaml new file mode 100644 index 00000000..de02be7f --- /dev/null +++ b/pydis_site/apps/resources/resources/python_morsels.yaml @@ -0,0 +1,19 @@ +description: 'Learn to write more idiomatic Python code with deliberate practice! + + + Sign up for this service and receive one short Python exercise every week. After + you attempt to work through the exercise, you''ll receive a number of solutions + to the exercise with explanations of each one. Each exercise will include automated + tests and some may include bonuses for a little more of a challenge!' +name: Python Morsels +title_url: https://www.pythonmorsels.com/ +tags: + topics: + - general + - software design + payment_tiers: + - subscription + complexity: + - intermediate + type: + - interactive diff --git a/pydis_site/apps/resources/resources/python_subreddit.yaml b/pydis_site/apps/resources/resources/python_subreddit.yaml new file mode 100644 index 00000000..ef9f23d9 --- /dev/null +++ b/pydis_site/apps/resources/resources/python_subreddit.yaml @@ -0,0 +1,16 @@ +description: News about the Python programming language, and language-related discussion. +name: r/Python +title_icon: branding/reddit +title_icon_color: orangered +title_url: https://www.reddit.com/r/Python/ +position: 0 +tags: + topics: + - general + payment_tiers: + - free + complexity: + - beginner + - intermediate + type: + - community diff --git a/pydis_site/apps/resources/resources/python_tricks.yaml b/pydis_site/apps/resources/resources/python_tricks.yaml new file mode 100644 index 00000000..6d857a9d --- /dev/null +++ b/pydis_site/apps/resources/resources/python_tricks.yaml @@ -0,0 +1,21 @@ +description: Full of useful Python tips, tricks and features. Get this if you have + a good grasp of the basics and want to take your Python skills to the next level, + or are a experienced programmer looking to add to your toolbelt. +name: Python Tricks +urls: +- icon: regular/link + url: https://realpython.com/products/python-tricks-book/ + color: teal +- icon: branding/goodreads + url: https://www.goodreads.com/book/show/36990732-python-tricks + color: goodreads-cream +tags: + topics: + - general + - software design + payment_tiers: + - paid + complexity: + - intermediate + type: + - book diff --git a/pydis_site/apps/resources/resources/python_tutor.yaml b/pydis_site/apps/resources/resources/python_tutor.yaml new file mode 100644 index 00000000..4f6d5130 --- /dev/null +++ b/pydis_site/apps/resources/resources/python_tutor.yaml @@ -0,0 +1,14 @@ +description: Write Python code in your web browser, and see it visualized step by step. +name: Python Tutor +title_url: https://www.pythontutor.com/ +tags: + topics: + - general + payment_tiers: + - free + complexity: + - beginner + - intermediate + type: + - tool + - interactive diff --git a/pydis_site/apps/resources/resources/reading/books/automate_the_boring_stuff.yaml b/pydis_site/apps/resources/resources/reading/books/automate_the_boring_stuff.yaml deleted file mode 100644 index 9fc5a66c..00000000 --- a/pydis_site/apps/resources/resources/reading/books/automate_the_boring_stuff.yaml +++ /dev/null @@ -1,23 +0,0 @@ -description: One of the best books out there for Python beginners. This book will - teach you the basics of Python, while also teaching invaluable automation tools - and techniques for solving common problems. You'll learn how to go about scraping - the web, manipulating files and automating keyboard and mouse input. Ideal for an - office worker who wants to make himself more useful. -name: Automate the Boring Stuff with Python -position: 2 -urls: -- icon: regular/book - url: https://automatetheboringstuff.com/ - color: black -- icon: branding/goodreads - url: https://www.goodreads.com/book/show/22514127-automate-the-boring-stuff-with-python - color: goodreads-cream -tags: - topics: - - python - - automation - payment_tiers: - - free - - paid - complexity: - - beginner diff --git a/pydis_site/apps/resources/resources/reading/books/byte_of_python.yaml b/pydis_site/apps/resources/resources/reading/books/byte_of_python.yaml deleted file mode 100644 index 9590883c..00000000 --- a/pydis_site/apps/resources/resources/reading/books/byte_of_python.yaml +++ /dev/null @@ -1,23 +0,0 @@ -description: A free book on programming using the Python language. - It serves as a tutorial or guide to the Python language for a beginner audience. - If all you know about computers is how to save text files, then this is the book for you. -name: A Byte of Python -position: 1 -urls: -- icon: regular/link - url: https://python.swaroopch.com/ - color: teal -- icon: regular/book - url: http://www.lulu.com/shop/swaroop-c-h/a-byte-of-python/paperback/product-21142968.html - color: black -- icon: branding/goodreads - url: https://www.goodreads.com/book/show/6762544-a-byte-of-python - color: goodreads-cream -tags: - topics: - - python - payment_tiers: - - free - - paid - complexity: - - beginner diff --git a/pydis_site/apps/resources/resources/reading/books/effective_python.yaml b/pydis_site/apps/resources/resources/reading/books/effective_python.yaml deleted file mode 100644 index 2526e0e1..00000000 --- a/pydis_site/apps/resources/resources/reading/books/effective_python.yaml +++ /dev/null @@ -1,22 +0,0 @@ -description: A book that gives 90 best practices for writing excellent Python. Great - for intermediates. -name: Effective Python -position: 3 -urls: -- icon: regular/link - url: https://effectivepython.com/ - color: teal -- icon: branding/goodreads - url: https://www.goodreads.com/book/show/48566725-effective-python - color: goodreads-cream -- icon: branding/github - url: https://github.com/bslatkin/effectivepython - color: black -tags: - topics: - - python - - best practices - payment_tiers: - - paid - complexity: - - intermediate diff --git a/pydis_site/apps/resources/resources/reading/books/flask_web_development.yaml b/pydis_site/apps/resources/resources/reading/books/flask_web_development.yaml deleted file mode 100644 index 1dad7978..00000000 --- a/pydis_site/apps/resources/resources/reading/books/flask_web_development.yaml +++ /dev/null @@ -1,22 +0,0 @@ -description: A comprehensive Flask walkthrough that has you building a complete social - blogging application from scratch. -name: Flask Web Development -position: 6 -urls: -- icon: regular/link - url: http://shop.oreilly.com/product/0636920031116.do - color: teal -- icon: branding/goodreads - url: https://www.goodreads.com/book/show/18774655-flask-web-development - color: goodreads-cream -- icon: branding/github - url: https://github.com/miguelgrinberg/flasky - color: black -tags: - topics: - - web development - payment_tiers: - - paid - complexity: - - beginner - - intermediate diff --git a/pydis_site/apps/resources/resources/reading/books/fluent_python.yaml b/pydis_site/apps/resources/resources/reading/books/fluent_python.yaml deleted file mode 100644 index c319d473..00000000 --- a/pydis_site/apps/resources/resources/reading/books/fluent_python.yaml +++ /dev/null @@ -1,22 +0,0 @@ -description: A veritable tome of intermediate and advanced Python information. A must-read - for any Python professional. By far the most recommended book for intermediates. -name: Fluent Python -position: 7 -urls: -- icon: regular/link - url: https://www.oreilly.com/library/view/fluent-python/9781491946237/ - color: teal -- icon: branding/goodreads - url: https://www.goodreads.com/book/show/22800567-fluent-python - color: goodreads-cream -- icon: branding/github - url: https://github.com/fluentpython - color: black -tags: - topics: - - python - - best practices - payment_tiers: - - paid - complexity: - - intermediate diff --git a/pydis_site/apps/resources/resources/reading/books/hitchhikers_guide_to_python.yaml b/pydis_site/apps/resources/resources/reading/books/hitchhikers_guide_to_python.yaml deleted file mode 100644 index fc98c8ba..00000000 --- a/pydis_site/apps/resources/resources/reading/books/hitchhikers_guide_to_python.yaml +++ /dev/null @@ -1,20 +0,0 @@ -description: A best practice handbook for both novice and expert Python developers to the installation, - configuration, and usage of Python on a daily basis. -name: The Hitchhiker's Guide to Python -position: 0 -urls: -- icon: regular/link - url: https://python-guide.org/ - color: teal -- icon: branding/goodreads - url: https://www.goodreads.com/book/show/28321007-the-hitchhiker-s-guide-to-python - color: goodreads-cream -tags: - topics: - - python - - soft skills - payment_tiers: - - paid - complexity: - - beginner - - intermediate diff --git a/pydis_site/apps/resources/resources/reading/books/inferential_thinking.yaml b/pydis_site/apps/resources/resources/reading/books/inferential_thinking.yaml deleted file mode 100644 index f1ac2b3c..00000000 --- a/pydis_site/apps/resources/resources/reading/books/inferential_thinking.yaml +++ /dev/null @@ -1,18 +0,0 @@ -description: Inferential Thinking is the textbook for the Foundations of Data Science course at UC Berkley. - It introduces you the fundamentals of both Data Science and Python at a level accessible to all. - It is available both through your browser and in PDF form. -name: Inferential Thinking -position: 13 -urls: - - icon: regular/link - url: https://inferentialthinking.com/chapters/intro - color: teal -tags: - topics: - - data science - - python - payment_tiers: - - free - complexity: - - beginner - - intermediate diff --git a/pydis_site/apps/resources/resources/reading/books/mission_python.yaml b/pydis_site/apps/resources/resources/reading/books/mission_python.yaml deleted file mode 100644 index ab97e9ee..00000000 --- a/pydis_site/apps/resources/resources/reading/books/mission_python.yaml +++ /dev/null @@ -1,21 +0,0 @@ -description: Learn programming and Python while building a complete and awesome space-themed - game using cutting-edge Python 3.6 and Pygame Zero. Extensive use of code examples, - images, and walk-throughs make this a pleasure to both read and follow along. Excellent - book for beginners. -name: Mission Python -position: 5 -urls: -- icon: regular/link - url: https://www.sean.co.uk/books/mission-python/index.shtm - color: teal -- icon: branding/goodreads - url: https://www.goodreads.com/book/show/35545850-mission-python - color: goodreads-cream -tags: - topics: - - python - - game development - payment_tiers: - - paid - complexity: - - beginner diff --git a/pydis_site/apps/resources/resources/reading/books/neural_networks_from_scratch_in_python.yaml b/pydis_site/apps/resources/resources/reading/books/neural_networks_from_scratch_in_python.yaml deleted file mode 100644 index c6a51755..00000000 --- a/pydis_site/apps/resources/resources/reading/books/neural_networks_from_scratch_in_python.yaml +++ /dev/null @@ -1,21 +0,0 @@ -description: '"Neural Networks From Scratch" is a book intended to teach you how to build neural networks on your own, - without any libraries, so you can better understand deep learning and how all of the elements work. - This is so you can go out and do new/novel things with deep learning as well as to become more successful with even more basic models. - This book is to accompany the usual free tutorial videos and sample code from youtube.com/sentdex.' -name: Neural Networks from Scratch in Python -position: 11 -urls: - - icon: regular/link - url: https://nnfs.io/ - color: teal - - icon: branding/goodreads - url: https://www.goodreads.com/book/show/55927899-neural-networks-from-scratch-in-python - color: goodreads-cream -tags: - topics: - - neural networks - - machine learning - payment_tiers: - - paid - complexity: - - intermediate diff --git a/pydis_site/apps/resources/resources/reading/books/python_cookbook.yaml b/pydis_site/apps/resources/resources/reading/books/python_cookbook.yaml deleted file mode 100644 index 0ae8460e..00000000 --- a/pydis_site/apps/resources/resources/reading/books/python_cookbook.yaml +++ /dev/null @@ -1,21 +0,0 @@ -description: A book full of very smart problem-solving recipes for various Python topics, - including moving from Python 2 to Python 3. -name: Python Cookbook -position: 8 -urls: -- icon: regular/link - url: http://shop.oreilly.com/product/0636920027072.do - color: teal -- icon: branding/goodreads - url: https://www.goodreads.com/book/show/17152735-python-cookbook - color: goodreads-cream -- icon: branding/github - url: https://github.com/dabeaz/python-cookbook - color: black -tags: - topics: - - python - payment_tiers: - - paid - complexity: - - intermediate diff --git a/pydis_site/apps/resources/resources/reading/books/python_crash_course.yaml b/pydis_site/apps/resources/resources/reading/books/python_crash_course.yaml deleted file mode 100644 index 981ca1c8..00000000 --- a/pydis_site/apps/resources/resources/reading/books/python_crash_course.yaml +++ /dev/null @@ -1,28 +0,0 @@ -description: "This fast-paced, thorough introduction to programming with Python will have you writing programs, - solving problems, and making things that work in no time. - In the first half of the book, you’ll learn basic programming concepts, such as variables, lists, classes, and loops, - and practice writing clean code with exercises for each topic. - You’ll also learn how to make your programs interactive and test your code safely before adding it to a project. - In the second half, you’ll put your new knowledge into practice with three substantial projects: - a Space Invaders–inspired arcade game, a set of data visualizations with Python’s handy libraries, - and a simple web app you can deploy online." -name: Python Crash Course -position: 12 -urls: - - icon: regular/link - url: https://nostarch.com/pythoncrashcourse2e - color: teal - - icon: branding/goodreads - url: https://www.goodreads.com/book/show/23241059-python-crash-course - color: goodreads-cream - - icon: branding/github - url: https://ehmatthes.github.io/pcc/ - color: black -tags: - topics: - - python - - game development - payment_tiers: - - paid - complexity: - - beginner diff --git a/pydis_site/apps/resources/resources/reading/books/python_tricks.yaml b/pydis_site/apps/resources/resources/reading/books/python_tricks.yaml deleted file mode 100644 index 01707bb8..00000000 --- a/pydis_site/apps/resources/resources/reading/books/python_tricks.yaml +++ /dev/null @@ -1,21 +0,0 @@ -description: Full of useful Python tips, tricks and features. Get this if you have - a good grasp of the basics and want to take your Python skills to the next level, - or are a experienced programmer looking to add to your toolbelt. -name: Python Tricks -position: 4 -urls: -- icon: regular/link - url: https://realpython.com/products/python-tricks-book/ - color: teal -- icon: branding/goodreads - url: https://www.goodreads.com/book/show/36990732-python-tricks - color: goodreads-cream -tags: - topics: - - python - - best practices - - soft skills - payment_tiers: - - paid - complexity: - - intermediate diff --git a/pydis_site/apps/resources/resources/reading/books/think_python.yaml b/pydis_site/apps/resources/resources/reading/books/think_python.yaml deleted file mode 100644 index a996ede5..00000000 --- a/pydis_site/apps/resources/resources/reading/books/think_python.yaml +++ /dev/null @@ -1,24 +0,0 @@ -description: Think Python is an introduction to Python programming for beginners. - It starts with basic concepts of programming, - and is carefully designed to define all terms when they are first used and to develop each new concept in a logical progression. - Larger pieces, like recursion and object-oriented programming are divided into a sequence of smaller steps - and introduced over the course of several chapters. -name: Think Python -position: 10 -urls: - - icon: regular/link - url: https://greenteapress.com/wp/think-python-2e/ - color: teal - - icon: branding/goodreads - url: https://www.goodreads.com/book/show/14514306-think-python - color: goodreads-cream - - icon: branding/github - url: https://github.com/AllenDowney/ThinkPython2 - color: black -tags: - topics: - - python - payment_tiers: - - paid - complexity: - - beginner diff --git a/pydis_site/apps/resources/resources/reading/books/two_scoops_of_django.yaml b/pydis_site/apps/resources/resources/reading/books/two_scoops_of_django.yaml deleted file mode 100644 index 10a9d11d..00000000 --- a/pydis_site/apps/resources/resources/reading/books/two_scoops_of_django.yaml +++ /dev/null @@ -1,21 +0,0 @@ -description: Tips, tricks, and best practices for your Django project. - A highly recommended resource for Django web developers. -name: Two Scoops of Django -position: 9 -urls: -- icon: regular/book - url: https://www.feldroy.com/collections/everything/products/two-scoops-of-django-3-x - color: teal -- icon: branding/goodreads - url: https://www.goodreads.com/book/show/55822151-two-scoops-of-django-3-x - color: goodreads-cream -- icon: branding/github - url: https://github.com/twoscoops/two-scoops-of-django-2.0-code-examples - color: black -tags: - topics: - - web development - payment_tiers: - - paid - complexity: - - intermediate diff --git a/pydis_site/apps/resources/resources/reading/tutorials/getting_started_with_kivy.yaml b/pydis_site/apps/resources/resources/reading/tutorials/getting_started_with_kivy.yaml deleted file mode 100644 index 00b5d459..00000000 --- a/pydis_site/apps/resources/resources/reading/tutorials/getting_started_with_kivy.yaml +++ /dev/null @@ -1,13 +0,0 @@ -description: A big list of excellent resources for getting started making Kivy applications. -name: Getting Started with Kivy -title_url: https://blog.kivy.org/2019/12/getting-started-with-kivy/ -icon_image: https://raw.githubusercontent.com/kivy/kivy-website/master/logos/kivy-logo-black-256.png -position: 3 -tags: - topics: - - user interface - - game development - payment_tiers: - - free - complexity: - - beginner diff --git a/pydis_site/apps/resources/resources/reading/tutorials/getting_started_with_python_for_non_programmers.yaml b/pydis_site/apps/resources/resources/reading/tutorials/getting_started_with_python_for_non_programmers.yaml deleted file mode 100644 index 3b89c4ac..00000000 --- a/pydis_site/apps/resources/resources/reading/tutorials/getting_started_with_python_for_non_programmers.yaml +++ /dev/null @@ -1,12 +0,0 @@ -description: A list of beginner resources for programmers with no prior developer experience, - from Python's official guide. -name: Getting Started with Python for Non-Programmers -title_url: https://wiki.python.org/moin/BeginnersGuide/NonProgrammers -position: 1 -tags: - topics: - - python - payment_tiers: - - free - complexity: - - beginner diff --git a/pydis_site/apps/resources/resources/reading/tutorials/getting_started_with_python_for_programmers.yaml b/pydis_site/apps/resources/resources/reading/tutorials/getting_started_with_python_for_programmers.yaml deleted file mode 100644 index e369834d..00000000 --- a/pydis_site/apps/resources/resources/reading/tutorials/getting_started_with_python_for_programmers.yaml +++ /dev/null @@ -1,12 +0,0 @@ -description: A list of beginner resources for programmers coming from other languages, - from Python's official guide. -name: Getting Started with Python for Programmers -title_url: https://wiki.python.org/moin/BeginnersGuide/Programmers -position: 0 -tags: - topics: - - python - payment_tiers: - - free - complexity: - - intermediate diff --git a/pydis_site/apps/resources/resources/reading/tutorials/python_cheat_sheet.yaml b/pydis_site/apps/resources/resources/reading/tutorials/python_cheat_sheet.yaml deleted file mode 100644 index 3162f048..00000000 --- a/pydis_site/apps/resources/resources/reading/tutorials/python_cheat_sheet.yaml +++ /dev/null @@ -1,12 +0,0 @@ -description: A Python 3 cheat sheet with useful information and tips, as well as common - pitfalls for beginners. This is a PDF. -name: Python Cheat Sheet -title_url: https://perso.limsi.fr/pointal/_media/python:cours:mementopython3-english.pdf -position: 6 -tags: - topics: - - python - payment_tiers: - - free - complexity: - - beginner diff --git a/pydis_site/apps/resources/resources/reading/tutorials/python_developer_guide.yaml b/pydis_site/apps/resources/resources/reading/tutorials/python_developer_guide.yaml deleted file mode 100644 index fb9b2db5..00000000 --- a/pydis_site/apps/resources/resources/reading/tutorials/python_developer_guide.yaml +++ /dev/null @@ -1,13 +0,0 @@ -description: This guide is a comprehensive resource for contributing to Python – for both new and experienced contributors. - It is maintained by the same community that maintains Python. -name: Python Developer's Guide -title_url: https://devguide.python.org/ -position: 2 -tags: - topics: - - cpython - - open source - payment_tiers: - - free - complexity: - - intermediate diff --git a/pydis_site/apps/resources/resources/reading/tutorials/simple_guide_to_git.yaml b/pydis_site/apps/resources/resources/reading/tutorials/simple_guide_to_git.yaml deleted file mode 100644 index 8857e151..00000000 --- a/pydis_site/apps/resources/resources/reading/tutorials/simple_guide_to_git.yaml +++ /dev/null @@ -1,13 +0,0 @@ -description: A simple, no-nonsense guide to the basics of using Git. -name: A Simple Guide to Git -title_url: http://rogerdudler.github.io/git-guide/ -title_icon: branding/github -title_icon_color: black -position: 4 -tags: - topics: - - version control - payment_tiers: - - free - complexity: - - beginner diff --git a/pydis_site/apps/resources/resources/reading/tutorials/the_flask_mega_tutorial.yaml b/pydis_site/apps/resources/resources/reading/tutorials/the_flask_mega_tutorial.yaml deleted file mode 100644 index c98d8ea2..00000000 --- a/pydis_site/apps/resources/resources/reading/tutorials/the_flask_mega_tutorial.yaml +++ /dev/null @@ -1,12 +0,0 @@ -description: Miguel Grinberg's fully featured mega-tutorial for learning how to create web applications with the Flask framework. -name: The Flask Mega-Tutorial -title_url: https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world -position: 5 -tags: - topics: - - web development - payment_tiers: - - free - complexity: - - beginner - - intermediate diff --git a/pydis_site/apps/resources/resources/reading/tutorials/wtf_python.yaml b/pydis_site/apps/resources/resources/reading/tutorials/wtf_python.yaml deleted file mode 100644 index 916486b9..00000000 --- a/pydis_site/apps/resources/resources/reading/tutorials/wtf_python.yaml +++ /dev/null @@ -1,17 +0,0 @@ -description: Python, being a beautifully designed high-level and interpreter-based programming language, - provides us with many features for the programmer's comfort. - But sometimes, the outcomes of a Python snippet may not seem obvious at first sight. - Here's a fun project attempting to explain what exactly is happening under the hood for some counter-intuitive snippets - and lesser-known features in Python. -name: WTF Python -title_url: https://github.com/satwikkansal/wtfpython -position: 7 -tags: - topics: - - python - - best practices - - esoteric - payment_tiers: - - free - complexity: - - intermediate diff --git a/pydis_site/apps/resources/resources/real_python.yaml b/pydis_site/apps/resources/resources/real_python.yaml new file mode 100644 index 00000000..36d8db7f --- /dev/null +++ b/pydis_site/apps/resources/resources/real_python.yaml @@ -0,0 +1,22 @@ +description: Dan Bader's treasure trove of quizzes, tutorials and interactive content for learning Python. + An absolute goldmine. +title_image: https://i.imgur.com/WDqhZ36.png +title_url: https://realpython.com/ +position: 3 +urls: + - icon: regular/link + url: https://realpython.com/ + color: teal + - icon: branding/youtube + url: https://www.youtube.com/channel/UCI0vQvr9aFn27yR6Ej6n5UA + color: youtube-red +tags: + topics: + - general + payment_tiers: + - free + complexity: + - beginner + - intermediate + type: + - community diff --git a/pydis_site/apps/resources/resources/repl_it.yaml b/pydis_site/apps/resources/resources/repl_it.yaml new file mode 100644 index 00000000..e1ba1d19 --- /dev/null +++ b/pydis_site/apps/resources/resources/repl_it.yaml @@ -0,0 +1,14 @@ +description: A free, collaborative, in-browser IDE to code in 50+ languages — + without spending a second on setup. +name: repl.it +title_url: https://repl.it/ +tags: + topics: + - general + payment_tiers: + - free + complexity: + - beginner + - intermediate + type: + - tool diff --git a/pydis_site/apps/resources/resources/screen_readers.yaml b/pydis_site/apps/resources/resources/screen_readers.yaml new file mode 100644 index 00000000..9673a132 --- /dev/null +++ b/pydis_site/apps/resources/resources/screen_readers.yaml @@ -0,0 +1,17 @@ +description: Screen readers are software programs that allow blind + or visually impaired users to read the text displayed on a computer screen with a speech synthesizer or braille display. + There are many different screen reader program options, + with this link describing many of them and their capabilities. +name: Screen Readers - American Foundation for the Blind +title_url: https://www.afb.org/blindness-and-low-vision/using-technology/assistive-technology-products/screen-readers +tags: + topics: + - other + payment_tiers: + - free + - paid + complexity: + - beginner + - intermediate + type: + - tool diff --git a/pydis_site/apps/resources/resources/sentdex.yaml b/pydis_site/apps/resources/resources/sentdex.yaml new file mode 100644 index 00000000..21acd4e9 --- /dev/null +++ b/pydis_site/apps/resources/resources/sentdex.yaml @@ -0,0 +1,34 @@ +description: 'An enormous amount of Python content for all skill levels + from the most popular Python YouTuber on the web. + + Check out his channel for more video series! + ' +title_image: https://i.imgur.com/kJgWZIu.png +position: 1 +urls: + - icon: branding/youtube + url: https://www.youtube.com/user/sentdex + color: youtube-red + - icon: branding/discord + url: https://discord.gg/sentdex + color: blurple + - icon: regular/link + url: https://pythonprogramming.net/ + color: teal +tags: + topics: + - general + - user interface + - data science + payment_tiers: + - free + complexity: + - beginner + - intermediate + type: + - video diff --git a/pydis_site/apps/resources/resources/simple_guide_to_git.yaml b/pydis_site/apps/resources/resources/simple_guide_to_git.yaml new file mode 100644 index 00000000..144b6c70 --- /dev/null +++ b/pydis_site/apps/resources/resources/simple_guide_to_git.yaml @@ -0,0 +1,14 @@ +description: A simple, no-nonsense guide to the basics of using Git. +name: A Simple Guide to Git +title_url: http://rogerdudler.github.io/git-guide/ +title_icon: branding/github +title_icon_color: black +tags: + topics: + - tooling + payment_tiers: + - free + complexity: + - beginner + type: + - tutorial diff --git a/pydis_site/apps/resources/resources/sololearn.yaml b/pydis_site/apps/resources/resources/sololearn.yaml new file mode 100644 index 00000000..637a58b8 --- /dev/null +++ b/pydis_site/apps/resources/resources/sololearn.yaml @@ -0,0 +1,17 @@ +description: SoloLearn's Python 3 course serves as a simple and convenient introduction to Python. + Containing exercises and quizzes in modules to cover introductory subjects of the language, + you can pick it up and put it down between your busier aspects of life thanks to both PC + and mobile apps being available to use. +name: SoloLearn +title_url: https://www.sololearn.com/Course/Python/ +tags: + topics: + - general + payment_tiers: + - free + - subscription + complexity: + - beginner + type: + - interactive + - course \ No newline at end of file diff --git a/pydis_site/apps/resources/resources/spyder.yaml b/pydis_site/apps/resources/resources/spyder.yaml new file mode 100644 index 00000000..8dc05542 --- /dev/null +++ b/pydis_site/apps/resources/resources/spyder.yaml @@ -0,0 +1,14 @@ +description: The Scientific Python Development Environment. + Simpler and lighter than PyCharm, but still packs a punch. +name: Spyder +title_url: https://www.spyder-ide.org/ +tags: + topics: + - data science + payment_tiers: + - free + complexity: + - beginner + - intermediate + type: + - tool diff --git a/pydis_site/apps/resources/resources/sublime_text.yaml b/pydis_site/apps/resources/resources/sublime_text.yaml new file mode 100644 index 00000000..76aeac45 --- /dev/null +++ b/pydis_site/apps/resources/resources/sublime_text.yaml @@ -0,0 +1,14 @@ +description: A powerful Python-backed editor with great community support and a wealth + of extensions. +name: Sublime Text +title_url: https://www.sublimetext.com/ +tags: + topics: + - general + payment_tiers: + - free + complexity: + - beginner + - intermediate + type: + - tool diff --git a/pydis_site/apps/resources/resources/talk_python_to_me.yaml b/pydis_site/apps/resources/resources/talk_python_to_me.yaml new file mode 100644 index 00000000..ec7df8b5 --- /dev/null +++ b/pydis_site/apps/resources/resources/talk_python_to_me.yaml @@ -0,0 +1,14 @@ +description: The essential weekly Python podcast. Michael Kennedy and a prominent + name within the Python community dive into a topic that relates to their experience. +name: Talk Python To Me +title_url: https://talkpython.fm/ +tags: + topics: + - python + payment_tiers: + - free + complexity: + - beginner + - intermediate + type: + - podcast diff --git a/pydis_site/apps/resources/resources/talon_voice.yaml b/pydis_site/apps/resources/resources/talon_voice.yaml new file mode 100644 index 00000000..0f28a328 --- /dev/null +++ b/pydis_site/apps/resources/resources/talon_voice.yaml @@ -0,0 +1,15 @@ +description: Talon is a tool being built that aims to bring programming, + realtime video gaming, command line, and full desktop computer proficiency to people + who have limited or no use of their hands. +name: Talon Voice +title_url: https://talonvoice.com/ +tags: + topics: + - other + payment_tiers: + - free + complexity: + - beginner + - intermediate + type: + - tool diff --git a/pydis_site/apps/resources/resources/test_and_code.yaml b/pydis_site/apps/resources/resources/test_and_code.yaml new file mode 100644 index 00000000..efe0c218 --- /dev/null +++ b/pydis_site/apps/resources/resources/test_and_code.yaml @@ -0,0 +1,15 @@ +description: Brian Okken's weekly podcast on testing. Usually deals with Python, + but also covers many language-agnostic topics from the testing and DevOps world. +name: Test & Code +title_url: https://testandcode.com/ +tags: + topics: + - testing + - tooling + payment_tiers: + - free + complexity: + - beginner + - intermediate + type: + - podcast diff --git a/pydis_site/apps/resources/resources/the_flask_mega_tutorial.yaml b/pydis_site/apps/resources/resources/the_flask_mega_tutorial.yaml new file mode 100644 index 00000000..514da947 --- /dev/null +++ b/pydis_site/apps/resources/resources/the_flask_mega_tutorial.yaml @@ -0,0 +1,13 @@ +description: Miguel Grinberg's fully featured mega-tutorial for learning how to create web applications with the Flask framework. +name: The Flask Mega-Tutorial +title_url: https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world +tags: + topics: + - web development + payment_tiers: + - free + complexity: + - beginner + - intermediate + type: + - tutorial diff --git a/pydis_site/apps/resources/resources/the_real_python_podcast.yaml b/pydis_site/apps/resources/resources/the_real_python_podcast.yaml new file mode 100644 index 00000000..62ba32ce --- /dev/null +++ b/pydis_site/apps/resources/resources/the_real_python_podcast.yaml @@ -0,0 +1,16 @@ +description: A weekly Python podcast hosted by Christopher Bailey with interviews, + coding tips, and conversation with guests from the Python community. + The show covers a wide range of topics including Python programming best practices, + career tips, and related software development topics. +name: The Real Python Podcast +title_url: https://realpython.com/podcasts/rpp/ +tags: + topics: + - general + payment_tiers: + - free + complexity: + - beginner + - intermediate + type: + - podcast diff --git a/pydis_site/apps/resources/resources/think_python.yaml b/pydis_site/apps/resources/resources/think_python.yaml new file mode 100644 index 00000000..472324c5 --- /dev/null +++ b/pydis_site/apps/resources/resources/think_python.yaml @@ -0,0 +1,26 @@ +description: Think Python is an introduction to Python programming for beginners. + It starts with basic concepts of programming, + and is carefully designed to define all terms when they are first used and to develop each new concept in a logical progression. + Larger pieces, like recursion and object-oriented programming are divided into a sequence of smaller steps + and introduced over the course of several chapters. +name: Think Python +urls: + - icon: regular/link + url: https://greenteapress.com/wp/think-python-2e/ + color: teal + - icon: branding/goodreads + url: https://www.goodreads.com/book/show/14514306-think-python + color: goodreads-cream + - icon: branding/github + url: https://github.com/AllenDowney/ThinkPython2 + color: black +tags: + topics: + - general + - software design + payment_tiers: + - paid + complexity: + - beginner + type: + - book diff --git a/pydis_site/apps/resources/resources/thonny.yaml b/pydis_site/apps/resources/resources/thonny.yaml new file mode 100644 index 00000000..7b9447f5 --- /dev/null +++ b/pydis_site/apps/resources/resources/thonny.yaml @@ -0,0 +1,14 @@ +description: A Python IDE specifially aimed at learning programming. Has a lot of + helpful features to help you understand your code. +name: Thonny +title_url: https://thonny.org/ +position: 2 +tags: + topics: + - general + payment_tiers: + - free + complexity: + - beginner + type: + - tool \ No newline at end of file diff --git a/pydis_site/apps/resources/resources/tools/accessibility/screen_readers.yaml b/pydis_site/apps/resources/resources/tools/accessibility/screen_readers.yaml deleted file mode 100644 index 0f44cfbb..00000000 --- a/pydis_site/apps/resources/resources/tools/accessibility/screen_readers.yaml +++ /dev/null @@ -1,11 +0,0 @@ -description: Screen readers are software programs that allow blind - or visually impaired users to read the text displayed on a computer screen with a speech synthesizer or braille display. - There are many different screen reader program options, - with this link describing many of them and their capabilities. -name: Screen Readers - American Foundation for the Blind -title_url: https://www.afb.org/blindness-and-low-vision/using-technology/assistive-technology-products/screen-readers -position: 1 -tags: - payment_tiers: - - free - - paid diff --git a/pydis_site/apps/resources/resources/tools/accessibility/talon_voice.yaml b/pydis_site/apps/resources/resources/tools/accessibility/talon_voice.yaml deleted file mode 100644 index 0c99e33d..00000000 --- a/pydis_site/apps/resources/resources/tools/accessibility/talon_voice.yaml +++ /dev/null @@ -1,9 +0,0 @@ -description: Talon is a tool being built that aims to bring programming, - realtime video gaming, command line, and full desktop computer proficiency to people - who have limited or no use of their hands. -name: Talon Voice -title_url: https://talonvoice.com/ -position: 0 -tags: - payment_tiers: - - free diff --git a/pydis_site/apps/resources/resources/tools/editors/atom.yaml b/pydis_site/apps/resources/resources/tools/editors/atom.yaml deleted file mode 100644 index f11a13c8..00000000 --- a/pydis_site/apps/resources/resources/tools/editors/atom.yaml +++ /dev/null @@ -1,8 +0,0 @@ -description: A free Electron-based editor, a "hackable text editor for the 21st century", maintained - by the GitHub team. -name: Atom -title_url: https://atom.io/ -position: 0 -tags: - payment_tiers: - - free diff --git a/pydis_site/apps/resources/resources/tools/editors/google_collab.yaml b/pydis_site/apps/resources/resources/tools/editors/google_collab.yaml deleted file mode 100644 index a6288b9f..00000000 --- a/pydis_site/apps/resources/resources/tools/editors/google_collab.yaml +++ /dev/null @@ -1,12 +0,0 @@ -description: Google Collab is a high-powered custom version of Jupyter Notebook which supports e.g. - !apt-get to install arbitrary Debian packages to the runtime, which is very generous with CPU and memory, - and well-integrated with Google Drive. - You can share your Collab Notebooks with other people and work collaboratively. -name: Google Collab -title_url: https://colab.research.google.com/notebooks/intro.ipynb -position: 4 -tags: - topics: - - collaboration - payment_tiers: - - free diff --git a/pydis_site/apps/resources/resources/tools/editors/mu_editor.yaml b/pydis_site/apps/resources/resources/tools/editors/mu_editor.yaml deleted file mode 100644 index 4c3bfdbf..00000000 --- a/pydis_site/apps/resources/resources/tools/editors/mu_editor.yaml +++ /dev/null @@ -1,17 +0,0 @@ -description: An editor aimed at beginners for the purpose of learning how to code - without the distractions more advanced editors sometimes cause. - Particularly useful for use with microcontrollers, - with built-in tools to interact with Adafruit and Arduino boards. -name: Mu-Editor -title_url: https://codewith.mu/ -position: 3 -tags: - topics: - - microcontrollers - - arduino - - adafruit - - circuitpython - payment_tiers: - - free - complexity: - - beginner diff --git a/pydis_site/apps/resources/resources/tools/editors/sublime_text.yaml b/pydis_site/apps/resources/resources/tools/editors/sublime_text.yaml deleted file mode 100644 index 9c9f53ef..00000000 --- a/pydis_site/apps/resources/resources/tools/editors/sublime_text.yaml +++ /dev/null @@ -1,8 +0,0 @@ -description: A powerful Python-backed editor with great community support and a wealth - of extensions. -name: Sublime Text -title_url: https://www.sublimetext.com/ -position: 2 -tags: - payment_tiers: - - free diff --git a/pydis_site/apps/resources/resources/tools/editors/visual_studio_code.yaml b/pydis_site/apps/resources/resources/tools/editors/visual_studio_code.yaml deleted file mode 100644 index 71c39664..00000000 --- a/pydis_site/apps/resources/resources/tools/editors/visual_studio_code.yaml +++ /dev/null @@ -1,7 +0,0 @@ -description: A fully-featured editor based on Electron, extendable with plugins. -name: Visual Studio Code -title_url: https://code.visualstudio.com/ -position: 1 -tags: - payment_tiers: - - free diff --git a/pydis_site/apps/resources/resources/tools/ides/pycharm.yaml b/pydis_site/apps/resources/resources/tools/ides/pycharm.yaml deleted file mode 100644 index 1a28a207..00000000 --- a/pydis_site/apps/resources/resources/tools/ides/pycharm.yaml +++ /dev/null @@ -1,9 +0,0 @@ -description: The very best Python IDE, with a wealth of advanced features and convenience - functions. -name: PyCharm -title_url: https://www.jetbrains.com/pycharm/ -position: 0 -tags: - payment_tiers: - - free - - paid diff --git a/pydis_site/apps/resources/resources/tools/ides/repl_it.yaml b/pydis_site/apps/resources/resources/tools/ides/repl_it.yaml deleted file mode 100644 index 18100a03..00000000 --- a/pydis_site/apps/resources/resources/tools/ides/repl_it.yaml +++ /dev/null @@ -1,10 +0,0 @@ -description: A free, collaborative, in-browser IDE to code in 50+ languages — - without spending a second on setup. -name: repl.it -title_url: https://repl.it/ -position: 3 -tags: - topics: - - collaboration - payment_tiers: - - free diff --git a/pydis_site/apps/resources/resources/tools/ides/spyder.yaml b/pydis_site/apps/resources/resources/tools/ides/spyder.yaml deleted file mode 100644 index aadc7006..00000000 --- a/pydis_site/apps/resources/resources/tools/ides/spyder.yaml +++ /dev/null @@ -1,10 +0,0 @@ -description: The Scientific Python Development Environment. - Simpler and lighter than PyCharm, but still packs a punch. -name: Spyder -title_url: https://www.spyder-ide.org/ -position: 1 -tags: - topics: - - data science - payment_tiers: - - free diff --git a/pydis_site/apps/resources/resources/tools/ides/thonny.yaml b/pydis_site/apps/resources/resources/tools/ides/thonny.yaml deleted file mode 100644 index abec004b..00000000 --- a/pydis_site/apps/resources/resources/tools/ides/thonny.yaml +++ /dev/null @@ -1,10 +0,0 @@ -description: A Python IDE specifially aimed at learning programming. Has a lot of - helpful features to help you understand your code. -name: Thonny -title_url: https://thonny.org/ -position: 2 -tags: - payment_tiers: - - free - complexity: - - beginner diff --git a/pydis_site/apps/resources/resources/two_scoops_of_django.yaml b/pydis_site/apps/resources/resources/two_scoops_of_django.yaml new file mode 100644 index 00000000..618cc5f5 --- /dev/null +++ b/pydis_site/apps/resources/resources/two_scoops_of_django.yaml @@ -0,0 +1,22 @@ +description: Tips, tricks, and best practices for your Django project. + A highly recommended resource for Django web developers. +name: Two Scoops of Django +urls: +- icon: regular/book + url: https://www.feldroy.com/collections/everything/products/two-scoops-of-django-3-x + color: teal +- icon: branding/goodreads + url: https://www.goodreads.com/book/show/55822151-two-scoops-of-django-3-x + color: goodreads-cream +- icon: branding/github + url: https://github.com/twoscoops/two-scoops-of-django-2.0-code-examples + color: black +tags: + topics: + - web development + payment_tiers: + - paid + complexity: + - intermediate + type: + - book diff --git a/pydis_site/apps/resources/resources/university_of_michigan.yaml b/pydis_site/apps/resources/resources/university_of_michigan.yaml new file mode 100644 index 00000000..0154e4dd --- /dev/null +++ b/pydis_site/apps/resources/resources/university_of_michigan.yaml @@ -0,0 +1,13 @@ +description: A 5-part specialization course that teaches Python from scratch. + The course has no pre-requisites and avoids all but the simplest mathematics. +name: 'University of Michigan: Programming for Everybody' +title_url: https://www.coursera.org/learn/python +tags: + topics: + - python + payment_tiers: + - free + complexity: + - beginner + type: + - course diff --git a/pydis_site/apps/resources/resources/university_of_toronto.yaml b/pydis_site/apps/resources/resources/university_of_toronto.yaml new file mode 100644 index 00000000..d057eb39 --- /dev/null +++ b/pydis_site/apps/resources/resources/university_of_toronto.yaml @@ -0,0 +1,20 @@ +description: A 2-part course that teaches Python. Primarily intended for high school students + and first-year university students who want to learn programming. +name: 'University of Toronto: Learn to Program' +urls: + - icon: regular/graduation-cap + url: https://www.coursera.org/learn/learn-to-program + color: orangered + - icon: regular/graduation-cap + url: https://www.coursera.org/learn/program-code + color: youtube-red +tags: + topics: + - general + payment_tiers: + - free + complexity: + - beginner + - intermediate + type: + - course diff --git a/pydis_site/apps/resources/resources/videos/corey_schafer.yaml b/pydis_site/apps/resources/resources/videos/corey_schafer.yaml deleted file mode 100644 index 97054c6a..00000000 --- a/pydis_site/apps/resources/resources/videos/corey_schafer.yaml +++ /dev/null @@ -1,30 +0,0 @@ -description: 'Corey has a number of exceptionally high quality tutorial series - on everything from Python basics to Django and Flask: - - Check out his channel for more video series! - ' -title_image: https://i.imgur.com/KIfWw3b.png -position: 0 -urls: - - icon: branding/youtube - url: https://www.youtube.com/channel/UCCezIgC97PvUuR4_gbFUs5g - color: youtube-red - - icon: regular/link - url: https://coreyms.com/ - color: teal -tags: - topics: - - python - - best practices - - web development - - version control - payment_tiers: - - free - complexity: - - beginner - - intermediate diff --git a/pydis_site/apps/resources/resources/videos/jetbrains.yaml b/pydis_site/apps/resources/resources/videos/jetbrains.yaml deleted file mode 100644 index ea3c892d..00000000 --- a/pydis_site/apps/resources/resources/videos/jetbrains.yaml +++ /dev/null @@ -1,22 +0,0 @@ -description: A collection of videos made by the PyCharm team at JetBrains on subjects such as TDD, - Django, pytest and much more!

- Episodes of their "What does this package do?" series go over all sorts of libraries in Python - both in the standard library and from the community and give a video explanation of the key concepts. -icon_image: https://upload.wikimedia.org/wikipedia/commons/thumb/1/1a/JetBrains_Logo_2016.svg/1200px-JetBrains_Logo_2016.svg.png -icon_size: 50 -title_image: https://resources.jetbrains.com/storage/products/pycharm/img/meta/pycharm_logo_300x300.png -position: 3 -urls: - - icon: branding/youtube - url: https://www.youtube.com/channel/UCak6beUTLlVmf0E4AmnQkmw - color: youtube-red -tags: - topics: - - python - - testing - - web development - payment_tiers: - - free - complexity: - - beginner - - intermediate diff --git a/pydis_site/apps/resources/resources/videos/jim_shaped_coding.yaml b/pydis_site/apps/resources/resources/videos/jim_shaped_coding.yaml deleted file mode 100644 index 663e3003..00000000 --- a/pydis_site/apps/resources/resources/videos/jim_shaped_coding.yaml +++ /dev/null @@ -1,23 +0,0 @@ -description: 'JimShapedCoding contains a set of YouTube tutorials covering things from Flask to GUI development in Python: - - Check out his channel for more videos!' -title_image: https://i.imgur.com/DlovZPf.png -position: 5 -urls: - - icon: branding/youtube - url: https://www.youtube.com/channel/UCU8d7rcShA7MGuDyYH1aWGg - color: youtube-red -tags: - topics: - - python - - user interface - - web development - payment_tiers: - - free - complexity: - - beginner - - intermediate diff --git a/pydis_site/apps/resources/resources/videos/microsoft.yaml b/pydis_site/apps/resources/resources/videos/microsoft.yaml deleted file mode 100644 index 5b24e0a0..00000000 --- a/pydis_site/apps/resources/resources/videos/microsoft.yaml +++ /dev/null @@ -1,25 +0,0 @@ -description: A trove of tutorials & guides for developers from Microsoft's Developer hub. - Follow the links below for a series of high-quality Python tutorials for beginners. - - Microsoft's Python Development Team also runs a Discord Server for discussions of Python in the Microsoft ecosystem, - including Visual Studio Code and Azure. -title_image: http://img-prod-cms-rt-microsoft-com.akamaized.net/cms/api/am/imageFileData/RE2qVsJ?ver=3f74 -position: 4 -urls: - - icon: branding/youtube - url: https://www.youtube.com/channel/UCsMica-v34Irf9KVTh6xx-g - color: youtube-red - - icon: branding/discord - url: https://aka.ms/python-discord - color: blurple -tags: - topics: - - python - payment_tiers: - - free - complexity: - - beginner diff --git a/pydis_site/apps/resources/resources/videos/python_discord.yaml b/pydis_site/apps/resources/resources/videos/python_discord.yaml deleted file mode 100644 index fccf5bd9..00000000 --- a/pydis_site/apps/resources/resources/videos/python_discord.yaml +++ /dev/null @@ -1,17 +0,0 @@ -description: It's our channel! We are slowly gathering content here directly related to Python, - our community and the events we host. Come check us out! -title_image: https://raw.githubusercontent.com/python-discord/branding/master/logos/logo_banner/logo_site_banner_dark_512.png -position: 2 -urls: - - icon: branding/youtube - url: https://www.youtube.com/pythondiscord - color: youtube-red -tags: - topics: - - python - - events - payment_tiers: - - free - complexity: - - beginner - - intermediate diff --git a/pydis_site/apps/resources/resources/videos/sentdex.yaml b/pydis_site/apps/resources/resources/videos/sentdex.yaml deleted file mode 100644 index 27e38bf5..00000000 --- a/pydis_site/apps/resources/resources/videos/sentdex.yaml +++ /dev/null @@ -1,33 +0,0 @@ -description: 'An enormous amount of Python content for all skill levels - from the most popular Python YouTuber on the web. - - Check out his channel for more video series! - ' -title_image: https://i.imgur.com/kJgWZIu.png -position: 1 -urls: - - icon: branding/youtube - url: https://www.youtube.com/user/sentdex - color: youtube-red - - icon: branding/discord - url: https://discord.gg/sentdex - color: blurple - - icon: regular/link - url: https://pythonprogramming.net/ - color: teal -tags: - topics: - - python - - machine learning - - user interface - - data science - payment_tiers: - - free - complexity: - - beginner - - intermediate diff --git a/pydis_site/apps/resources/resources/visual_studio_code.yaml b/pydis_site/apps/resources/resources/visual_studio_code.yaml new file mode 100644 index 00000000..f09efcf8 --- /dev/null +++ b/pydis_site/apps/resources/resources/visual_studio_code.yaml @@ -0,0 +1,13 @@ +description: A fully-featured editor based on Electron, extendable with plugins. +name: Visual Studio Code +title_url: https://code.visualstudio.com/ +tags: + topics: + - general + payment_tiers: + - free + complexity: + - beginner + - intermediate + type: + - tool diff --git a/pydis_site/apps/resources/resources/wtf_python.yaml b/pydis_site/apps/resources/resources/wtf_python.yaml new file mode 100644 index 00000000..7f67ccf9 --- /dev/null +++ b/pydis_site/apps/resources/resources/wtf_python.yaml @@ -0,0 +1,18 @@ +description: Python, being a beautifully designed high-level and interpreter-based programming language, + provides us with many features for the programmer's comfort. + But sometimes, the outcomes of a Python snippet may not seem obvious at first sight. + Here's a fun project attempting to explain what exactly is happening under the hood for some counter-intuitive snippets + and lesser-known features in Python. +name: WTF Python +title_url: https://github.com/satwikkansal/wtfpython +position: 7 +tags: + topics: + - software design + - other + payment_tiers: + - free + complexity: + - intermediate + type: + - tutorial -- cgit v1.2.3 From 8cb4d72de5834f116e264a4b00c321a0f1c57fb0 Mon Sep 17 00:00:00 2001 From: swfarnsworth Date: Sun, 4 Jul 2021 21:39:33 -0400 Subject: Add final line break for style compliance. --- pydis_site/apps/resources/resources/sololearn.yaml | 2 +- pydis_site/apps/resources/resources/thonny.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'pydis_site/apps') diff --git a/pydis_site/apps/resources/resources/sololearn.yaml b/pydis_site/apps/resources/resources/sololearn.yaml index 637a58b8..b9b59bca 100644 --- a/pydis_site/apps/resources/resources/sololearn.yaml +++ b/pydis_site/apps/resources/resources/sololearn.yaml @@ -14,4 +14,4 @@ tags: - beginner type: - interactive - - course \ No newline at end of file + - course diff --git a/pydis_site/apps/resources/resources/thonny.yaml b/pydis_site/apps/resources/resources/thonny.yaml index 7b9447f5..59aba96d 100644 --- a/pydis_site/apps/resources/resources/thonny.yaml +++ b/pydis_site/apps/resources/resources/thonny.yaml @@ -11,4 +11,4 @@ tags: complexity: - beginner type: - - tool \ No newline at end of file + - tool -- cgit v1.2.3 From 46339104514772724d672aec8b6ffe6bf7789f30 Mon Sep 17 00:00:00 2001 From: swfarnsworth Date: Sun, 4 Jul 2021 21:40:11 -0400 Subject: Add resource Data Science from Scratch. --- .../resources/data_science_from_scratch.yaml | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 pydis_site/apps/resources/resources/data_science_from_scratch.yaml (limited to 'pydis_site/apps') diff --git a/pydis_site/apps/resources/resources/data_science_from_scratch.yaml b/pydis_site/apps/resources/resources/data_science_from_scratch.yaml new file mode 100644 index 00000000..14cba1f4 --- /dev/null +++ b/pydis_site/apps/resources/resources/data_science_from_scratch.yaml @@ -0,0 +1,24 @@ +description: Data Science from Scratch is a good introduction to data science for the complete beginner, and covers + some of the fundamentals of Python programming as well as the basic math, probability and statistics needed to get + started. While either edition of this book is useful for those with prior Python experience, complete beginners + should use the second edition, which contains more up-to-date code examples and better practices. +name: Data Science from Scratch +urls: + - icon: regular/link + url: https://www.oreilly.com/library/view/data-science-from/9781492041122/ + color: teal + - icon: branding/goodreads + url: https://www.goodreads.com/en/book/show/52059715-data-science-from-scratch + color: goodreads-cream + - icon: branding/github + url: https://github.com/joelgrus/data-science-from-scratch + color: black +tags: + topics: + - data science + payment_tiers: + - paid + complexity: + - beginner + type: + - book -- cgit v1.2.3 From 45128f4e696faa78d801b928a9915575a3f17232 Mon Sep 17 00:00:00 2001 From: swfarnsworth Date: Sun, 4 Jul 2021 21:40:39 -0400 Subject: Add resource regex101. --- pydis_site/apps/resources/resources/regex101.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 pydis_site/apps/resources/resources/regex101.yaml (limited to 'pydis_site/apps') diff --git a/pydis_site/apps/resources/resources/regex101.yaml b/pydis_site/apps/resources/resources/regex101.yaml new file mode 100644 index 00000000..2dee95ce --- /dev/null +++ b/pydis_site/apps/resources/resources/regex101.yaml @@ -0,0 +1,15 @@ +description: An online tool for testing regular expressions that helps you understand what the regular expression can + match. Remember to set the "flavor" to Python 2.7 (it works for recent versions of Python). +name: regex101 +title_url: https://regex101.com/ +tags: + topics: + - general + - other + payment_tiers: + - free + complexity: + - beginner + - intermediate + type: + - tool -- cgit v1.2.3 From d56348043a1b0343006c62dfaf738513a3cf4e7d Mon Sep 17 00:00:00 2001 From: swfarnsworth Date: Tue, 6 Jul 2021 17:55:50 -0400 Subject: Remove reference to Python 2.7. The maintainer of regex101 has changed the name from "Python 2.7" to just "Python". --- pydis_site/apps/resources/resources/regex101.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pydis_site/apps') diff --git a/pydis_site/apps/resources/resources/regex101.yaml b/pydis_site/apps/resources/resources/regex101.yaml index 2dee95ce..db3df957 100644 --- a/pydis_site/apps/resources/resources/regex101.yaml +++ b/pydis_site/apps/resources/resources/regex101.yaml @@ -1,5 +1,5 @@ description: An online tool for testing regular expressions that helps you understand what the regular expression can - match. Remember to set the "flavor" to Python 2.7 (it works for recent versions of Python). + match. Remember to set the "flavor" to Python. name: regex101 title_url: https://regex101.com/ tags: -- cgit v1.2.3 From 65fd1070f2c89a62330826c1f7f20aa5de8c6715 Mon Sep 17 00:00:00 2001 From: swfarnsworth Date: Tue, 6 Jul 2021 17:59:16 -0400 Subject: Add Kaggle's pandas tutorial. --- .../apps/resources/resources/kaggle_pandas_tutorial.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 pydis_site/apps/resources/resources/kaggle_pandas_tutorial.yaml (limited to 'pydis_site/apps') diff --git a/pydis_site/apps/resources/resources/kaggle_pandas_tutorial.yaml b/pydis_site/apps/resources/resources/kaggle_pandas_tutorial.yaml new file mode 100644 index 00000000..a1907e0f --- /dev/null +++ b/pydis_site/apps/resources/resources/kaggle_pandas_tutorial.yaml @@ -0,0 +1,13 @@ +description: An interactive tutorial for learning Pandas, the most popular library for manipulating tabular data + in Python's data science ecosystem. This tutorial assumes some familiarity with writing code in notebooks. +name: Kaggle Pandas Tutorial +title_url: https://www.kaggle.com/learn/pandas +tags: + topics: + - data science + payment_tiers: + - free + complexity: + - intermediate + type: + - tutorial -- cgit v1.2.3 From c781ed1f80188ffb274eeada974172f4aa07c0b5 Mon Sep 17 00:00:00 2001 From: fisher60 Date: Fri, 23 Jul 2021 20:20:10 -0500 Subject: change resources to prepare for smart resource search --- pydis_site/apps/resources/urls.py | 2 +- pydis_site/apps/resources/views/__init__.py | 4 +- pydis_site/apps/resources/views/resources.py | 10 +- pydis_site/static/css/resources/resources.css | 51 +++++----- pydis_site/templates/resources/resources.html | 131 ++++++++++++++------------ 5 files changed, 105 insertions(+), 93 deletions(-) (limited to 'pydis_site/apps') diff --git a/pydis_site/apps/resources/urls.py b/pydis_site/apps/resources/urls.py index cd4f53e7..c8d441df 100644 --- a/pydis_site/apps/resources/urls.py +++ b/pydis_site/apps/resources/urls.py @@ -4,6 +4,6 @@ from pydis_site.apps.resources import views app_name = "resources" urlpatterns = [ - path("", views.ResourcesView.as_view(), name="index"), + path("", views.resources.resource_view, name="index"), path("list/", views.ResourcesListView.as_view(), name="resources") ] diff --git a/pydis_site/apps/resources/views/__init__.py b/pydis_site/apps/resources/views/__init__.py index 8eb383b5..c89071c5 100644 --- a/pydis_site/apps/resources/views/__init__.py +++ b/pydis_site/apps/resources/views/__init__.py @@ -1,4 +1,4 @@ -from .resources import ResourcesView +from .resources import resource_view from .resources_list import ResourcesListView -__all__ = ["ResourcesView", "ResourcesListView"] +__all__ = ["resource_view", "ResourcesListView"] diff --git a/pydis_site/apps/resources/views/resources.py b/pydis_site/apps/resources/views/resources.py index 25ce3e50..dfd21682 100644 --- a/pydis_site/apps/resources/views/resources.py +++ b/pydis_site/apps/resources/views/resources.py @@ -1,7 +1,11 @@ from django.views.generic import TemplateView +from django.shortcuts import render +# class ResourcesView(TemplateView): +# """View for resources index page.""" +# +# template_name = "resources/resources.html" -class ResourcesView(TemplateView): - """View for resources index page.""" - template_name = "resources/resources.html" +def resource_view(request): + return render(request, template_name="resources/resources.html") diff --git a/pydis_site/static/css/resources/resources.css b/pydis_site/static/css/resources/resources.css index cf4cb472..a9226647 100644 --- a/pydis_site/static/css/resources/resources.css +++ b/pydis_site/static/css/resources/resources.css @@ -1,29 +1,30 @@ -.box, .tile.is-parent { - transition: 0.1s ease-out; -} -.box { - min-height: 15vh; -} -.tile.is-parent:hover .box { - box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23); -} -.tile.is-parent:hover { - padding: 0.65rem 0.85rem 0.85rem 0.65rem; - filter: saturate(1.1) brightness(1.1); -} +/*.box, .tile.is-parent {*/ +/* transition: 0.1s ease-out;*/ +/*}*/ +/*.box {*/ +/* min-height: 15vh;*/ +/*}*/ +/*.tile.is-parent:hover .box {*/ +/* box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);*/ +/*}*/ +/*.tile.is-parent:hover {*/ +/* padding: 0.65rem 0.85rem 0.85rem 0.65rem;*/ +/* filter: saturate(1.1) brightness(1.1);*/ +/*}*/ -#readingBlock { - background-image: linear-gradient(141deg, #911eb4 0%, #b631de 71%, #cf4bf7 100%); -} +/*#readingBlock {*/ +/* background-image: linear-gradient(141deg, #911eb4 0%, #b631de 71%, #cf4bf7 100%);*/ +/*}*/ -#interactiveBlock { - background-image: linear-gradient(141deg, #d05600 0%, #da722a 71%, #e68846 100%); -} +/*#interactiveBlock {*/ +/* background-image: linear-gradient(141deg, #d05600 0%, #da722a 71%, #e68846 100%);*/ +/*}*/ -#communitiesBlock { - background-image: linear-gradient(141deg, #3b756f 0%, #3a847c 71%, #41948b 100%); -} +/*#communitiesBlock {*/ +/* background-image: linear-gradient(141deg, #3b756f 0%, #3a847c 71%, #41948b 100%);*/ +/*}*/ + +/*#podcastsBlock {*/ +/* background-image: linear-gradient(141deg, #232382 0%, #30309c 71%, #4343ad 100%);*/ +/*}*/ -#podcastsBlock { - background-image: linear-gradient(141deg, #232382 0%, #30309c 71%, #4343ad 100%); -} diff --git a/pydis_site/templates/resources/resources.html b/pydis_site/templates/resources/resources.html index 04744f90..7eb21432 100644 --- a/pydis_site/templates/resources/resources.html +++ b/pydis_site/templates/resources/resources.html @@ -12,79 +12,86 @@
-

Resources

+

Resources

+
+
+
+ {% endblock %} -- cgit v1.2.3 From 33709ed770042ef7773cb886009426545eab4ca1 Mon Sep 17 00:00:00 2001 From: fisher60 Date: Sat, 24 Jul 2021 18:20:47 -0500 Subject: add function to gather tags from resource yaml files I added a function to utils to load all the tags from the resources, this should allow all the tags to be loaded once and exist in memory. --- pydis_site/apps/resources/utils.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'pydis_site/apps') diff --git a/pydis_site/apps/resources/utils.py b/pydis_site/apps/resources/utils.py index 6e21e2ba..3c8571ef 100644 --- a/pydis_site/apps/resources/utils.py +++ b/pydis_site/apps/resources/utils.py @@ -7,6 +7,29 @@ from django.conf import settings RESOURCES_PATH = Path(settings.BASE_DIR, "pydis_site", "apps", "resources", "resources") +default_categories = [ + "topics", + "payment_tiers", + "complexity", + "type" +] + + +def get_resources_meta() -> dict: + all_resources = get_resources() + + resource_meta_tags = {x: set() for x in default_categories} + + for resource in all_resources: + tags = resource.get("tags") + + for tag_key, tag_values in tags.items(): + for tag_item in tag_values: + resource_meta_tags[tag_key].add(tag_item) + + return resource_meta_tags + + def get_resources() -> t.List[t.Dict]: """Loads resource YAMLs from provided path.""" resources = [] -- cgit v1.2.3 From 156951f12c05146650a84d4ac9d45e7a8a085023 Mon Sep 17 00:00:00 2001 From: fisher60 Date: Sat, 24 Jul 2021 18:22:59 -0500 Subject: add constant for resource tags. Add Functional front end This change adds a fully functional front end menu for testing. This is a very rough outline and will need a bit of UI and UX love to get working fully. Should act as an example of functionality --- pydis_site/apps/resources/views/resources.py | 25 +++++++-- pydis_site/templates/resources/resources.html | 81 +++++++++++++++++---------- 2 files changed, 71 insertions(+), 35 deletions(-) (limited to 'pydis_site/apps') diff --git a/pydis_site/apps/resources/views/resources.py b/pydis_site/apps/resources/views/resources.py index dfd21682..f88a23fb 100644 --- a/pydis_site/apps/resources/views/resources.py +++ b/pydis_site/apps/resources/views/resources.py @@ -1,11 +1,24 @@ -from django.views.generic import TemplateView from django.shortcuts import render -# class ResourcesView(TemplateView): -# """View for resources index page.""" -# -# template_name = "resources/resources.html" +from pydis_site.apps.resources.utils import get_resources_meta + +RESOURCE_META_TAGS = get_resources_meta() + + +def format_checkbox_options(options: str) -> list: + """Split up the comma separated parameters into a list.""" + if options: + return options.split(",")[:-1] + return list() def resource_view(request): - return render(request, template_name="resources/resources.html") + """View for resources index page.""" + context = { + "checkboxOptions": format_checkbox_options(request.GET.get("checkboxOptions")), + "topics": RESOURCE_META_TAGS.get("topics"), + "tag_types": RESOURCE_META_TAGS.get("type"), + "payment_tiers": RESOURCE_META_TAGS.get("payment_tiers"), + "complexities": RESOURCE_META_TAGS.get("complexity") + } + return render(request, template_name="resources/resources.html", context=context) diff --git a/pydis_site/templates/resources/resources.html b/pydis_site/templates/resources/resources.html index 7eb21432..fca3d0da 100644 --- a/pydis_site/templates/resources/resources.html +++ b/pydis_site/templates/resources/resources.html @@ -23,55 +23,66 @@
Topic -
- -
- -
-
+ {% endfor %}
Type + + {% for tag_type in tag_types %}
-
+
+ {% endfor %}
Payment + + {% for payment_tier in payment_tiers %}
-
+
+ {% endfor %}
Level + + {% for complexity in complexities %}
-
+
+ {% endfor %} -
- +
+ + + + + + + + +
@@ -79,9 +90,18 @@ {% endblock %} -- cgit v1.2.3 From 0d55308776a029517899f8f26d454b0bb920a9ee Mon Sep 17 00:00:00 2001 From: swfarnsworth Date: Sat, 24 Jul 2021 20:33:11 -0400 Subject: Added type annotations; refactored. --- pydis_site/apps/resources/views/resources.py | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'pydis_site/apps') diff --git a/pydis_site/apps/resources/views/resources.py b/pydis_site/apps/resources/views/resources.py index f88a23fb..2414e48b 100644 --- a/pydis_site/apps/resources/views/resources.py +++ b/pydis_site/apps/resources/views/resources.py @@ -1,3 +1,4 @@ +from django.http import HttpRequest, HttpResponse from django.shortcuts import render from pydis_site.apps.resources.utils import get_resources_meta @@ -5,20 +6,21 @@ from pydis_site.apps.resources.utils import get_resources_meta RESOURCE_META_TAGS = get_resources_meta() -def format_checkbox_options(options: str) -> list: +def format_checkbox_options(options: str) -> list[str]: """Split up the comma separated parameters into a list.""" - if options: - return options.split(",")[:-1] - return list() + return options.split(",")[:-1] if options else [] -def resource_view(request): +def resource_view(request: HttpRequest) -> HttpResponse: """View for resources index page.""" - context = { - "checkboxOptions": format_checkbox_options(request.GET.get("checkboxOptions")), - "topics": RESOURCE_META_TAGS.get("topics"), - "tag_types": RESOURCE_META_TAGS.get("type"), - "payment_tiers": RESOURCE_META_TAGS.get("payment_tiers"), - "complexities": RESOURCE_META_TAGS.get("complexity") - } - return render(request, template_name="resources/resources.html", context=context) + return render( + request, + template_name="resources/resources.html", + context={ + "checkboxOptions": format_checkbox_options(request.GET.get("checkboxOptions")), + "topics": RESOURCE_META_TAGS.get("topics"), + "tag_types": RESOURCE_META_TAGS.get("type"), + "payment_tiers": RESOURCE_META_TAGS.get("payment_tiers"), + "complexities": RESOURCE_META_TAGS.get("complexity") + } + ) -- cgit v1.2.3 From 4ad4e73cf3d2c25130dcdf6fbc933b5dd0326b72 Mon Sep 17 00:00:00 2001 From: swfarnsworth Date: Sat, 24 Jul 2021 20:34:09 -0400 Subject: Updated type annotations; get_resources_meta now returns a dict of sorted lists of strings in title-case. --- pydis_site/apps/resources/utils.py | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) (limited to 'pydis_site/apps') diff --git a/pydis_site/apps/resources/utils.py b/pydis_site/apps/resources/utils.py index 3c8571ef..bb812ec0 100644 --- a/pydis_site/apps/resources/utils.py +++ b/pydis_site/apps/resources/utils.py @@ -15,26 +15,18 @@ default_categories = [ ] -def get_resources_meta() -> dict: - all_resources = get_resources() +def get_resources() -> list[dict[str, t.Union[list[str], str]]]: + """Loads resource YAMLs from provided path.""" + return [yaml.safe_load(item.read_text()) for item in RESOURCES_PATH.rglob("*.yaml")] - resource_meta_tags = {x: set() for x in default_categories} - for resource in all_resources: - tags = resource.get("tags") +def get_resources_meta() -> dict[str, list[str]]: + """Combines the tags from each resource into one dictionary of unique tags.""" + resource_meta_tags = {x: set() for x in default_categories} - for tag_key, tag_values in tags.items(): + for resource in get_resources(): + for tag_key, tag_values in resource.get("tags").items(): for tag_item in tag_values: - resource_meta_tags[tag_key].add(tag_item) - - return resource_meta_tags - - -def get_resources() -> t.List[t.Dict]: - """Loads resource YAMLs from provided path.""" - resources = [] - - for item in RESOURCES_PATH.rglob("*.yaml"): - resources.append(yaml.safe_load(item.read_text())) + resource_meta_tags[tag_key].add(tag_item.title().replace('And', 'and', -1)) - return resources + return {key: sorted(value) for key, value in resource_meta_tags.items()} -- cgit v1.2.3 From 95e7b11df812e09baffe9ef16807e7d02a5e6f1d Mon Sep 17 00:00:00 2001 From: fisher60 Date: Sun, 25 Jul 2021 19:49:01 -0500 Subject: working demo of smart resources search I have incorporated a search that allows users to check boxes to filter resources. This is a working version, but the algo for searching likely needs to be modified. The frontend also needs some style updates. All necessary functionality should be present now though. --- pydis_site/apps/resources/utils.py | 25 ++++++++++++-- pydis_site/apps/resources/views/resources.py | 10 +++--- pydis_site/apps/resources/views/resources_list.py | 4 +-- pydis_site/templates/resources/resources.html | 41 +++++++++++++++++++++-- 4 files changed, 69 insertions(+), 11 deletions(-) (limited to 'pydis_site/apps') diff --git a/pydis_site/apps/resources/utils.py b/pydis_site/apps/resources/utils.py index bb812ec0..7f238431 100644 --- a/pydis_site/apps/resources/utils.py +++ b/pydis_site/apps/resources/utils.py @@ -15,7 +15,28 @@ default_categories = [ ] -def get_resources() -> list[dict[str, t.Union[list[str], str]]]: +def yaml_file_matches_search(yaml_data: dict[str, t.Union[list[str], str]], search_terms: list[str]) -> bool: + match_count = 0 + search_len = len(search_terms) + for search in search_terms: + for _, values in yaml_data["tags"].items(): + if search.lower() in values: + match_count += 1 + if match_count >= search_len: + return True + return False + + +def get_resources_from_search(search_categories: list[str]) -> list[dict[str, t.Union[list[str], str]]]: + out = [] + for item in RESOURCES_PATH.rglob("*.yaml"): + this_dict = yaml.safe_load(item.read_text()) + if yaml_file_matches_search(this_dict, search_categories): + out.append(this_dict) + return out + + +def get_all_resources() -> list[dict[str, t.Union[list[str], str]]]: """Loads resource YAMLs from provided path.""" return [yaml.safe_load(item.read_text()) for item in RESOURCES_PATH.rglob("*.yaml")] @@ -24,7 +45,7 @@ def get_resources_meta() -> dict[str, list[str]]: """Combines the tags from each resource into one dictionary of unique tags.""" resource_meta_tags = {x: set() for x in default_categories} - for resource in get_resources(): + for resource in get_all_resources(): for tag_key, tag_values in resource.get("tags").items(): for tag_item in tag_values: resource_meta_tags[tag_key].add(tag_item.title().replace('And', 'and', -1)) diff --git a/pydis_site/apps/resources/views/resources.py b/pydis_site/apps/resources/views/resources.py index 2414e48b..ffb4f4a8 100644 --- a/pydis_site/apps/resources/views/resources.py +++ b/pydis_site/apps/resources/views/resources.py @@ -1,26 +1,28 @@ from django.http import HttpRequest, HttpResponse from django.shortcuts import render -from pydis_site.apps.resources.utils import get_resources_meta +from pydis_site.apps.resources.utils import get_all_resources, get_resources_from_search, get_resources_meta RESOURCE_META_TAGS = get_resources_meta() def format_checkbox_options(options: str) -> list[str]: - """Split up the comma separated parameters into a list.""" + """Split up the comma separated query parameters for checkbox options into a list.""" return options.split(",")[:-1] if options else [] def resource_view(request: HttpRequest) -> HttpResponse: """View for resources index page.""" + checkbox_options = format_checkbox_options(request.GET.get("checkboxOptions")) return render( request, template_name="resources/resources.html", context={ - "checkboxOptions": format_checkbox_options(request.GET.get("checkboxOptions")), + "checkboxOptions": checkbox_options, "topics": RESOURCE_META_TAGS.get("topics"), "tag_types": RESOURCE_META_TAGS.get("type"), "payment_tiers": RESOURCE_META_TAGS.get("payment_tiers"), - "complexities": RESOURCE_META_TAGS.get("complexity") + "complexities": RESOURCE_META_TAGS.get("complexity"), + "resources": get_resources_from_search(checkbox_options) } ) diff --git a/pydis_site/apps/resources/views/resources_list.py b/pydis_site/apps/resources/views/resources_list.py index 0ec74d78..bd43be33 100644 --- a/pydis_site/apps/resources/views/resources_list.py +++ b/pydis_site/apps/resources/views/resources_list.py @@ -2,7 +2,7 @@ from typing import Any, Dict from django.views.generic import TemplateView -from pydis_site.apps.resources.utils import get_resources +from pydis_site.apps.resources.utils import get_all_resources class ResourcesListView(TemplateView): @@ -13,6 +13,6 @@ class ResourcesListView(TemplateView): def get_context_data(self, **kwargs) -> Dict[str, Any]: """Add resources and subcategories data into context.""" context = super().get_context_data(**kwargs) - context["resources"] = get_resources() + context["resources"] = get_all_resources() return context diff --git a/pydis_site/templates/resources/resources.html b/pydis_site/templates/resources/resources.html index fca3d0da..e2275e89 100644 --- a/pydis_site/templates/resources/resources.html +++ b/pydis_site/templates/resources/resources.html @@ -1,9 +1,11 @@ {% extends 'base/base.html' %} +{% load as_icon %} {% load static %} {% block title %}Resources{% endblock %} {% block head %} - + + {% endblock %} {% block content %} @@ -89,16 +91,49 @@ + + {% if resources|length > 0 %} +
+
+
+
+ {% for resource in resources %} + {% include "resources/resource_box.html" %} + {% endfor %} + + {% for subcategory in subcategories %} +

+ + {{ subcategory.category_info.name }} + +

+

{{ subcategory.category_info.description|safe }}

+ + {% for resource in subcategory.resources %} + {% with category_info=subcategory.category_info %} + {% include "resources/resource_box.html" %} + {% endwith %} + {% endfor %} + {% endfor %} +
+
+
+
+ {% else %} +

No resources matching search.

+ {% endif %} + + + + {% endblock %} {% block content %} {% include "base/navbar.html" %} - -
-
+ {% if resources|length > 0 %} +
+ {# Headline #}

Resources


-
-

Search Options

- -
-
-
-
Topic
-
-
- {% for topic in topics_1 %} -
- -
- {% endfor %} -
-
- {% for topic in topics_2 %} -
- -
- {% endfor %} -
-
- - - -
-
-
Type
+
+ {# Filtering toolbox #} +
+
+ +
+
- {% for payment_tier in payment_tiers %} -
- -
+ {# Actual resources #} +
+
+
+ {% for resource in resources.values %} + {% include "resources/resource_box.html" %} {% endfor %} - - - -
-
-
Level
+ {% for subcategory in subcategories %} +

+ + {{ subcategory.category_info.name }} + +

+

{{ subcategory.category_info.description|safe }}

- {% for complexity in complexities %} -
- -
- {% endfor %} - - - + {% for resource in subcategory.resources %} + {% with category_info=subcategory.category_info %} + {% include "resources/resource_box.html" %} + {% endwith %} + {% endfor %} + {% endfor %}
- -
- - - - - - - -
-
-
-
- - {% if resources|length > 0 %} -
-
-
-
- {% for resource in resources %} - {% include "resources/resource_box.html" %} - {% endfor %} - - {% for subcategory in subcategories %} -

- - {{ subcategory.category_info.name }} - -

-

{{ subcategory.category_info.description|safe }}

- - {% for resource in subcategory.resources %} - {% with category_info=subcategory.category_info %} - {% include "resources/resource_box.html" %} - {% endwith %} - {% endfor %} - {% endfor %}
-
-
+
{% else %} -

No resources matching search.

+

No resources matching search.

{% endif %} {% endblock %} -- cgit v1.2.3 From 7242fb9492f07c724d4b354ca34d07e2948e4a1f Mon Sep 17 00:00:00 2001 From: Chris Lovering Date: Wed, 26 Jan 2022 23:15:05 +0000 Subject: Fix pynews config in example file The python news cog relies on the python_news section of the config being filled in via a named alias. Since we were using the DEV_ prefix, this meant it was not being populated, leading to the cog throwing an error on boot. --- .../apps/content/resources/guides/pydis-guides/contributing/bot.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'pydis_site/apps') diff --git a/pydis_site/apps/content/resources/guides/pydis-guides/contributing/bot.md b/pydis_site/apps/content/resources/guides/pydis-guides/contributing/bot.md index b9589def..d31c6dbf 100644 --- a/pydis_site/apps/content/resources/guides/pydis-guides/contributing/bot.md +++ b/pydis_site/apps/content/resources/guides/pydis-guides/contributing/bot.md @@ -350,7 +350,7 @@ style: trashcan: "<:trashcan:�>" -##### << Optional - If you don't care about the filtering and help channel cogs, ignore the rest of this file >> ##### +##### << Optional - If you don't care about the filtering, help channel and py-news cogs, ignore the rest of this file >> ##### filter: # What do we filter? filter_domains: true @@ -426,6 +426,10 @@ help_channels: notify_roles: - *HELPERS_ROLE +python_news: + channel: *DEV_PY_NEWS + webhook: *PYNEWS_WEBHOOK + ##### << Add any additional sections you need to override from config-default.yml >> ##### -- cgit v1.2.3 From 8b50bef2f43d660679702c8043390b2e3ec62f03 Mon Sep 17 00:00:00 2001 From: Chris Lovering Date: Wed, 26 Jan 2022 23:15:39 +0000 Subject: Add new incidents webhook to exmaple config.yml This was recently added to the bot. --- .../apps/content/resources/guides/pydis-guides/contributing/bot.md | 1 + 1 file changed, 1 insertion(+) (limited to 'pydis_site/apps') diff --git a/pydis_site/apps/content/resources/guides/pydis-guides/contributing/bot.md b/pydis_site/apps/content/resources/guides/pydis-guides/contributing/bot.md index d31c6dbf..ed9e3db3 100644 --- a/pydis_site/apps/content/resources/guides/pydis-guides/contributing/bot.md +++ b/pydis_site/apps/content/resources/guides/pydis-guides/contributing/bot.md @@ -196,6 +196,7 @@ guild: big_brother: � dev_log: � duck_pond: � + incidents: � incidents_archive: � python_news: &PYNEWS_WEBHOOK � talent_pool: � -- cgit v1.2.3 From 3e10b0cf19916f10be0aed9c8d60c9dfd7a016a5 Mon Sep 17 00:00:00 2001 From: Chris Lovering Date: Thu, 27 Jan 2022 20:30:16 +0000 Subject: Use voice_mute and voice_ban to determine voice_gate Previously only voice_ban was used, but now having either of these infractions should mean the user is blocked from reciving the role. --- pydis_site/apps/api/viewsets/bot/user.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'pydis_site/apps') diff --git a/pydis_site/apps/api/viewsets/bot/user.py b/pydis_site/apps/api/viewsets/bot/user.py index 1a5e79f8..a867a80f 100644 --- a/pydis_site/apps/api/viewsets/bot/user.py +++ b/pydis_site/apps/api/viewsets/bot/user.py @@ -1,7 +1,7 @@ import typing from collections import OrderedDict -from django.core.exceptions import ObjectDoesNotExist +from django.db.models import Q from rest_framework import status from rest_framework.decorators import action from rest_framework.pagination import PageNumberPagination @@ -261,12 +261,10 @@ class UserViewSet(ModelViewSet): """Request handler for metricity_data endpoint.""" user = self.get_object() - try: - Infraction.objects.get(user__id=user.id, active=True, type="voice_ban") - except ObjectDoesNotExist: - voice_banned = False - else: - voice_banned = True + has_voice_infraction = Infraction.objects.filter( + Q(user__id=user.id, active=True), + Q(type="voice_ban") | Q(type="voice_mute") + ).exists() with Metricity() as metricity: try: @@ -275,7 +273,7 @@ class UserViewSet(ModelViewSet): data["total_messages"] = metricity.total_messages(user.id) data["activity_blocks"] = metricity.total_message_blocks(user.id) - data["voice_banned"] = voice_banned + data["voice_gate_blocked"] = has_voice_infraction return Response(data, status=status.HTTP_200_OK) except NotFoundError: return Response(dict(detail="User not found in metricity"), -- cgit v1.2.3 From 1b5e7eba8c00f357595b7dccb909a608c7df216f Mon Sep 17 00:00:00 2001 From: Chris Lovering Date: Thu, 27 Jan 2022 20:54:43 +0000 Subject: Update metricity tests to test new voice_gate_blocked behaviour --- pydis_site/apps/api/tests/test_users.py | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) (limited to 'pydis_site/apps') diff --git a/pydis_site/apps/api/tests/test_users.py b/pydis_site/apps/api/tests/test_users.py index 9b91380b..e21bb32b 100644 --- a/pydis_site/apps/api/tests/test_users.py +++ b/pydis_site/apps/api/tests/test_users.py @@ -1,10 +1,9 @@ -from unittest.mock import patch +from unittest.mock import Mock, patch -from django.core.exceptions import ObjectDoesNotExist from django.urls import reverse from .base import AuthenticatedAPITestCase -from ..models import Role, User +from ..models import Infraction, Role, User from ..models.bot.metricity import NotFoundError from ..viewsets.bot.user import UserListPagination @@ -424,7 +423,7 @@ class UserMetricityTests(AuthenticatedAPITestCase): self.assertCountEqual(response.json(), { "joined_at": joined_at, "total_messages": total_messages, - "voice_banned": False, + "voice_gate_blocked": False, "activity_blocks": total_blocks }) @@ -451,23 +450,36 @@ class UserMetricityTests(AuthenticatedAPITestCase): self.assertEqual(response.status_code, 404) def test_metricity_voice_banned(self): + queryset_with_values = Mock(spec=Infraction.objects) + queryset_with_values.filter.return_value = queryset_with_values + queryset_with_values.exists.return_value = True + + queryset_without_values = Mock(spec=Infraction.objects) + queryset_without_values.filter.return_value = queryset_without_values + queryset_without_values.exists.return_value = False cases = [ - {'exception': None, 'voice_banned': True}, - {'exception': ObjectDoesNotExist, 'voice_banned': False}, + {'voice_infractions': queryset_with_values, 'voice_gate_blocked': True}, + {'voice_infractions': queryset_without_values, 'voice_gate_blocked': False}, ] self.mock_metricity_user("foo", 1, 1, [["bar", 1]]) for case in cases: - with self.subTest(exception=case['exception'], voice_banned=case['voice_banned']): - with patch("pydis_site.apps.api.viewsets.bot.user.Infraction.objects.get") as p: - p.side_effect = case['exception'] + with self.subTest( + voice_infractions=case['voice_infractions'], + voice_gate_blocked=case['voice_gate_blocked'] + ): + with patch("pydis_site.apps.api.viewsets.bot.user.Infraction.objects.filter") as p: + p.return_value = case['voice_infractions'] url = reverse('api:bot:user-metricity-data', args=[0]) response = self.client.get(url) self.assertEqual(response.status_code, 200) - self.assertEqual(response.json()["voice_banned"], case["voice_banned"]) + self.assertEqual( + response.json()["voice_gate_blocked"], + case["voice_gate_blocked"] + ) def test_metricity_review_data(self): # Given -- cgit v1.2.3 From 19ba068fbbc39c24aa1d1d1af50b9b752d941337 Mon Sep 17 00:00:00 2001 From: Leon Sandøy Date: Fri, 28 Jan 2022 00:50:44 +0100 Subject: Fix broken icon for Paid resources. --- pydis_site/apps/resources/templatetags/get_category_icon.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pydis_site/apps') diff --git a/pydis_site/apps/resources/templatetags/get_category_icon.py b/pydis_site/apps/resources/templatetags/get_category_icon.py index 8111cda6..5a5e9887 100644 --- a/pydis_site/apps/resources/templatetags/get_category_icon.py +++ b/pydis_site/apps/resources/templatetags/get_category_icon.py @@ -18,7 +18,7 @@ _ICONS = { "Intermediate": "fa-align-center", "Microcontrollers": "fa-microchip", "Other": "fa-question-circle", - "Paid": "fa-sack", + "Paid": "fa-dollar-sign", "Podcast": "fa-microphone-alt", "Project Ideas": "fa-lightbulb-o", "Software Design": "fa-paint-brush", -- cgit v1.2.3 From 473a15a3dbaf0ff2ccc7fdbeaafc96e0e853949e Mon Sep 17 00:00:00 2001 From: Leon Sandøy Date: Sat, 29 Jan 2022 12:42:12 +0100 Subject: Distill the resources page. This should allow Netlify Deploy Previews. --- pydis_site/apps/resources/urls.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pydis_site/apps') diff --git a/pydis_site/apps/resources/urls.py b/pydis_site/apps/resources/urls.py index 3db26417..5d5ae7fb 100644 --- a/pydis_site/apps/resources/urls.py +++ b/pydis_site/apps/resources/urls.py @@ -1,8 +1,8 @@ -from django.urls import path +from django_distill import distill_path from pydis_site.apps.resources import views app_name = "resources" urlpatterns = [ - path("", views.resources.ResourceView.as_view(), name="index"), + distill_path("", views.resources.ResourceView.as_view(), name="index"), ] -- cgit v1.2.3 From e54a3d18e208dd532533b5bbe146b1bff9875ba4 Mon Sep 17 00:00:00 2001 From: Leon Sandøy Date: Sat, 29 Jan 2022 13:42:38 +0100 Subject: Complexity -> Difficulty. --- pydis_site/apps/resources/resources/adafruit.yaml | 2 +- pydis_site/apps/resources/resources/atom.yaml | 2 +- .../apps/resources/resources/automate_the_boring_stuff_book.yaml | 2 +- .../resources/resources/automate_the_boring_stuff_course.yaml | 2 +- .../apps/resources/resources/awesome_programming_discord.yaml | 2 +- pydis_site/apps/resources/resources/byte_of_python.yaml | 2 +- pydis_site/apps/resources/resources/code_combat.yaml | 2 +- pydis_site/apps/resources/resources/corey_schafer.yaml | 2 +- .../apps/resources/resources/data_science_from_scratch.yaml | 2 +- pydis_site/apps/resources/resources/edublocks.yaml | 2 +- pydis_site/apps/resources/resources/effective_python.yaml | 2 +- pydis_site/apps/resources/resources/exercism.yaml | 2 +- pydis_site/apps/resources/resources/flask_web_development.yaml | 2 +- pydis_site/apps/resources/resources/fluent_python.yaml | 2 +- .../apps/resources/resources/getting_started_with_kivy.yaml | 2 +- .../getting_started_with_python_for_non_programmers.yaml | 2 +- .../resources/getting_started_with_python_for_programmers.yaml | 2 +- pydis_site/apps/resources/resources/google_collab.yaml | 2 +- .../apps/resources/resources/hitchhikers_guide_to_python.yaml | 2 +- pydis_site/apps/resources/resources/inferential_thinking.yaml | 2 +- pydis_site/apps/resources/resources/jetbrains_academy.yaml | 2 +- pydis_site/apps/resources/resources/jetbrains_videos.yaml | 2 +- pydis_site/apps/resources/resources/jim_shaped_coding.yaml | 2 +- pydis_site/apps/resources/resources/kaggle_pandas_tutorial.yaml | 2 +- pydis_site/apps/resources/resources/kivy.yaml | 2 +- pydis_site/apps/resources/resources/microsoft.yaml | 2 +- pydis_site/apps/resources/resources/microsoft_videos.yaml | 2 +- pydis_site/apps/resources/resources/mission_python.yaml | 2 +- .../mit_introduction_to_computer_science_and_programming.yaml | 2 +- pydis_site/apps/resources/resources/mu_editor.yaml | 2 +- pydis_site/apps/resources/resources/netbats_project_ideas.yaml | 2 +- .../resources/neural_networks_from_scratch_in_python.yaml | 2 +- pydis_site/apps/resources/resources/pallets.yaml | 2 +- pydis_site/apps/resources/resources/panda3d.yaml | 2 +- pydis_site/apps/resources/resources/people_postgres_data.yaml | 2 +- pydis_site/apps/resources/resources/podcast_dunder_init.yaml | 2 +- .../apps/resources/resources/practical_python_programming.yaml | 2 +- pydis_site/apps/resources/resources/pycharm.yaml | 2 +- pydis_site/apps/resources/resources/pyglet.yaml | 2 +- pydis_site/apps/resources/resources/python_bytes.yaml | 2 +- pydis_site/apps/resources/resources/python_cheat_sheet.yaml | 2 +- pydis_site/apps/resources/resources/python_cookbook.yaml | 2 +- pydis_site/apps/resources/resources/python_crash_course.yaml | 2 +- pydis_site/apps/resources/resources/python_developer_guide.yaml | 2 +- pydis_site/apps/resources/resources/python_discord_videos.yaml | 2 +- pydis_site/apps/resources/resources/python_morsels.yaml | 2 +- pydis_site/apps/resources/resources/python_subreddit.yaml | 2 +- pydis_site/apps/resources/resources/python_tricks.yaml | 2 +- pydis_site/apps/resources/resources/python_tutor.yaml | 2 +- pydis_site/apps/resources/resources/real_python.yaml | 2 +- pydis_site/apps/resources/resources/regex101.yaml | 2 +- pydis_site/apps/resources/resources/repl_it.yaml | 2 +- pydis_site/apps/resources/resources/screen_readers.yaml | 2 +- pydis_site/apps/resources/resources/sentdex.yaml | 2 +- pydis_site/apps/resources/resources/simple_guide_to_git.yaml | 2 +- pydis_site/apps/resources/resources/sololearn.yaml | 2 +- pydis_site/apps/resources/resources/spyder.yaml | 2 +- pydis_site/apps/resources/resources/sublime_text.yaml | 2 +- pydis_site/apps/resources/resources/talk_python_to_me.yaml | 2 +- pydis_site/apps/resources/resources/talon_voice.yaml | 2 +- pydis_site/apps/resources/resources/test_and_code.yaml | 2 +- pydis_site/apps/resources/resources/the_flask_mega_tutorial.yaml | 2 +- pydis_site/apps/resources/resources/the_real_python_podcast.yaml | 2 +- pydis_site/apps/resources/resources/think_python.yaml | 2 +- pydis_site/apps/resources/resources/thonny.yaml | 2 +- pydis_site/apps/resources/resources/two_scoops_of_django.yaml | 2 +- pydis_site/apps/resources/resources/university_of_michigan.yaml | 2 +- pydis_site/apps/resources/resources/university_of_toronto.yaml | 2 +- .../apps/resources/resources/vcokltfre_discord_bot_tutorial.yaml | 2 +- pydis_site/apps/resources/resources/visual_studio_code.yaml | 2 +- pydis_site/apps/resources/resources/wtf_python.yaml | 2 +- pydis_site/apps/resources/views/resources.py | 8 ++++---- pydis_site/static/js/resources.js | 6 +++--- pydis_site/templates/resources/resource_box.html | 4 ++-- pydis_site/templates/resources/resources.html | 2 +- 75 files changed, 81 insertions(+), 81 deletions(-) (limited to 'pydis_site/apps') diff --git a/pydis_site/apps/resources/resources/adafruit.yaml b/pydis_site/apps/resources/resources/adafruit.yaml index e8eeee37..f9466bd8 100644 --- a/pydis_site/apps/resources/resources/adafruit.yaml +++ b/pydis_site/apps/resources/resources/adafruit.yaml @@ -14,7 +14,7 @@ tags: - microcontrollers payment_tiers: - free - complexity: + difficulty: - beginner - intermediate type: diff --git a/pydis_site/apps/resources/resources/atom.yaml b/pydis_site/apps/resources/resources/atom.yaml index 3a46a45f..26e125b1 100644 --- a/pydis_site/apps/resources/resources/atom.yaml +++ b/pydis_site/apps/resources/resources/atom.yaml @@ -7,7 +7,7 @@ tags: - general payment_tiers: - free - complexity: + difficulty: - beginner - intermediate type: diff --git a/pydis_site/apps/resources/resources/automate_the_boring_stuff_book.yaml b/pydis_site/apps/resources/resources/automate_the_boring_stuff_book.yaml index bc0e19ec..9bf9aba8 100644 --- a/pydis_site/apps/resources/resources/automate_the_boring_stuff_book.yaml +++ b/pydis_site/apps/resources/resources/automate_the_boring_stuff_book.yaml @@ -15,7 +15,7 @@ tags: payment_tiers: - free - paid - complexity: + difficulty: - beginner type: - book diff --git a/pydis_site/apps/resources/resources/automate_the_boring_stuff_course.yaml b/pydis_site/apps/resources/resources/automate_the_boring_stuff_course.yaml index b93ef868..133033f7 100644 --- a/pydis_site/apps/resources/resources/automate_the_boring_stuff_course.yaml +++ b/pydis_site/apps/resources/resources/automate_the_boring_stuff_course.yaml @@ -7,7 +7,7 @@ tags: - general payment_tiers: - paid - complexity: + difficulty: - beginner type: - course diff --git a/pydis_site/apps/resources/resources/awesome_programming_discord.yaml b/pydis_site/apps/resources/resources/awesome_programming_discord.yaml index 4233f26e..0ef7aefc 100644 --- a/pydis_site/apps/resources/resources/awesome_programming_discord.yaml +++ b/pydis_site/apps/resources/resources/awesome_programming_discord.yaml @@ -11,7 +11,7 @@ tags: - general payment_tiers: - free - complexity: + difficulty: - beginner - intermediate type: diff --git a/pydis_site/apps/resources/resources/byte_of_python.yaml b/pydis_site/apps/resources/resources/byte_of_python.yaml index d2b8fa35..c4b671c2 100644 --- a/pydis_site/apps/resources/resources/byte_of_python.yaml +++ b/pydis_site/apps/resources/resources/byte_of_python.yaml @@ -16,7 +16,7 @@ tags: payment_tiers: - free - paid - complexity: + difficulty: - beginner type: - book diff --git a/pydis_site/apps/resources/resources/code_combat.yaml b/pydis_site/apps/resources/resources/code_combat.yaml index ab4a4aed..84597c4d 100644 --- a/pydis_site/apps/resources/resources/code_combat.yaml +++ b/pydis_site/apps/resources/resources/code_combat.yaml @@ -13,7 +13,7 @@ tags: payment_tiers: - free - subscription - complexity: + difficulty: - beginner - intermediate type: diff --git a/pydis_site/apps/resources/resources/corey_schafer.yaml b/pydis_site/apps/resources/resources/corey_schafer.yaml index cb20bc24..b73f4b5d 100644 --- a/pydis_site/apps/resources/resources/corey_schafer.yaml +++ b/pydis_site/apps/resources/resources/corey_schafer.yaml @@ -22,7 +22,7 @@ tags: - tooling payment_tiers: - free - complexity: + difficulty: - beginner - intermediate type: diff --git a/pydis_site/apps/resources/resources/data_science_from_scratch.yaml b/pydis_site/apps/resources/resources/data_science_from_scratch.yaml index 8ba95e9b..57e73a28 100644 --- a/pydis_site/apps/resources/resources/data_science_from_scratch.yaml +++ b/pydis_site/apps/resources/resources/data_science_from_scratch.yaml @@ -16,7 +16,7 @@ tags: - data science payment_tiers: - paid - complexity: + difficulty: - beginner type: - book diff --git a/pydis_site/apps/resources/resources/edublocks.yaml b/pydis_site/apps/resources/resources/edublocks.yaml index 9fd87945..3eaefc35 100644 --- a/pydis_site/apps/resources/resources/edublocks.yaml +++ b/pydis_site/apps/resources/resources/edublocks.yaml @@ -12,7 +12,7 @@ tags: - general payment_tiers: - free - complexity: + difficulty: - beginner type: - interactive diff --git a/pydis_site/apps/resources/resources/effective_python.yaml b/pydis_site/apps/resources/resources/effective_python.yaml index 4e361bcb..96a3b21a 100644 --- a/pydis_site/apps/resources/resources/effective_python.yaml +++ b/pydis_site/apps/resources/resources/effective_python.yaml @@ -15,7 +15,7 @@ tags: - software design payment_tiers: - paid - complexity: + difficulty: - intermediate type: - book diff --git a/pydis_site/apps/resources/resources/exercism.yaml b/pydis_site/apps/resources/resources/exercism.yaml index ba8cd2df..b8f53d72 100644 --- a/pydis_site/apps/resources/resources/exercism.yaml +++ b/pydis_site/apps/resources/resources/exercism.yaml @@ -13,7 +13,7 @@ tags: - general payment_tiers: - free - complexity: + difficulty: - beginner - intermediate type: diff --git a/pydis_site/apps/resources/resources/flask_web_development.yaml b/pydis_site/apps/resources/resources/flask_web_development.yaml index 95b75a5b..0bd418e5 100644 --- a/pydis_site/apps/resources/resources/flask_web_development.yaml +++ b/pydis_site/apps/resources/resources/flask_web_development.yaml @@ -14,7 +14,7 @@ tags: - web development payment_tiers: - paid - complexity: + difficulty: - beginner - intermediate type: diff --git a/pydis_site/apps/resources/resources/fluent_python.yaml b/pydis_site/apps/resources/resources/fluent_python.yaml index e35c0134..1d525baa 100644 --- a/pydis_site/apps/resources/resources/fluent_python.yaml +++ b/pydis_site/apps/resources/resources/fluent_python.yaml @@ -15,7 +15,7 @@ tags: - software design payment_tiers: - paid - complexity: + difficulty: - intermediate type: - book diff --git a/pydis_site/apps/resources/resources/getting_started_with_kivy.yaml b/pydis_site/apps/resources/resources/getting_started_with_kivy.yaml index 5dbcd387..06eb2c14 100644 --- a/pydis_site/apps/resources/resources/getting_started_with_kivy.yaml +++ b/pydis_site/apps/resources/resources/getting_started_with_kivy.yaml @@ -8,7 +8,7 @@ tags: - game development payment_tiers: - free - complexity: + difficulty: - beginner type: - tutorial diff --git a/pydis_site/apps/resources/resources/getting_started_with_python_for_non_programmers.yaml b/pydis_site/apps/resources/resources/getting_started_with_python_for_non_programmers.yaml index 85c061bd..6fab0114 100644 --- a/pydis_site/apps/resources/resources/getting_started_with_python_for_non_programmers.yaml +++ b/pydis_site/apps/resources/resources/getting_started_with_python_for_non_programmers.yaml @@ -7,7 +7,7 @@ tags: - general payment_tiers: - free - complexity: + difficulty: - beginner type: - tutorial diff --git a/pydis_site/apps/resources/resources/getting_started_with_python_for_programmers.yaml b/pydis_site/apps/resources/resources/getting_started_with_python_for_programmers.yaml index 2565eedd..74b6efb9 100644 --- a/pydis_site/apps/resources/resources/getting_started_with_python_for_programmers.yaml +++ b/pydis_site/apps/resources/resources/getting_started_with_python_for_programmers.yaml @@ -8,7 +8,7 @@ tags: - general payment_tiers: - free - complexity: + difficulty: - intermediate type: - tutorial diff --git a/pydis_site/apps/resources/resources/google_collab.yaml b/pydis_site/apps/resources/resources/google_collab.yaml index 65876c0e..067a79c9 100644 --- a/pydis_site/apps/resources/resources/google_collab.yaml +++ b/pydis_site/apps/resources/resources/google_collab.yaml @@ -10,7 +10,7 @@ tags: - data science payment_tiers: - free - complexity: + difficulty: - beginner - intermediate type: diff --git a/pydis_site/apps/resources/resources/hitchhikers_guide_to_python.yaml b/pydis_site/apps/resources/resources/hitchhikers_guide_to_python.yaml index bfac404a..c4b78af6 100644 --- a/pydis_site/apps/resources/resources/hitchhikers_guide_to_python.yaml +++ b/pydis_site/apps/resources/resources/hitchhikers_guide_to_python.yaml @@ -11,7 +11,7 @@ tags: - general payment_tiers: - paid - complexity: + difficulty: - beginner - intermediate type: diff --git a/pydis_site/apps/resources/resources/inferential_thinking.yaml b/pydis_site/apps/resources/resources/inferential_thinking.yaml index 20409f3a..a8cf2bc8 100644 --- a/pydis_site/apps/resources/resources/inferential_thinking.yaml +++ b/pydis_site/apps/resources/resources/inferential_thinking.yaml @@ -8,7 +8,7 @@ tags: - data science payment_tiers: - free - complexity: + difficulty: - beginner - intermediate type: diff --git a/pydis_site/apps/resources/resources/jetbrains_academy.yaml b/pydis_site/apps/resources/resources/jetbrains_academy.yaml index 63c061ce..c3cb7657 100644 --- a/pydis_site/apps/resources/resources/jetbrains_academy.yaml +++ b/pydis_site/apps/resources/resources/jetbrains_academy.yaml @@ -12,7 +12,7 @@ tags: - data science payment_tiers: - subscription - complexity: + difficulty: - beginner type: - interactive diff --git a/pydis_site/apps/resources/resources/jetbrains_videos.yaml b/pydis_site/apps/resources/resources/jetbrains_videos.yaml index aba7c687..00d34e69 100644 --- a/pydis_site/apps/resources/resources/jetbrains_videos.yaml +++ b/pydis_site/apps/resources/resources/jetbrains_videos.yaml @@ -14,7 +14,7 @@ tags: - web development payment_tiers: - free - complexity: + difficulty: - beginner - intermediate type: diff --git a/pydis_site/apps/resources/resources/jim_shaped_coding.yaml b/pydis_site/apps/resources/resources/jim_shaped_coding.yaml index 30992ef2..c9727888 100644 --- a/pydis_site/apps/resources/resources/jim_shaped_coding.yaml +++ b/pydis_site/apps/resources/resources/jim_shaped_coding.yaml @@ -15,7 +15,7 @@ tags: - web development payment_tiers: - free - complexity: + difficulty: - beginner - intermediate type: diff --git a/pydis_site/apps/resources/resources/kaggle_pandas_tutorial.yaml b/pydis_site/apps/resources/resources/kaggle_pandas_tutorial.yaml index a1907e0f..c8e72c6e 100644 --- a/pydis_site/apps/resources/resources/kaggle_pandas_tutorial.yaml +++ b/pydis_site/apps/resources/resources/kaggle_pandas_tutorial.yaml @@ -7,7 +7,7 @@ tags: - data science payment_tiers: - free - complexity: + difficulty: - intermediate type: - tutorial diff --git a/pydis_site/apps/resources/resources/kivy.yaml b/pydis_site/apps/resources/resources/kivy.yaml index 5d7d3844..dad29e9a 100644 --- a/pydis_site/apps/resources/resources/kivy.yaml +++ b/pydis_site/apps/resources/resources/kivy.yaml @@ -21,7 +21,7 @@ tags: - game development payment_tiers: - free - complexity: + difficulty: - beginner - intermediate type: diff --git a/pydis_site/apps/resources/resources/microsoft.yaml b/pydis_site/apps/resources/resources/microsoft.yaml index cc5ca93f..e1d62955 100644 --- a/pydis_site/apps/resources/resources/microsoft.yaml +++ b/pydis_site/apps/resources/resources/microsoft.yaml @@ -12,7 +12,7 @@ tags: - tooling payment_tiers: - free - complexity: + difficulty: - beginner - intermediate type: diff --git a/pydis_site/apps/resources/resources/microsoft_videos.yaml b/pydis_site/apps/resources/resources/microsoft_videos.yaml index 39187650..f45aef63 100644 --- a/pydis_site/apps/resources/resources/microsoft_videos.yaml +++ b/pydis_site/apps/resources/resources/microsoft_videos.yaml @@ -19,7 +19,7 @@ tags: - general payment_tiers: - free - complexity: + difficulty: - beginner type: - video diff --git a/pydis_site/apps/resources/resources/mission_python.yaml b/pydis_site/apps/resources/resources/mission_python.yaml index 4e7b30b0..e8e0a6b8 100644 --- a/pydis_site/apps/resources/resources/mission_python.yaml +++ b/pydis_site/apps/resources/resources/mission_python.yaml @@ -14,7 +14,7 @@ tags: - game development payment_tiers: - paid - complexity: + difficulty: - beginner type: - book diff --git a/pydis_site/apps/resources/resources/mit_introduction_to_computer_science_and_programming.yaml b/pydis_site/apps/resources/resources/mit_introduction_to_computer_science_and_programming.yaml index 4aa028ea..4e74936d 100644 --- a/pydis_site/apps/resources/resources/mit_introduction_to_computer_science_and_programming.yaml +++ b/pydis_site/apps/resources/resources/mit_introduction_to_computer_science_and_programming.yaml @@ -10,7 +10,7 @@ tags: payment_tiers: - free - paid - complexity: + difficulty: - beginner type: - course diff --git a/pydis_site/apps/resources/resources/mu_editor.yaml b/pydis_site/apps/resources/resources/mu_editor.yaml index 68c9b7db..b6318d0e 100644 --- a/pydis_site/apps/resources/resources/mu_editor.yaml +++ b/pydis_site/apps/resources/resources/mu_editor.yaml @@ -9,7 +9,7 @@ tags: - microcontrollers payment_tiers: - free - complexity: + difficulty: - beginner type: - tool diff --git a/pydis_site/apps/resources/resources/netbats_project_ideas.yaml b/pydis_site/apps/resources/resources/netbats_project_ideas.yaml index faa029f9..80ba771c 100644 --- a/pydis_site/apps/resources/resources/netbats_project_ideas.yaml +++ b/pydis_site/apps/resources/resources/netbats_project_ideas.yaml @@ -7,7 +7,7 @@ tags: - general payment_tiers: - free - complexity: + difficulty: - beginner - intermediate type: diff --git a/pydis_site/apps/resources/resources/neural_networks_from_scratch_in_python.yaml b/pydis_site/apps/resources/resources/neural_networks_from_scratch_in_python.yaml index 5d3060a4..6313cabe 100644 --- a/pydis_site/apps/resources/resources/neural_networks_from_scratch_in_python.yaml +++ b/pydis_site/apps/resources/resources/neural_networks_from_scratch_in_python.yaml @@ -13,7 +13,7 @@ tags: - data science payment_tiers: - paid - complexity: + difficulty: - intermediate type: - book diff --git a/pydis_site/apps/resources/resources/pallets.yaml b/pydis_site/apps/resources/resources/pallets.yaml index de3f7fad..0da2a625 100644 --- a/pydis_site/apps/resources/resources/pallets.yaml +++ b/pydis_site/apps/resources/resources/pallets.yaml @@ -12,7 +12,7 @@ tags: - web development payment_tiers: - free - complexity: + difficulty: - beginner - intermediate type: diff --git a/pydis_site/apps/resources/resources/panda3d.yaml b/pydis_site/apps/resources/resources/panda3d.yaml index 0d488565..61ecba4b 100644 --- a/pydis_site/apps/resources/resources/panda3d.yaml +++ b/pydis_site/apps/resources/resources/panda3d.yaml @@ -16,7 +16,7 @@ tags: - game development payment_tiers: - free - complexity: + difficulty: - beginner - intermediate type: diff --git a/pydis_site/apps/resources/resources/people_postgres_data.yaml b/pydis_site/apps/resources/resources/people_postgres_data.yaml index 70088af2..c2d63252 100644 --- a/pydis_site/apps/resources/resources/people_postgres_data.yaml +++ b/pydis_site/apps/resources/resources/people_postgres_data.yaml @@ -20,7 +20,7 @@ tags: - databases payment_tiers: - free - complexity: + difficulty: - beginner - intermediate type: diff --git a/pydis_site/apps/resources/resources/podcast_dunder_init.yaml b/pydis_site/apps/resources/resources/podcast_dunder_init.yaml index ee3028a3..2751481a 100644 --- a/pydis_site/apps/resources/resources/podcast_dunder_init.yaml +++ b/pydis_site/apps/resources/resources/podcast_dunder_init.yaml @@ -7,7 +7,7 @@ tags: - general payment_tiers: - free - complexity: + difficulty: - beginner - intermediate type: diff --git a/pydis_site/apps/resources/resources/practical_python_programming.yaml b/pydis_site/apps/resources/resources/practical_python_programming.yaml index 85b3967a..12873b7c 100644 --- a/pydis_site/apps/resources/resources/practical_python_programming.yaml +++ b/pydis_site/apps/resources/resources/practical_python_programming.yaml @@ -12,7 +12,7 @@ tags: - general payment_tiers: - free - complexity: + difficulty: - beginner type: - course diff --git a/pydis_site/apps/resources/resources/pycharm.yaml b/pydis_site/apps/resources/resources/pycharm.yaml index 1fda3bff..574158bc 100644 --- a/pydis_site/apps/resources/resources/pycharm.yaml +++ b/pydis_site/apps/resources/resources/pycharm.yaml @@ -8,7 +8,7 @@ tags: payment_tiers: - free - paid - complexity: + difficulty: - intermediate type: - tool diff --git a/pydis_site/apps/resources/resources/pyglet.yaml b/pydis_site/apps/resources/resources/pyglet.yaml index d4a37fa8..a47c7e62 100644 --- a/pydis_site/apps/resources/resources/pyglet.yaml +++ b/pydis_site/apps/resources/resources/pyglet.yaml @@ -15,7 +15,7 @@ tags: - game development payment_tiers: - free - complexity: + difficulty: - beginner - intermediate type: diff --git a/pydis_site/apps/resources/resources/python_bytes.yaml b/pydis_site/apps/resources/resources/python_bytes.yaml index 578fff2e..9beba4f4 100644 --- a/pydis_site/apps/resources/resources/python_bytes.yaml +++ b/pydis_site/apps/resources/resources/python_bytes.yaml @@ -8,7 +8,7 @@ tags: - general payment_tiers: - free - complexity: + difficulty: - beginner - intermediate type: diff --git a/pydis_site/apps/resources/resources/python_cheat_sheet.yaml b/pydis_site/apps/resources/resources/python_cheat_sheet.yaml index da9b980f..56f61165 100644 --- a/pydis_site/apps/resources/resources/python_cheat_sheet.yaml +++ b/pydis_site/apps/resources/resources/python_cheat_sheet.yaml @@ -7,7 +7,7 @@ tags: - general payment_tiers: - free - complexity: + difficulty: - beginner type: - tutorial diff --git a/pydis_site/apps/resources/resources/python_cookbook.yaml b/pydis_site/apps/resources/resources/python_cookbook.yaml index 855adb2f..fbb1bdc8 100644 --- a/pydis_site/apps/resources/resources/python_cookbook.yaml +++ b/pydis_site/apps/resources/resources/python_cookbook.yaml @@ -15,7 +15,7 @@ tags: - software design payment_tiers: - paid - complexity: + difficulty: - intermediate type: - book diff --git a/pydis_site/apps/resources/resources/python_crash_course.yaml b/pydis_site/apps/resources/resources/python_crash_course.yaml index 379cf954..9de1a53c 100644 --- a/pydis_site/apps/resources/resources/python_crash_course.yaml +++ b/pydis_site/apps/resources/resources/python_crash_course.yaml @@ -21,7 +21,7 @@ tags: - game development payment_tiers: - paid - complexity: + difficulty: - beginner type: - book diff --git a/pydis_site/apps/resources/resources/python_developer_guide.yaml b/pydis_site/apps/resources/resources/python_developer_guide.yaml index f17c88ce..2806d75d 100644 --- a/pydis_site/apps/resources/resources/python_developer_guide.yaml +++ b/pydis_site/apps/resources/resources/python_developer_guide.yaml @@ -7,7 +7,7 @@ tags: - general payment_tiers: - free - complexity: + difficulty: - intermediate type: - tutorial diff --git a/pydis_site/apps/resources/resources/python_discord_videos.yaml b/pydis_site/apps/resources/resources/python_discord_videos.yaml index bf44083f..15a04097 100644 --- a/pydis_site/apps/resources/resources/python_discord_videos.yaml +++ b/pydis_site/apps/resources/resources/python_discord_videos.yaml @@ -8,7 +8,7 @@ tags: - software design payment_tiers: - free - complexity: + difficulty: - beginner - intermediate type: diff --git a/pydis_site/apps/resources/resources/python_morsels.yaml b/pydis_site/apps/resources/resources/python_morsels.yaml index de02be7f..bbc8133b 100644 --- a/pydis_site/apps/resources/resources/python_morsels.yaml +++ b/pydis_site/apps/resources/resources/python_morsels.yaml @@ -13,7 +13,7 @@ tags: - software design payment_tiers: - subscription - complexity: + difficulty: - intermediate type: - interactive diff --git a/pydis_site/apps/resources/resources/python_subreddit.yaml b/pydis_site/apps/resources/resources/python_subreddit.yaml index ef9f23d9..e94f84fc 100644 --- a/pydis_site/apps/resources/resources/python_subreddit.yaml +++ b/pydis_site/apps/resources/resources/python_subreddit.yaml @@ -9,7 +9,7 @@ tags: - general payment_tiers: - free - complexity: + difficulty: - beginner - intermediate type: diff --git a/pydis_site/apps/resources/resources/python_tricks.yaml b/pydis_site/apps/resources/resources/python_tricks.yaml index 17f40732..a38fa74b 100644 --- a/pydis_site/apps/resources/resources/python_tricks.yaml +++ b/pydis_site/apps/resources/resources/python_tricks.yaml @@ -13,7 +13,7 @@ tags: - software design payment_tiers: - paid - complexity: + difficulty: - intermediate type: - book diff --git a/pydis_site/apps/resources/resources/python_tutor.yaml b/pydis_site/apps/resources/resources/python_tutor.yaml index 4f6d5130..6bee0d69 100644 --- a/pydis_site/apps/resources/resources/python_tutor.yaml +++ b/pydis_site/apps/resources/resources/python_tutor.yaml @@ -6,7 +6,7 @@ tags: - general payment_tiers: - free - complexity: + difficulty: - beginner - intermediate type: diff --git a/pydis_site/apps/resources/resources/real_python.yaml b/pydis_site/apps/resources/resources/real_python.yaml index 1669638e..0d0b2ad3 100644 --- a/pydis_site/apps/resources/resources/real_python.yaml +++ b/pydis_site/apps/resources/resources/real_python.yaml @@ -15,7 +15,7 @@ tags: - general payment_tiers: - free - complexity: + difficulty: - beginner - intermediate type: diff --git a/pydis_site/apps/resources/resources/regex101.yaml b/pydis_site/apps/resources/resources/regex101.yaml index db3df957..45d00f1b 100644 --- a/pydis_site/apps/resources/resources/regex101.yaml +++ b/pydis_site/apps/resources/resources/regex101.yaml @@ -8,7 +8,7 @@ tags: - other payment_tiers: - free - complexity: + difficulty: - beginner - intermediate type: diff --git a/pydis_site/apps/resources/resources/repl_it.yaml b/pydis_site/apps/resources/resources/repl_it.yaml index e1ba1d19..e0f6cbb3 100644 --- a/pydis_site/apps/resources/resources/repl_it.yaml +++ b/pydis_site/apps/resources/resources/repl_it.yaml @@ -7,7 +7,7 @@ tags: - general payment_tiers: - free - complexity: + difficulty: - beginner - intermediate type: diff --git a/pydis_site/apps/resources/resources/screen_readers.yaml b/pydis_site/apps/resources/resources/screen_readers.yaml index 9673a132..b086b301 100644 --- a/pydis_site/apps/resources/resources/screen_readers.yaml +++ b/pydis_site/apps/resources/resources/screen_readers.yaml @@ -10,7 +10,7 @@ tags: payment_tiers: - free - paid - complexity: + difficulty: - beginner - intermediate type: diff --git a/pydis_site/apps/resources/resources/sentdex.yaml b/pydis_site/apps/resources/resources/sentdex.yaml index 47a8852d..d9131039 100644 --- a/pydis_site/apps/resources/resources/sentdex.yaml +++ b/pydis_site/apps/resources/resources/sentdex.yaml @@ -24,7 +24,7 @@ tags: - data science payment_tiers: - free - complexity: + difficulty: - beginner - intermediate type: diff --git a/pydis_site/apps/resources/resources/simple_guide_to_git.yaml b/pydis_site/apps/resources/resources/simple_guide_to_git.yaml index 6dacdf5c..3bb46e6d 100644 --- a/pydis_site/apps/resources/resources/simple_guide_to_git.yaml +++ b/pydis_site/apps/resources/resources/simple_guide_to_git.yaml @@ -8,7 +8,7 @@ tags: - tooling payment_tiers: - free - complexity: + difficulty: - beginner type: - tutorial diff --git a/pydis_site/apps/resources/resources/sololearn.yaml b/pydis_site/apps/resources/resources/sololearn.yaml index b9b59bca..998f5368 100644 --- a/pydis_site/apps/resources/resources/sololearn.yaml +++ b/pydis_site/apps/resources/resources/sololearn.yaml @@ -10,7 +10,7 @@ tags: payment_tiers: - free - subscription - complexity: + difficulty: - beginner type: - interactive diff --git a/pydis_site/apps/resources/resources/spyder.yaml b/pydis_site/apps/resources/resources/spyder.yaml index 8dc05542..668e9306 100644 --- a/pydis_site/apps/resources/resources/spyder.yaml +++ b/pydis_site/apps/resources/resources/spyder.yaml @@ -7,7 +7,7 @@ tags: - data science payment_tiers: - free - complexity: + difficulty: - beginner - intermediate type: diff --git a/pydis_site/apps/resources/resources/sublime_text.yaml b/pydis_site/apps/resources/resources/sublime_text.yaml index 76aeac45..05596477 100644 --- a/pydis_site/apps/resources/resources/sublime_text.yaml +++ b/pydis_site/apps/resources/resources/sublime_text.yaml @@ -7,7 +7,7 @@ tags: - general payment_tiers: - free - complexity: + difficulty: - beginner - intermediate type: diff --git a/pydis_site/apps/resources/resources/talk_python_to_me.yaml b/pydis_site/apps/resources/resources/talk_python_to_me.yaml index 00726203..509922c3 100644 --- a/pydis_site/apps/resources/resources/talk_python_to_me.yaml +++ b/pydis_site/apps/resources/resources/talk_python_to_me.yaml @@ -7,7 +7,7 @@ tags: - general payment_tiers: - free - complexity: + difficulty: - beginner - intermediate type: diff --git a/pydis_site/apps/resources/resources/talon_voice.yaml b/pydis_site/apps/resources/resources/talon_voice.yaml index 0f28a328..3be5fe20 100644 --- a/pydis_site/apps/resources/resources/talon_voice.yaml +++ b/pydis_site/apps/resources/resources/talon_voice.yaml @@ -8,7 +8,7 @@ tags: - other payment_tiers: - free - complexity: + difficulty: - beginner - intermediate type: diff --git a/pydis_site/apps/resources/resources/test_and_code.yaml b/pydis_site/apps/resources/resources/test_and_code.yaml index efe0c218..f0d1c3b3 100644 --- a/pydis_site/apps/resources/resources/test_and_code.yaml +++ b/pydis_site/apps/resources/resources/test_and_code.yaml @@ -8,7 +8,7 @@ tags: - tooling payment_tiers: - free - complexity: + difficulty: - beginner - intermediate type: diff --git a/pydis_site/apps/resources/resources/the_flask_mega_tutorial.yaml b/pydis_site/apps/resources/resources/the_flask_mega_tutorial.yaml index 514da947..151768a5 100644 --- a/pydis_site/apps/resources/resources/the_flask_mega_tutorial.yaml +++ b/pydis_site/apps/resources/resources/the_flask_mega_tutorial.yaml @@ -6,7 +6,7 @@ tags: - web development payment_tiers: - free - complexity: + difficulty: - beginner - intermediate type: diff --git a/pydis_site/apps/resources/resources/the_real_python_podcast.yaml b/pydis_site/apps/resources/resources/the_real_python_podcast.yaml index 62ba32ce..647779d5 100644 --- a/pydis_site/apps/resources/resources/the_real_python_podcast.yaml +++ b/pydis_site/apps/resources/resources/the_real_python_podcast.yaml @@ -9,7 +9,7 @@ tags: - general payment_tiers: - free - complexity: + difficulty: - beginner - intermediate type: diff --git a/pydis_site/apps/resources/resources/think_python.yaml b/pydis_site/apps/resources/resources/think_python.yaml index aceaf951..f9211308 100644 --- a/pydis_site/apps/resources/resources/think_python.yaml +++ b/pydis_site/apps/resources/resources/think_python.yaml @@ -18,7 +18,7 @@ tags: - software design payment_tiers: - paid - complexity: + difficulty: - beginner type: - book diff --git a/pydis_site/apps/resources/resources/thonny.yaml b/pydis_site/apps/resources/resources/thonny.yaml index a60e4d1b..29ba9e07 100644 --- a/pydis_site/apps/resources/resources/thonny.yaml +++ b/pydis_site/apps/resources/resources/thonny.yaml @@ -8,7 +8,7 @@ tags: - general payment_tiers: - free - complexity: + difficulty: - beginner type: - tool diff --git a/pydis_site/apps/resources/resources/two_scoops_of_django.yaml b/pydis_site/apps/resources/resources/two_scoops_of_django.yaml index 4eadc28d..63730ac9 100644 --- a/pydis_site/apps/resources/resources/two_scoops_of_django.yaml +++ b/pydis_site/apps/resources/resources/two_scoops_of_django.yaml @@ -14,7 +14,7 @@ tags: - web development payment_tiers: - paid - complexity: + difficulty: - intermediate type: - book diff --git a/pydis_site/apps/resources/resources/university_of_michigan.yaml b/pydis_site/apps/resources/resources/university_of_michigan.yaml index 843b64ed..7aaaf2ae 100644 --- a/pydis_site/apps/resources/resources/university_of_michigan.yaml +++ b/pydis_site/apps/resources/resources/university_of_michigan.yaml @@ -7,7 +7,7 @@ tags: - general payment_tiers: - free - complexity: + difficulty: - beginner type: - course diff --git a/pydis_site/apps/resources/resources/university_of_toronto.yaml b/pydis_site/apps/resources/resources/university_of_toronto.yaml index d057eb39..94df96f2 100644 --- a/pydis_site/apps/resources/resources/university_of_toronto.yaml +++ b/pydis_site/apps/resources/resources/university_of_toronto.yaml @@ -13,7 +13,7 @@ tags: - general payment_tiers: - free - complexity: + difficulty: - beginner - intermediate type: diff --git a/pydis_site/apps/resources/resources/vcokltfre_discord_bot_tutorial.yaml b/pydis_site/apps/resources/resources/vcokltfre_discord_bot_tutorial.yaml index 02f9fe5a..1a3dd457 100644 --- a/pydis_site/apps/resources/resources/vcokltfre_discord_bot_tutorial.yaml +++ b/pydis_site/apps/resources/resources/vcokltfre_discord_bot_tutorial.yaml @@ -8,7 +8,7 @@ tags: - discord bots payment_tiers: - free - complexity: + difficulty: - intermediate type: - tutorial diff --git a/pydis_site/apps/resources/resources/visual_studio_code.yaml b/pydis_site/apps/resources/resources/visual_studio_code.yaml index f09efcf8..3cf858f8 100644 --- a/pydis_site/apps/resources/resources/visual_studio_code.yaml +++ b/pydis_site/apps/resources/resources/visual_studio_code.yaml @@ -6,7 +6,7 @@ tags: - general payment_tiers: - free - complexity: + difficulty: - beginner - intermediate type: diff --git a/pydis_site/apps/resources/resources/wtf_python.yaml b/pydis_site/apps/resources/resources/wtf_python.yaml index 7f67ccf9..6d90ba39 100644 --- a/pydis_site/apps/resources/resources/wtf_python.yaml +++ b/pydis_site/apps/resources/resources/wtf_python.yaml @@ -12,7 +12,7 @@ tags: - other payment_tiers: - free - complexity: + difficulty: - intermediate type: - tutorial diff --git a/pydis_site/apps/resources/views/resources.py b/pydis_site/apps/resources/views/resources.py index 57cb4f71..14b3d0bf 100644 --- a/pydis_site/apps/resources/views/resources.py +++ b/pydis_site/apps/resources/views/resources.py @@ -28,7 +28,7 @@ class ResourceView(View): resource_tags = { "topics": set(), "payment_tiers": set(), - "complexity": set(), + "difficulty": set(), "type": set(), } for resource_name, resource in self.resources.items(): @@ -53,8 +53,8 @@ class ResourceView(View): # Set up all the filter checkbox metadata self.filters = { - "Complexity": { - "filters": sorted(resource_tags.get("complexity")), + "Difficulty": { + "filters": sorted(resource_tags.get("difficulty")), "icon": "fas fa-brain", "hidden": False, }, @@ -84,7 +84,7 @@ class ResourceView(View): ('topics', 'topics'), ('type', 'type'), ('payment_tiers', 'payment'), - ('complexity', 'complexity'), + ('difficulty', 'difficulty'), ) } diff --git a/pydis_site/static/js/resources.js b/pydis_site/static/js/resources.js index 89b8ae06..eaca3978 100644 --- a/pydis_site/static/js/resources.js +++ b/pydis_site/static/js/resources.js @@ -5,7 +5,7 @@ var activeFilters = { topics: [], type: [], "payment-tiers": [], - complexity: [] + difficulty: [] }; function addFilter(filterName, filterItem) { @@ -45,7 +45,7 @@ function noFilters() { activeFilters.topics.length === 0 && activeFilters.type.length === 0 && activeFilters["payment-tiers"].length === 0 && - activeFilters.complexity.length === 0 + activeFilters.difficulty.length === 0 ); } @@ -120,7 +120,7 @@ function updateUI() { topics: false, type: false, 'payment-tiers': false, - complexity: false + difficulty: false }; let resourceBox = $(this); diff --git a/pydis_site/templates/resources/resource_box.html b/pydis_site/templates/resources/resource_box.html index 476a4841..8a1017b5 100644 --- a/pydis_site/templates/resources/resource_box.html +++ b/pydis_site/templates/resources/resource_box.html @@ -64,10 +64,10 @@ {{ tag|title }} {% endfor %} - {% for tag in resource.tags.complexity %} + {% for tag in resource.tags.difficulty %} diff --git a/pydis_site/templates/resources/resources.html b/pydis_site/templates/resources/resources.html index 166863c3..9ebebe1f 100644 --- a/pydis_site/templates/resources/resources.html +++ b/pydis_site/templates/resources/resources.html @@ -29,7 +29,7 @@
{% for filter_name, filter_data in filters.items %} {% for filter_item in filter_data.filters %} - {% if filter_name == "Complexity" %} + {% if filter_name == "Difficulty" %} Date: Sat, 29 Jan 2022 14:55:01 +0100 Subject: Sort all the resources alphabetically. --- pydis_site/apps/resources/tests/test_views.py | 1 - pydis_site/apps/resources/views/resources.py | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'pydis_site/apps') diff --git a/pydis_site/apps/resources/tests/test_views.py b/pydis_site/apps/resources/tests/test_views.py index f96a04b0..dab3599d 100644 --- a/pydis_site/apps/resources/tests/test_views.py +++ b/pydis_site/apps/resources/tests/test_views.py @@ -1,5 +1,4 @@ from pathlib import Path -from unittest.mock import patch from django.conf import settings from django.test import TestCase diff --git a/pydis_site/apps/resources/views/resources.py b/pydis_site/apps/resources/views/resources.py index 14b3d0bf..d0b8bae7 100644 --- a/pydis_site/apps/resources/views/resources.py +++ b/pydis_site/apps/resources/views/resources.py @@ -2,7 +2,7 @@ from pathlib import Path import yaml from django.core.handlers.wsgi import WSGIRequest -from django.http import HttpRequest, HttpResponse +from django.http import HttpResponse from django.shortcuts import render from django.views import View @@ -24,6 +24,9 @@ class ResourceView(View): for path in RESOURCES_PATH.rglob("*.yaml") } + # Sort the resources alphabetically + self.resources = dict(sorted(self.resources.items())) + # Parse out all current tags resource_tags = { "topics": set(), -- cgit v1.2.3 From 92db284aab0ac64c7783a6019d2eb697ce973e95 Mon Sep 17 00:00:00 2001 From: Leon Sandøy Date: Sat, 29 Jan 2022 16:02:17 +0100 Subject: Add redirects for all old resource endpoints. This will maintain backwards compatibility once this is merged. --- pydis_site/apps/redirect/redirects.yaml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'pydis_site/apps') diff --git a/pydis_site/apps/redirect/redirects.yaml b/pydis_site/apps/redirect/redirects.yaml index 8022e7bf..bee65103 100644 --- a/pydis_site/apps/redirect/redirects.yaml +++ b/pydis_site/apps/redirect/redirects.yaml @@ -87,6 +87,34 @@ resources_index_redirect: original_path: pages/resources/ redirect_route: "resources:index" +resources_reading_redirect: + original_path: resources/reading/ + redirect_route: "resources:index" + +resources_videos_redirect: + original_path: resources/videos/ + redirect_route: "resources:index" + +resources_interactive_redirect: + original_path: resources/interactive/ + redirect_route: "resources:index" + +resources_courses_redirect: + original_path: resources/courses/ + redirect_route: "resources:index" + +resources_communities_redirect: + original_path: resources/communities/ + redirect_route: "resources:index" + +resources_podcasts_redirect: + original_path: resources/podcasts/ + redirect_route: "resources:index" + +resources_tools_redirect: + original_path: resources/tools/ + redirect_route: "resources:index" + # Events events_index_redirect: original_path: pages/events/ -- cgit v1.2.3 From e53a3a15d0213b3854a3c9619390f0a0e35c4bf6 Mon Sep 17 00:00:00 2001 From: Leon Sandøy Date: Sun, 30 Jan 2022 11:41:44 +0100 Subject: Redirects from old endpoints now filter correctly. For example, navigating to pydis.com/resources/communities will now correctly redirect to pydis.com/resources/?type=community. --- pydis_site/apps/redirect/redirects.yaml | 10 ++++++---- pydis_site/apps/resources/urls.py | 1 + pydis_site/apps/resources/views/resources.py | 25 ++++++++----------------- pydis_site/static/js/resources.js | 8 ++++++++ pydis_site/templates/resources/resources.html | 1 + 5 files changed, 24 insertions(+), 21 deletions(-) (limited to 'pydis_site/apps') diff --git a/pydis_site/apps/redirect/redirects.yaml b/pydis_site/apps/redirect/redirects.yaml index bee65103..533b9e25 100644 --- a/pydis_site/apps/redirect/redirects.yaml +++ b/pydis_site/apps/redirect/redirects.yaml @@ -90,30 +90,32 @@ resources_index_redirect: resources_reading_redirect: original_path: resources/reading/ redirect_route: "resources:index" + redirect_arguments: ["book"] resources_videos_redirect: original_path: resources/videos/ redirect_route: "resources:index" - -resources_interactive_redirect: - original_path: resources/interactive/ - redirect_route: "resources:index" + redirect_arguments: ["video"] resources_courses_redirect: original_path: resources/courses/ redirect_route: "resources:index" + redirect_arguments: ["course"] resources_communities_redirect: original_path: resources/communities/ redirect_route: "resources:index" + redirect_arguments: ["community"] resources_podcasts_redirect: original_path: resources/podcasts/ redirect_route: "resources:index" + redirect_arguments: ["podcast"] resources_tools_redirect: original_path: resources/tools/ redirect_route: "resources:index" + redirect_arguments: ["tool"] # Events events_index_redirect: diff --git a/pydis_site/apps/resources/urls.py b/pydis_site/apps/resources/urls.py index 5d5ae7fb..ed24dc99 100644 --- a/pydis_site/apps/resources/urls.py +++ b/pydis_site/apps/resources/urls.py @@ -5,4 +5,5 @@ from pydis_site.apps.resources import views app_name = "resources" urlpatterns = [ distill_path("", views.resources.ResourceView.as_view(), name="index"), + distill_path("/", views.resources.ResourceView.as_view(), name="index"), ] diff --git a/pydis_site/apps/resources/views/resources.py b/pydis_site/apps/resources/views/resources.py index d0b8bae7..b828d89a 100644 --- a/pydis_site/apps/resources/views/resources.py +++ b/pydis_site/apps/resources/views/resources.py @@ -1,8 +1,9 @@ from pathlib import Path +import typing as t import yaml from django.core.handlers.wsgi import WSGIRequest -from django.http import HttpResponse +from django.http import HttpResponse, HttpResponseNotFound from django.shortcuts import render from django.views import View @@ -78,22 +79,12 @@ class ResourceView(View): } } - @staticmethod - def _get_filter_options(request: WSGIRequest) -> dict[str, set]: - """Get the requested filter options out of the request object.""" - return { - option: set(request.GET.get(url_param, "").split(",")[:-1]) - for option, url_param in ( - ('topics', 'topics'), - ('type', 'type'), - ('payment_tiers', 'payment'), - ('difficulty', 'difficulty'), - ) - } - - def get(self, request: WSGIRequest) -> HttpResponse: + def get(self, request: WSGIRequest, resource_type: t.Optional[str] = None) -> HttpResponse: """List out all the resources, and any filtering options from the URL.""" - filter_options = self._get_filter_options(request) + + # Add type filtering if the request is made to somewhere like /resources/video + if resource_type and resource_type.title() not in self.filters['Type']['filters']: + return HttpResponseNotFound() return render( request, @@ -101,6 +92,6 @@ class ResourceView(View): context={ "resources": self.resources, "filters": self.filters, - "filter_options": filter_options, + "resource_type": resource_type, } ) diff --git a/pydis_site/static/js/resources.js b/pydis_site/static/js/resources.js index eaca3978..bf570097 100644 --- a/pydis_site/static/js/resources.js +++ b/pydis_site/static/js/resources.js @@ -160,6 +160,14 @@ function updateUI() { // Executed when the page has finished loading. document.addEventListener("DOMContentLoaded", function () { + /* Check if the user has navigated to one of the old resource pages, + like pydis.com/resources/communities. In this case, we'll rewrite + the URL before we do anything else. */ + let resourceTypeInput = $("#resource-type-input").val(); + if (resourceTypeInput.length !== 0) { + window.history.replaceState(null, document.title, `../?type=${resourceTypeInput}`); + } + // Update the filters on page load to reflect URL parameters. $('.filter-box-tag').hide(); deserializeURLParams(); diff --git a/pydis_site/templates/resources/resources.html b/pydis_site/templates/resources/resources.html index 9ebebe1f..7a284fd6 100644 --- a/pydis_site/templates/resources/resources.html +++ b/pydis_site/templates/resources/resources.html @@ -16,6 +16,7 @@ {% block content %} {% include "base/navbar.html" %} +
{# Filtering toolbox #} -- cgit v1.2.3 From d8c5571a266438d5e2e0c9fd4a35adf469688730 Mon Sep 17 00:00:00 2001 From: Leon Sandøy Date: Sun, 30 Jan 2022 12:34:29 +0100 Subject: Support dashful redirects. Previously, trying to go to `resources/project%20ideas` would crash the filtering JS. This has now been sorted out, so that these types of redirects have their spaces replaced by dashes, which makes them valid again. --- pydis_site/apps/resources/views/resources.py | 7 +++++-- pydis_site/static/js/resources.js | 11 +++++------ pydis_site/templates/resources/resources.html | 1 - 3 files changed, 10 insertions(+), 9 deletions(-) (limited to 'pydis_site/apps') diff --git a/pydis_site/apps/resources/views/resources.py b/pydis_site/apps/resources/views/resources.py index b828d89a..709fad6c 100644 --- a/pydis_site/apps/resources/views/resources.py +++ b/pydis_site/apps/resources/views/resources.py @@ -82,9 +82,12 @@ class ResourceView(View): def get(self, request: WSGIRequest, resource_type: t.Optional[str] = None) -> HttpResponse: """List out all the resources, and any filtering options from the URL.""" - # Add type filtering if the request is made to somewhere like /resources/video - if resource_type and resource_type.title() not in self.filters['Type']['filters']: + # Add type filtering if the request is made to somewhere like /resources/video. + # We also convert all spaces to dashes, so they'll correspond with the filters. + dashless_resource_type = resource_type.replace("-", " ") + if resource_type and dashless_resource_type.title() not in self.filters['Type']['filters']: return HttpResponseNotFound() + resource_type = resource_type.replace(" ", "-") return render( request, diff --git a/pydis_site/static/js/resources.js b/pydis_site/static/js/resources.js index bfcd569d..34587c81 100644 --- a/pydis_site/static/js/resources.js +++ b/pydis_site/static/js/resources.js @@ -64,9 +64,9 @@ function deserializeURLParams() { // Update the corresponding filter UI, so it reflects the internal state. $(paramFilterArray).each(function(_, filter) { - let checkbox = $(`.filter-checkbox[data-filter-name=${filterType}][data-filter-item=${filter}]`); - let filterTag = $(`.filter-box-tag[data-filter-name=${filterType}][data-filter-item=${filter}]`); - let resourceTags = $(`.resource-tag[data-filter-name=${filterType}][data-filter-item=${filter}]`); + let checkbox = $(`.filter-checkbox[data-filter-name='${filterType}'][data-filter-item='${filter}']`); + let filterTag = $(`.filter-box-tag[data-filter-name='${filterType}'][data-filter-item='${filter}']`); + let resourceTags = $(`.resource-tag[data-filter-name='${filterType}'][data-filter-item='${filter}']`); checkbox.prop("checked", true); filterTag.show(); resourceTags.addClass("active"); @@ -149,7 +149,6 @@ function updateUI() { }).show(); // If there are no matches, show the no matches message - console.log(hasMatches); if (!hasMatches) { $(".no-resources-found").show(); } else { @@ -196,7 +195,7 @@ document.addEventListener("DOMContentLoaded", function () { $('.filter-box-tag').click(function() { let filterItem = this.dataset.filterItem; let filterName = this.dataset.filterName; - let checkbox = $(`.filter-checkbox[data-filter-name=${filterName}][data-filter-item=${filterItem}]`); + let checkbox = $(`.filter-checkbox[data-filter-name='${filterName}'][data-filter-item='${filterItem}']`); removeFilter(filterName, filterItem); checkbox.prop("checked", false); @@ -206,7 +205,7 @@ document.addEventListener("DOMContentLoaded", function () { $('.resource-tag').click(function() { let filterItem = this.dataset.filterItem; let filterName = this.dataset.filterName; - let checkbox = $(`.filter-checkbox[data-filter-name=${filterName}][data-filter-item=${filterItem}]`) + let checkbox = $(`.filter-checkbox[data-filter-name='${filterName}'][data-filter-item='${filterItem}']`); if (!$(this).hasClass("active")) { addFilter(filterName, filterItem); diff --git a/pydis_site/templates/resources/resources.html b/pydis_site/templates/resources/resources.html index 7a284fd6..4dd07270 100644 --- a/pydis_site/templates/resources/resources.html +++ b/pydis_site/templates/resources/resources.html @@ -7,7 +7,6 @@ {% block title %}Resources{% endblock %} {% block head %} - -- cgit v1.2.3 From 8e8a19eef5e5ae0bd88528e8600568957d7fef75 Mon Sep 17 00:00:00 2001 From: Leon Sandøy Date: Sun, 30 Jan 2022 12:35:09 +0100 Subject: Replace is-goodreads-cream with is-black. The goodreads cream, while nice, has poor readability on a light background. So I'm ditching it and just going black with those icons. --- .../apps/resources/resources/automate_the_boring_stuff_book.yaml | 2 +- pydis_site/apps/resources/resources/byte_of_python.yaml | 2 +- pydis_site/apps/resources/resources/data_science_from_scratch.yaml | 2 +- pydis_site/apps/resources/resources/effective_python.yaml | 2 +- pydis_site/apps/resources/resources/flask_web_development.yaml | 2 +- pydis_site/apps/resources/resources/fluent_python.yaml | 2 +- pydis_site/apps/resources/resources/hitchhikers_guide_to_python.yaml | 2 +- pydis_site/apps/resources/resources/mission_python.yaml | 2 +- .../resources/resources/neural_networks_from_scratch_in_python.yaml | 2 +- pydis_site/apps/resources/resources/python_cookbook.yaml | 2 +- pydis_site/apps/resources/resources/python_crash_course.yaml | 2 +- pydis_site/apps/resources/resources/python_tricks.yaml | 2 +- pydis_site/apps/resources/resources/real_python.yaml | 3 --- pydis_site/apps/resources/resources/think_python.yaml | 2 +- pydis_site/apps/resources/resources/two_scoops_of_django.yaml | 2 +- pydis_site/apps/resources/resources/university_of_toronto.yaml | 1 + 16 files changed, 15 insertions(+), 17 deletions(-) (limited to 'pydis_site/apps') diff --git a/pydis_site/apps/resources/resources/automate_the_boring_stuff_book.yaml b/pydis_site/apps/resources/resources/automate_the_boring_stuff_book.yaml index 9bf9aba8..63f63193 100644 --- a/pydis_site/apps/resources/resources/automate_the_boring_stuff_book.yaml +++ b/pydis_site/apps/resources/resources/automate_the_boring_stuff_book.yaml @@ -8,7 +8,7 @@ title_url: https://automatetheboringstuff.com/ urls: - icon: branding/goodreads url: https://www.goodreads.com/book/show/22514127-automate-the-boring-stuff-with-python - color: goodreads-cream + color: black tags: topics: - general diff --git a/pydis_site/apps/resources/resources/byte_of_python.yaml b/pydis_site/apps/resources/resources/byte_of_python.yaml index c4b671c2..c2f6ab84 100644 --- a/pydis_site/apps/resources/resources/byte_of_python.yaml +++ b/pydis_site/apps/resources/resources/byte_of_python.yaml @@ -9,7 +9,7 @@ urls: color: black - icon: branding/goodreads url: https://www.goodreads.com/book/show/6762544-a-byte-of-python - color: goodreads-cream + color: black tags: topics: - general diff --git a/pydis_site/apps/resources/resources/data_science_from_scratch.yaml b/pydis_site/apps/resources/resources/data_science_from_scratch.yaml index 57e73a28..86955fdb 100644 --- a/pydis_site/apps/resources/resources/data_science_from_scratch.yaml +++ b/pydis_site/apps/resources/resources/data_science_from_scratch.yaml @@ -7,7 +7,7 @@ title_url: https://www.oreilly.com/library/view/data-science-from/9781492041122/ urls: - icon: branding/goodreads url: https://www.goodreads.com/en/book/show/52059715-data-science-from-scratch - color: goodreads-cream + color: black - icon: branding/github url: https://github.com/joelgrus/data-science-from-scratch color: black diff --git a/pydis_site/apps/resources/resources/effective_python.yaml b/pydis_site/apps/resources/resources/effective_python.yaml index 96a3b21a..b82fa0c3 100644 --- a/pydis_site/apps/resources/resources/effective_python.yaml +++ b/pydis_site/apps/resources/resources/effective_python.yaml @@ -5,7 +5,7 @@ title_url: https://effectivepython.com/ urls: - icon: branding/goodreads url: https://www.goodreads.com/book/show/48566725-effective-python - color: goodreads-cream + color: black - icon: branding/github url: https://github.com/bslatkin/effectivepython color: black diff --git a/pydis_site/apps/resources/resources/flask_web_development.yaml b/pydis_site/apps/resources/resources/flask_web_development.yaml index 0bd418e5..6905b2b4 100644 --- a/pydis_site/apps/resources/resources/flask_web_development.yaml +++ b/pydis_site/apps/resources/resources/flask_web_development.yaml @@ -5,7 +5,7 @@ title_url: http://shop.oreilly.com/product/0636920031116.do urls: - icon: branding/goodreads url: https://www.goodreads.com/book/show/18774655-flask-web-development - color: goodreads-cream + color: black - icon: branding/github url: https://github.com/miguelgrinberg/flasky color: black diff --git a/pydis_site/apps/resources/resources/fluent_python.yaml b/pydis_site/apps/resources/resources/fluent_python.yaml index 1d525baa..c22fd388 100644 --- a/pydis_site/apps/resources/resources/fluent_python.yaml +++ b/pydis_site/apps/resources/resources/fluent_python.yaml @@ -5,7 +5,7 @@ title_url: https://www.oreilly.com/library/view/fluent-python/9781491946237/ urls: - icon: branding/goodreads url: https://www.goodreads.com/book/show/22800567-fluent-python - color: goodreads-cream + color: black - icon: branding/github url: https://github.com/fluentpython color: black diff --git a/pydis_site/apps/resources/resources/hitchhikers_guide_to_python.yaml b/pydis_site/apps/resources/resources/hitchhikers_guide_to_python.yaml index c4b78af6..e48e5717 100644 --- a/pydis_site/apps/resources/resources/hitchhikers_guide_to_python.yaml +++ b/pydis_site/apps/resources/resources/hitchhikers_guide_to_python.yaml @@ -5,7 +5,7 @@ title_url: https://python-guide.org/ urls: - icon: branding/goodreads url: https://www.goodreads.com/book/show/28321007-the-hitchhiker-s-guide-to-python - color: goodreads-cream + color: black tags: topics: - general diff --git a/pydis_site/apps/resources/resources/mission_python.yaml b/pydis_site/apps/resources/resources/mission_python.yaml index e8e0a6b8..391a2983 100644 --- a/pydis_site/apps/resources/resources/mission_python.yaml +++ b/pydis_site/apps/resources/resources/mission_python.yaml @@ -7,7 +7,7 @@ title_url: https://www.sean.co.uk/books/mission-python/index.shtm urls: - icon: branding/goodreads url: https://www.goodreads.com/book/show/35545850-mission-python - color: goodreads-cream + color: black tags: topics: - general diff --git a/pydis_site/apps/resources/resources/neural_networks_from_scratch_in_python.yaml b/pydis_site/apps/resources/resources/neural_networks_from_scratch_in_python.yaml index 6313cabe..c4ad1e1b 100644 --- a/pydis_site/apps/resources/resources/neural_networks_from_scratch_in_python.yaml +++ b/pydis_site/apps/resources/resources/neural_networks_from_scratch_in_python.yaml @@ -7,7 +7,7 @@ title_url: https://nnfs.io/ urls: - icon: branding/goodreads url: https://www.goodreads.com/book/show/55927899-neural-networks-from-scratch-in-python - color: goodreads-cream + color: black tags: topics: - data science diff --git a/pydis_site/apps/resources/resources/python_cookbook.yaml b/pydis_site/apps/resources/resources/python_cookbook.yaml index fbb1bdc8..bc05d743 100644 --- a/pydis_site/apps/resources/resources/python_cookbook.yaml +++ b/pydis_site/apps/resources/resources/python_cookbook.yaml @@ -5,7 +5,7 @@ title_url: http://shop.oreilly.com/product/0636920027072.do urls: - icon: branding/goodreads url: https://www.goodreads.com/book/show/17152735-python-cookbook - color: goodreads-cream + color: black - icon: branding/github url: https://github.com/dabeaz/python-cookbook color: black diff --git a/pydis_site/apps/resources/resources/python_crash_course.yaml b/pydis_site/apps/resources/resources/python_crash_course.yaml index 9de1a53c..d916075e 100644 --- a/pydis_site/apps/resources/resources/python_crash_course.yaml +++ b/pydis_site/apps/resources/resources/python_crash_course.yaml @@ -11,7 +11,7 @@ title_url: https://nostarch.com/pythoncrashcourse2e urls: - icon: branding/goodreads url: https://www.goodreads.com/book/show/23241059-python-crash-course - color: goodreads-cream + color: black - icon: branding/github url: https://ehmatthes.github.io/pcc/ color: black diff --git a/pydis_site/apps/resources/resources/python_tricks.yaml b/pydis_site/apps/resources/resources/python_tricks.yaml index a38fa74b..aa1b2fcd 100644 --- a/pydis_site/apps/resources/resources/python_tricks.yaml +++ b/pydis_site/apps/resources/resources/python_tricks.yaml @@ -6,7 +6,7 @@ title_url: https://realpython.com/products/python-tricks-book/ urls: - icon: branding/goodreads url: https://www.goodreads.com/book/show/36990732-python-tricks - color: goodreads-cream + color: black tags: topics: - general diff --git a/pydis_site/apps/resources/resources/real_python.yaml b/pydis_site/apps/resources/resources/real_python.yaml index 0d0b2ad3..2ddada03 100644 --- a/pydis_site/apps/resources/resources/real_python.yaml +++ b/pydis_site/apps/resources/resources/real_python.yaml @@ -4,9 +4,6 @@ title_image: https://i.imgur.com/WDqhZ36.png title_url: https://realpython.com/ position: 3 urls: - - icon: regular/link - url: https://realpython.com/ - color: teal - icon: branding/youtube url: https://www.youtube.com/channel/UCI0vQvr9aFn27yR6Ej6n5UA color: youtube-red diff --git a/pydis_site/apps/resources/resources/think_python.yaml b/pydis_site/apps/resources/resources/think_python.yaml index f9211308..7099afd8 100644 --- a/pydis_site/apps/resources/resources/think_python.yaml +++ b/pydis_site/apps/resources/resources/think_python.yaml @@ -8,7 +8,7 @@ title_url: https://greenteapress.com/wp/think-python-2e/ urls: - icon: branding/goodreads url: https://www.goodreads.com/book/show/14514306-think-python - color: goodreads-cream + color: black - icon: branding/github url: https://github.com/AllenDowney/ThinkPython2 color: black diff --git a/pydis_site/apps/resources/resources/two_scoops_of_django.yaml b/pydis_site/apps/resources/resources/two_scoops_of_django.yaml index 63730ac9..96eafd28 100644 --- a/pydis_site/apps/resources/resources/two_scoops_of_django.yaml +++ b/pydis_site/apps/resources/resources/two_scoops_of_django.yaml @@ -5,7 +5,7 @@ title_url: https://www.feldroy.com/collections/everything/products/two-scoops-of urls: - icon: branding/goodreads url: https://www.goodreads.com/book/show/55822151-two-scoops-of-django-3-x - color: goodreads-cream + color: black - icon: branding/github url: https://github.com/twoscoops/two-scoops-of-django-2.0-code-examples color: black diff --git a/pydis_site/apps/resources/resources/university_of_toronto.yaml b/pydis_site/apps/resources/resources/university_of_toronto.yaml index 94df96f2..c3b54f84 100644 --- a/pydis_site/apps/resources/resources/university_of_toronto.yaml +++ b/pydis_site/apps/resources/resources/university_of_toronto.yaml @@ -1,6 +1,7 @@ description: A 2-part course that teaches Python. Primarily intended for high school students and first-year university students who want to learn programming. name: 'University of Toronto: Learn to Program' +title_url: https://www.coursera.org/learn/learn-to-program urls: - icon: regular/graduation-cap url: https://www.coursera.org/learn/learn-to-program -- cgit v1.2.3 From 7183fa95f079c132383c8d4e3aace79aade1f5ff Mon Sep 17 00:00:00 2001 From: Leon Sandøy Date: Sun, 30 Jan 2022 12:38:07 +0100 Subject: Add plural redirects, like /books. This is an intuitive thing to link to, so let's support it for better UX --- pydis_site/apps/redirect/redirects.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'pydis_site/apps') diff --git a/pydis_site/apps/redirect/redirects.yaml b/pydis_site/apps/redirect/redirects.yaml index 533b9e25..dc8b9359 100644 --- a/pydis_site/apps/redirect/redirects.yaml +++ b/pydis_site/apps/redirect/redirects.yaml @@ -92,6 +92,11 @@ resources_reading_redirect: redirect_route: "resources:index" redirect_arguments: ["book"] +resources_books_redirect: + original_path: resources/books/ + redirect_route: "resources:index" + redirect_arguments: [ "book" ] + resources_videos_redirect: original_path: resources/videos/ redirect_route: "resources:index" @@ -112,6 +117,11 @@ resources_podcasts_redirect: redirect_route: "resources:index" redirect_arguments: ["podcast"] +resources_tutorials_redirect: + original_path: resources/tutorials/ + redirect_route: "resources:index" + redirect_arguments: ["tutorial"] + resources_tools_redirect: original_path: resources/tools/ redirect_route: "resources:index" -- cgit v1.2.3 From bb401838ef8fa135a51d6a735dbbc3cc812d5e6c Mon Sep 17 00:00:00 2001 From: Leon Sandøy Date: Sun, 30 Jan 2022 12:42:06 +0100 Subject: Ensure "Other" is always the bottom topic. --- pydis_site/apps/resources/views/resources.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'pydis_site/apps') diff --git a/pydis_site/apps/resources/views/resources.py b/pydis_site/apps/resources/views/resources.py index 709fad6c..a5c2cf7c 100644 --- a/pydis_site/apps/resources/views/resources.py +++ b/pydis_site/apps/resources/views/resources.py @@ -1,5 +1,5 @@ -from pathlib import Path import typing as t +from pathlib import Path import yaml from django.core.handlers.wsgi import WSGIRequest @@ -79,15 +79,21 @@ class ResourceView(View): } } + # The bottom topic should always be "Other". + self.filters["Topics"]["filters"].remove("Other") + self.filters["Topics"]["filters"].append("Other") + def get(self, request: WSGIRequest, resource_type: t.Optional[str] = None) -> HttpResponse: """List out all the resources, and any filtering options from the URL.""" - # Add type filtering if the request is made to somewhere like /resources/video. # We also convert all spaces to dashes, so they'll correspond with the filters. - dashless_resource_type = resource_type.replace("-", " ") - if resource_type and dashless_resource_type.title() not in self.filters['Type']['filters']: - return HttpResponseNotFound() - resource_type = resource_type.replace(" ", "-") + if resource_type: + dashless_resource_type = resource_type.replace("-", " ") + + if dashless_resource_type.title() not in self.filters['Type']['filters']: + return HttpResponseNotFound() + + resource_type = resource_type.replace(" ", "-") return render( request, -- cgit v1.2.3 From 4b17d714fb0cb7d1fd199a2ca123b6d18fe377e7 Mon Sep 17 00:00:00 2001 From: Leon Sandøy Date: Sun, 30 Jan 2022 14:02:19 +0100 Subject: Fix resource redirects for deploy previews. This could probably be improved by making it less hardcoded, but since there's a bunch of special cases, and since it only affects deploy previews, I'm choosing to solve this with a simple solution. I don't think realistically that we're gonna be adding a ton of resource types down the line anyway. --- pydis_site/apps/content/urls.py | 2 +- pydis_site/apps/resources/urls.py | 40 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 40 insertions(+), 2 deletions(-) (limited to 'pydis_site/apps') diff --git a/pydis_site/apps/content/urls.py b/pydis_site/apps/content/urls.py index fe7c2852..f8496095 100644 --- a/pydis_site/apps/content/urls.py +++ b/pydis_site/apps/content/urls.py @@ -30,7 +30,7 @@ def __get_all_files(root: Path, folder: typing.Optional[Path] = None) -> list[st def get_all_pages() -> typing.Iterator[dict[str, str]]: - """Yield a dict of all pag categories.""" + """Yield a dict of all page categories.""" for location in __get_all_files(Path("pydis_site", "apps", "content", "resources")): yield {"location": location} diff --git a/pydis_site/apps/resources/urls.py b/pydis_site/apps/resources/urls.py index ed24dc99..aa3892b6 100644 --- a/pydis_site/apps/resources/urls.py +++ b/pydis_site/apps/resources/urls.py @@ -1,9 +1,47 @@ +import typing + from django_distill import distill_path from pydis_site.apps.resources import views +# This is only used for `distill_path`, so that the Netlify Deploy Previews +# can successfully redirect to static pages. This could probably be improved by +# making it less hardcoded, but since there's a bunch of special cases, and since +# it only affects deploy previews, I'm choosing to solve this with a simple solution. +VALID_RESOURCE_TYPES = [ + "book", + "books", + "reading", + "podcast", + "podcasts", + "interactive", + "videos", + "video", + "courses", + "course", + "communities", + "community", + "tutorial", + "tutorials", + "tool", + "tools", + "project ideas", + "project-ideas", +] + + +def get_all_pages() -> typing.Iterator[dict[str, str]]: + for resource_type in VALID_RESOURCE_TYPES: + yield {"resource_type": resource_type} + + app_name = "resources" urlpatterns = [ distill_path("", views.resources.ResourceView.as_view(), name="index"), - distill_path("/", views.resources.ResourceView.as_view(), name="index"), + distill_path( + "/", + views.resources.ResourceView.as_view(), + name="index", + distill_func=get_all_pages, + ), ] -- cgit v1.2.3 From d1d5f2e8da74fc463bd5132ef920f7f77060759e Mon Sep 17 00:00:00 2001 From: Leon Sandøy Date: Sun, 30 Jan 2022 14:02:38 +0100 Subject: Get rid of the title_url for university of toronto --- pydis_site/apps/resources/resources/university_of_toronto.yaml | 1 - 1 file changed, 1 deletion(-) (limited to 'pydis_site/apps') diff --git a/pydis_site/apps/resources/resources/university_of_toronto.yaml b/pydis_site/apps/resources/resources/university_of_toronto.yaml index c3b54f84..94df96f2 100644 --- a/pydis_site/apps/resources/resources/university_of_toronto.yaml +++ b/pydis_site/apps/resources/resources/university_of_toronto.yaml @@ -1,7 +1,6 @@ description: A 2-part course that teaches Python. Primarily intended for high school students and first-year university students who want to learn programming. name: 'University of Toronto: Learn to Program' -title_url: https://www.coursera.org/learn/learn-to-program urls: - icon: regular/graduation-cap url: https://www.coursera.org/learn/learn-to-program -- cgit v1.2.3 From dda3e355ac31dc4b9629f2e9e63474bbba69d740 Mon Sep 17 00:00:00 2001 From: Leon Sandøy Date: Sun, 30 Jan 2022 14:29:48 +0100 Subject: Refactor: collapsibles as a stand-alone component --- pydis_site/apps/resources/urls.py | 1 + pydis_site/static/css/collapsibles.css | 12 ++ pydis_site/static/css/content/page.css | 13 -- pydis_site/static/js/collapsibles.js | 13 ++ pydis_site/static/js/content/page.js | 13 -- pydis_site/static/js/resources.js | 236 -------------------------- pydis_site/static/js/resources/resources.js | 236 ++++++++++++++++++++++++++ pydis_site/templates/content/base.html | 3 +- pydis_site/templates/resources/resources.html | 6 +- 9 files changed, 267 insertions(+), 266 deletions(-) create mode 100644 pydis_site/static/css/collapsibles.css create mode 100644 pydis_site/static/js/collapsibles.js delete mode 100644 pydis_site/static/js/content/page.js delete mode 100644 pydis_site/static/js/resources.js create mode 100644 pydis_site/static/js/resources/resources.js (limited to 'pydis_site/apps') diff --git a/pydis_site/apps/resources/urls.py b/pydis_site/apps/resources/urls.py index aa3892b6..044f7072 100644 --- a/pydis_site/apps/resources/urls.py +++ b/pydis_site/apps/resources/urls.py @@ -31,6 +31,7 @@ VALID_RESOURCE_TYPES = [ def get_all_pages() -> typing.Iterator[dict[str, str]]: + """Get all the valid options for the resource_type path selector.""" for resource_type in VALID_RESOURCE_TYPES: yield {"resource_type": resource_type} diff --git a/pydis_site/static/css/collapsibles.css b/pydis_site/static/css/collapsibles.css new file mode 100644 index 00000000..7b76d8d5 --- /dev/null +++ b/pydis_site/static/css/collapsibles.css @@ -0,0 +1,12 @@ +.collapsible { + cursor: pointer; + width: 100%; + border: none; + outline: none; +} + +.collapsible-content { + overflow: hidden; + max-height: 0; + transition: max-height 0.2s ease-out; +} \ No newline at end of file diff --git a/pydis_site/static/css/content/page.css b/pydis_site/static/css/content/page.css index 2d4bd325..d831f86d 100644 --- a/pydis_site/static/css/content/page.css +++ b/pydis_site/static/css/content/page.css @@ -77,16 +77,3 @@ ul.menu-list.toc { li img { margin-top: 0.5em; } - -.collapsible { - cursor: pointer; - width: 100%; - border: none; - outline: none; -} - -.collapsible-content { - overflow: hidden; - max-height: 0; - transition: max-height 0.2s ease-out; -} diff --git a/pydis_site/static/js/collapsibles.js b/pydis_site/static/js/collapsibles.js new file mode 100644 index 00000000..366a033c --- /dev/null +++ b/pydis_site/static/js/collapsibles.js @@ -0,0 +1,13 @@ +document.addEventListener("DOMContentLoaded", () => { + const headers = document.getElementsByClassName("collapsible"); + for (const header of headers) { + header.addEventListener("click", () => { + var content = header.nextElementSibling; + if (content.style.maxHeight){ + content.style.maxHeight = null; + } else { + content.style.maxHeight = content.scrollHeight + "px"; + } + }); + } +}); diff --git a/pydis_site/static/js/content/page.js b/pydis_site/static/js/content/page.js deleted file mode 100644 index 366a033c..00000000 --- a/pydis_site/static/js/content/page.js +++ /dev/null @@ -1,13 +0,0 @@ -document.addEventListener("DOMContentLoaded", () => { - const headers = document.getElementsByClassName("collapsible"); - for (const header of headers) { - header.addEventListener("click", () => { - var content = header.nextElementSibling; - if (content.style.maxHeight){ - content.style.maxHeight = null; - } else { - content.style.maxHeight = content.scrollHeight + "px"; - } - }); - } -}); diff --git a/pydis_site/static/js/resources.js b/pydis_site/static/js/resources.js deleted file mode 100644 index 718e1e88..00000000 --- a/pydis_site/static/js/resources.js +++ /dev/null @@ -1,236 +0,0 @@ -"use strict"; - -// Filters that are currently selected -var activeFilters = { - topics: [], - type: [], - "payment-tiers": [], - difficulty: [] -}; - -function addFilter(filterName, filterItem) { - // Push the filter into the stack - var filterIndex = activeFilters[filterName].indexOf(filterItem); - if (filterIndex === -1) { - activeFilters[filterName].push(filterItem); - } - updateUI(); - - // Show a corresponding filter box tag - $(`.filter-box-tag[data-filter-name=${filterName}][data-filter-item=${filterItem}]`).show(); - - // Make corresponding resource tags active - $(`.resource-tag[data-filter-name=${filterName}][data-filter-item=${filterItem}]`).addClass("active"); - - // Hide the "No filters selected" tag. - $(".no-tags-selected.tag").hide(); -} - -function removeFilter(filterName, filterItem) { - // Remove the filter from the stack - var filterIndex = activeFilters[filterName].indexOf(filterItem); - if (filterIndex !== -1) { - activeFilters[filterName].splice(filterIndex, 1); - } - updateUI(); - - // Hide the corresponding filter box tag - $(`.filter-box-tag[data-filter-name=${filterName}][data-filter-item=${filterItem}]`).hide(); - - // Make corresponding resource tags inactive - $(`.resource-tag[data-filter-name=${filterName}][data-filter-item=${filterItem}]`).removeClass("active"); - - // Show "No filters selected" tag, if there are no filters active - if (noFilters()) { - $(".no-tags-selected.tag").show(); - } -} - -/* Check if there are no filters */ -function noFilters() { - return ( - activeFilters.topics.length === 0 && - activeFilters.type.length === 0 && - activeFilters["payment-tiers"].length === 0 && - activeFilters.difficulty.length === 0 - ); -} - -/* Get the params out of the URL and use them. This is run when the page loads. */ -function deserializeURLParams() { - let searchParams = new window.URLSearchParams(window.location.search); - - // Work through the parameters and add them to the filter object - $.each(Object.keys(activeFilters), function(_, filterType) { - let paramFilterContent = searchParams.get(filterType); - - if (paramFilterContent !== null) { - // We use split here because we always want an array, not a string. - let paramFilterArray = paramFilterContent.split(","); - activeFilters[filterType] = paramFilterArray; - - // Update the corresponding filter UI, so it reflects the internal state. - $(paramFilterArray).each(function(_, filter) { - let checkbox = $(`.filter-checkbox[data-filter-name='${filterType}'][data-filter-item='${filter}']`); - let filterTag = $(`.filter-box-tag[data-filter-name='${filterType}'][data-filter-item='${filter}']`); - let resourceTags = $(`.resource-tag[data-filter-name='${filterType}'][data-filter-item='${filter}']`); - checkbox.prop("checked", true); - filterTag.show(); - resourceTags.addClass("active"); - }); - } - }); -} - -/* Update the URL with new parameters */ -function updateURL() { - // If there's nothing in the filters, we don't want anything in the URL. - if (noFilters()) { - window.history.replaceState(null, document.title, './'); - return; - } - - // Iterate through and get rid of empty ones - let searchParams = new URLSearchParams(activeFilters); - $.each(activeFilters, function(filterType, filters) { - if (filters.length === 0) { - searchParams.delete(filterType); - } - }); - - // Now update the URL - window.history.replaceState(null, document.title, `?${searchParams.toString()}`); -} - -/* Update the resources to match 'active_filters' */ -function updateUI() { - let resources = $('.resource-box'); - let filterTags = $('.filter-box-tag'); - - // Update the URL to match the new filters. - updateURL(); - - // If there's nothing in the filters, show everything and return. - if (noFilters()) { - resources.show(); - filterTags.hide(); - return; - } - - // Otherwise, hide everything and then filter the resources to decide what to show. - let hasMatches = false; - resources.hide(); - resources.filter(function() { - let validation = { - topics: false, - type: false, - 'payment-tiers': false, - difficulty: false - }; - let resourceBox = $(this); - - // Validate the filters - $.each(activeFilters, function(filterType, filters) { - // If the filter list is empty, this passes validation. - if (filters.length === 0) { - validation[filterType] = true; - return; - } - - // Otherwise, we need to check if one of the classes exist. - $.each(filters, function(index, filter) { - if (resourceBox.hasClass(`${filterType}-${filter}`)) { - validation[filterType] = true; - } - }); - }); - - // If validation passes, show the resource. - if (Object.values(validation).every(Boolean)) { - hasMatches = true; - return true; - } else { - return false; - } - }).show(); - - // If there are no matches, show the no matches message - if (!hasMatches) { - $(".no-resources-found").show(); - } else { - $(".no-resources-found").hide(); - } -} - -// Executed when the page has finished loading. -document.addEventListener("DOMContentLoaded", function () { - /* Check if the user has navigated to one of the old resource pages, - like pydis.com/resources/communities. In this case, we'll rewrite - the URL before we do anything else. */ - let resourceTypeInput = $("#resource-type-input").val(); - if (resourceTypeInput !== "None") { - window.history.replaceState(null, document.title, `../?type=${resourceTypeInput}`); - } - - // Update the filters on page load to reflect URL parameters. - $('.filter-box-tag').hide(); - deserializeURLParams(); - updateUI(); - - // If you collapse or uncollapse a filter group, swap the icon. - $('button.collapsible').click(function() { - let icon = $(this).find(".card-header-icon i"); - - if ($(icon).hasClass("fa-window-minimize")) { - $(icon).removeClass(["far", "fa-window-minimize"]); - $(icon).addClass(["fas", "fa-angle-down"]); - } else { - $(icon).removeClass(["fas", "fa-angle-down"]); - $(icon).addClass(["far", "fa-window-minimize"]); - } - }); - - // If you click on the div surrounding the filter checkbox, it clicks the corresponding checkbox. - $('.filter-panel').click(function() { - let checkbox = $(this).find(".filter-checkbox"); - checkbox.prop("checked", !checkbox.prop("checked")); - checkbox.change(); - }); - - // If you click on one of the tags in the filter box, it unchecks the corresponding checkbox. - $('.filter-box-tag').click(function() { - let filterItem = this.dataset.filterItem; - let filterName = this.dataset.filterName; - let checkbox = $(`.filter-checkbox[data-filter-name='${filterName}'][data-filter-item='${filterItem}']`); - - removeFilter(filterName, filterItem); - checkbox.prop("checked", false); - }); - - // If you click on one of the tags in the resource cards, it clicks the corresponding checkbox. - $('.resource-tag').click(function() { - let filterItem = this.dataset.filterItem; - let filterName = this.dataset.filterName; - let checkbox = $(`.filter-checkbox[data-filter-name='${filterName}'][data-filter-item='${filterItem}']`); - - if (!$(this).hasClass("active")) { - addFilter(filterName, filterItem); - checkbox.prop("checked", true); - } else { - removeFilter(filterName, filterItem); - checkbox.prop("checked", false); - } - }); - - // When checkboxes are toggled, trigger a filter update. - $('.filter-checkbox').change(function () { - let filterItem = this.dataset.filterItem; - let filterName = this.dataset.filterName; - - if (this.checked) { - addFilter(filterName, filterItem); - } else { - removeFilter(filterName, filterItem); - } - }); -}); diff --git a/pydis_site/static/js/resources/resources.js b/pydis_site/static/js/resources/resources.js new file mode 100644 index 00000000..718e1e88 --- /dev/null +++ b/pydis_site/static/js/resources/resources.js @@ -0,0 +1,236 @@ +"use strict"; + +// Filters that are currently selected +var activeFilters = { + topics: [], + type: [], + "payment-tiers": [], + difficulty: [] +}; + +function addFilter(filterName, filterItem) { + // Push the filter into the stack + var filterIndex = activeFilters[filterName].indexOf(filterItem); + if (filterIndex === -1) { + activeFilters[filterName].push(filterItem); + } + updateUI(); + + // Show a corresponding filter box tag + $(`.filter-box-tag[data-filter-name=${filterName}][data-filter-item=${filterItem}]`).show(); + + // Make corresponding resource tags active + $(`.resource-tag[data-filter-name=${filterName}][data-filter-item=${filterItem}]`).addClass("active"); + + // Hide the "No filters selected" tag. + $(".no-tags-selected.tag").hide(); +} + +function removeFilter(filterName, filterItem) { + // Remove the filter from the stack + var filterIndex = activeFilters[filterName].indexOf(filterItem); + if (filterIndex !== -1) { + activeFilters[filterName].splice(filterIndex, 1); + } + updateUI(); + + // Hide the corresponding filter box tag + $(`.filter-box-tag[data-filter-name=${filterName}][data-filter-item=${filterItem}]`).hide(); + + // Make corresponding resource tags inactive + $(`.resource-tag[data-filter-name=${filterName}][data-filter-item=${filterItem}]`).removeClass("active"); + + // Show "No filters selected" tag, if there are no filters active + if (noFilters()) { + $(".no-tags-selected.tag").show(); + } +} + +/* Check if there are no filters */ +function noFilters() { + return ( + activeFilters.topics.length === 0 && + activeFilters.type.length === 0 && + activeFilters["payment-tiers"].length === 0 && + activeFilters.difficulty.length === 0 + ); +} + +/* Get the params out of the URL and use them. This is run when the page loads. */ +function deserializeURLParams() { + let searchParams = new window.URLSearchParams(window.location.search); + + // Work through the parameters and add them to the filter object + $.each(Object.keys(activeFilters), function(_, filterType) { + let paramFilterContent = searchParams.get(filterType); + + if (paramFilterContent !== null) { + // We use split here because we always want an array, not a string. + let paramFilterArray = paramFilterContent.split(","); + activeFilters[filterType] = paramFilterArray; + + // Update the corresponding filter UI, so it reflects the internal state. + $(paramFilterArray).each(function(_, filter) { + let checkbox = $(`.filter-checkbox[data-filter-name='${filterType}'][data-filter-item='${filter}']`); + let filterTag = $(`.filter-box-tag[data-filter-name='${filterType}'][data-filter-item='${filter}']`); + let resourceTags = $(`.resource-tag[data-filter-name='${filterType}'][data-filter-item='${filter}']`); + checkbox.prop("checked", true); + filterTag.show(); + resourceTags.addClass("active"); + }); + } + }); +} + +/* Update the URL with new parameters */ +function updateURL() { + // If there's nothing in the filters, we don't want anything in the URL. + if (noFilters()) { + window.history.replaceState(null, document.title, './'); + return; + } + + // Iterate through and get rid of empty ones + let searchParams = new URLSearchParams(activeFilters); + $.each(activeFilters, function(filterType, filters) { + if (filters.length === 0) { + searchParams.delete(filterType); + } + }); + + // Now update the URL + window.history.replaceState(null, document.title, `?${searchParams.toString()}`); +} + +/* Update the resources to match 'active_filters' */ +function updateUI() { + let resources = $('.resource-box'); + let filterTags = $('.filter-box-tag'); + + // Update the URL to match the new filters. + updateURL(); + + // If there's nothing in the filters, show everything and return. + if (noFilters()) { + resources.show(); + filterTags.hide(); + return; + } + + // Otherwise, hide everything and then filter the resources to decide what to show. + let hasMatches = false; + resources.hide(); + resources.filter(function() { + let validation = { + topics: false, + type: false, + 'payment-tiers': false, + difficulty: false + }; + let resourceBox = $(this); + + // Validate the filters + $.each(activeFilters, function(filterType, filters) { + // If the filter list is empty, this passes validation. + if (filters.length === 0) { + validation[filterType] = true; + return; + } + + // Otherwise, we need to check if one of the classes exist. + $.each(filters, function(index, filter) { + if (resourceBox.hasClass(`${filterType}-${filter}`)) { + validation[filterType] = true; + } + }); + }); + + // If validation passes, show the resource. + if (Object.values(validation).every(Boolean)) { + hasMatches = true; + return true; + } else { + return false; + } + }).show(); + + // If there are no matches, show the no matches message + if (!hasMatches) { + $(".no-resources-found").show(); + } else { + $(".no-resources-found").hide(); + } +} + +// Executed when the page has finished loading. +document.addEventListener("DOMContentLoaded", function () { + /* Check if the user has navigated to one of the old resource pages, + like pydis.com/resources/communities. In this case, we'll rewrite + the URL before we do anything else. */ + let resourceTypeInput = $("#resource-type-input").val(); + if (resourceTypeInput !== "None") { + window.history.replaceState(null, document.title, `../?type=${resourceTypeInput}`); + } + + // Update the filters on page load to reflect URL parameters. + $('.filter-box-tag').hide(); + deserializeURLParams(); + updateUI(); + + // If you collapse or uncollapse a filter group, swap the icon. + $('button.collapsible').click(function() { + let icon = $(this).find(".card-header-icon i"); + + if ($(icon).hasClass("fa-window-minimize")) { + $(icon).removeClass(["far", "fa-window-minimize"]); + $(icon).addClass(["fas", "fa-angle-down"]); + } else { + $(icon).removeClass(["fas", "fa-angle-down"]); + $(icon).addClass(["far", "fa-window-minimize"]); + } + }); + + // If you click on the div surrounding the filter checkbox, it clicks the corresponding checkbox. + $('.filter-panel').click(function() { + let checkbox = $(this).find(".filter-checkbox"); + checkbox.prop("checked", !checkbox.prop("checked")); + checkbox.change(); + }); + + // If you click on one of the tags in the filter box, it unchecks the corresponding checkbox. + $('.filter-box-tag').click(function() { + let filterItem = this.dataset.filterItem; + let filterName = this.dataset.filterName; + let checkbox = $(`.filter-checkbox[data-filter-name='${filterName}'][data-filter-item='${filterItem}']`); + + removeFilter(filterName, filterItem); + checkbox.prop("checked", false); + }); + + // If you click on one of the tags in the resource cards, it clicks the corresponding checkbox. + $('.resource-tag').click(function() { + let filterItem = this.dataset.filterItem; + let filterName = this.dataset.filterName; + let checkbox = $(`.filter-checkbox[data-filter-name='${filterName}'][data-filter-item='${filterItem}']`); + + if (!$(this).hasClass("active")) { + addFilter(filterName, filterItem); + checkbox.prop("checked", true); + } else { + removeFilter(filterName, filterItem); + checkbox.prop("checked", false); + } + }); + + // When checkboxes are toggled, trigger a filter update. + $('.filter-checkbox').change(function () { + let filterItem = this.dataset.filterItem; + let filterName = this.dataset.filterName; + + if (this.checked) { + addFilter(filterName, filterItem); + } else { + removeFilter(filterName, filterItem); + } + }); +}); diff --git a/pydis_site/templates/content/base.html b/pydis_site/templates/content/base.html index 00f4fce4..4a19a275 100644 --- a/pydis_site/templates/content/base.html +++ b/pydis_site/templates/content/base.html @@ -7,7 +7,8 @@ - + + {% endblock %} {% block content %} diff --git a/pydis_site/templates/resources/resources.html b/pydis_site/templates/resources/resources.html index c3881092..80577c2b 100644 --- a/pydis_site/templates/resources/resources.html +++ b/pydis_site/templates/resources/resources.html @@ -7,10 +7,10 @@ {% block title %}Resources{% endblock %} {% block head %} - + - - + + {% endblock %} {% block content %} -- cgit v1.2.3 From 3b213bbdfcdf2a17c4b29692bd75094a47440cd6 Mon Sep 17 00:00:00 2001 From: Leon Sandøy Date: Sun, 30 Jan 2022 21:15:32 +0100 Subject: Revert ugly deploy preview redirect hack. --- pydis_site/apps/resources/urls.py | 41 +-------------------------------------- 1 file changed, 1 insertion(+), 40 deletions(-) (limited to 'pydis_site/apps') diff --git a/pydis_site/apps/resources/urls.py b/pydis_site/apps/resources/urls.py index 044f7072..ed24dc99 100644 --- a/pydis_site/apps/resources/urls.py +++ b/pydis_site/apps/resources/urls.py @@ -1,48 +1,9 @@ -import typing - from django_distill import distill_path from pydis_site.apps.resources import views -# This is only used for `distill_path`, so that the Netlify Deploy Previews -# can successfully redirect to static pages. This could probably be improved by -# making it less hardcoded, but since there's a bunch of special cases, and since -# it only affects deploy previews, I'm choosing to solve this with a simple solution. -VALID_RESOURCE_TYPES = [ - "book", - "books", - "reading", - "podcast", - "podcasts", - "interactive", - "videos", - "video", - "courses", - "course", - "communities", - "community", - "tutorial", - "tutorials", - "tool", - "tools", - "project ideas", - "project-ideas", -] - - -def get_all_pages() -> typing.Iterator[dict[str, str]]: - """Get all the valid options for the resource_type path selector.""" - for resource_type in VALID_RESOURCE_TYPES: - yield {"resource_type": resource_type} - - app_name = "resources" urlpatterns = [ distill_path("", views.resources.ResourceView.as_view(), name="index"), - distill_path( - "/", - views.resources.ResourceView.as_view(), - name="index", - distill_func=get_all_pages, - ), + distill_path("/", views.resources.ResourceView.as_view(), name="index"), ] -- cgit v1.2.3 From 918e4d1aa3a63c4a390d127072ba83c1a146f5c6 Mon Sep 17 00:00:00 2001 From: Leon Sandøy Date: Mon, 31 Jan 2022 12:00:09 +0100 Subject: Make a few minor corrections to resources. - Changes Google Collab to Colab - Updates the URL for the vcokltfre tutorial - Adds a category icon for Game Development. --- pydis_site/apps/resources/resources/google_colab.yaml | 17 +++++++++++++++++ pydis_site/apps/resources/resources/google_collab.yaml | 17 ----------------- .../resources/vcokltfre_discord_bot_tutorial.yaml | 2 +- .../apps/resources/templatetags/get_category_icon.py | 2 +- 4 files changed, 19 insertions(+), 19 deletions(-) create mode 100644 pydis_site/apps/resources/resources/google_colab.yaml delete mode 100644 pydis_site/apps/resources/resources/google_collab.yaml (limited to 'pydis_site/apps') diff --git a/pydis_site/apps/resources/resources/google_colab.yaml b/pydis_site/apps/resources/resources/google_colab.yaml new file mode 100644 index 00000000..b8936674 --- /dev/null +++ b/pydis_site/apps/resources/resources/google_colab.yaml @@ -0,0 +1,17 @@ +description: Google Colab is a high-powered custom version of Jupyter Notebook which supports e.g. + !apt-get to install arbitrary Debian packages to the runtime, which is very generous with CPU and memory, + and well-integrated with Google Drive. + You can share your Colab Notebooks with other people and work collaboratively. +name: Google Colab +title_url: https://colab.research.google.com/notebooks/intro.ipynb +tags: + topics: + - general + - data science + payment_tiers: + - free + difficulty: + - beginner + - intermediate + type: + - tool diff --git a/pydis_site/apps/resources/resources/google_collab.yaml b/pydis_site/apps/resources/resources/google_collab.yaml deleted file mode 100644 index 067a79c9..00000000 --- a/pydis_site/apps/resources/resources/google_collab.yaml +++ /dev/null @@ -1,17 +0,0 @@ -description: Google Collab is a high-powered custom version of Jupyter Notebook which supports e.g. - !apt-get to install arbitrary Debian packages to the runtime, which is very generous with CPU and memory, - and well-integrated with Google Drive. - You can share your Collab Notebooks with other people and work collaboratively. -name: Google Collab -title_url: https://colab.research.google.com/notebooks/intro.ipynb -tags: - topics: - - general - - data science - payment_tiers: - - free - difficulty: - - beginner - - intermediate - type: - - tool diff --git a/pydis_site/apps/resources/resources/vcokltfre_discord_bot_tutorial.yaml b/pydis_site/apps/resources/resources/vcokltfre_discord_bot_tutorial.yaml index 1a3dd457..32476dab 100644 --- a/pydis_site/apps/resources/resources/vcokltfre_discord_bot_tutorial.yaml +++ b/pydis_site/apps/resources/resources/vcokltfre_discord_bot_tutorial.yaml @@ -2,7 +2,7 @@ description: This tutorial, written by Python Discord staff member vcokltfre, will walk you through all the aspects of creating your own Discord bot, starting from from creating the bot user itself. name: vcokltfre's Discord Bot Tutorial -title_url: https://vcokltfre.dev/ +title_url: https://tutorial.vcokltfre.dev/ tags: topics: - discord bots diff --git a/pydis_site/apps/resources/templatetags/get_category_icon.py b/pydis_site/apps/resources/templatetags/get_category_icon.py index 5a5e9887..71f1393f 100644 --- a/pydis_site/apps/resources/templatetags/get_category_icon.py +++ b/pydis_site/apps/resources/templatetags/get_category_icon.py @@ -12,7 +12,7 @@ _ICONS = { "Databases": "fa-server", "Discord Bots": "fa-robot", "Free": "fa-first-aid", - "Game Development": "fa-joystick", + "Game Development": "fa-gamepad", "General": "fa-book", "Interactive": "fa-mouse-pointer", "Intermediate": "fa-align-center", -- cgit v1.2.3 From 91935d88476bade9701d354e82cafba912a33f69 Mon Sep 17 00:00:00 2001 From: Leon Sandøy Date: Mon, 31 Jan 2022 18:02:59 +0100 Subject: Get rid of invalid filters in the URL. --- pydis_site/apps/resources/views/resources.py | 11 +++++++++++ pydis_site/static/js/resources/resources.js | 24 +++++++++++++++++------- pydis_site/templates/resources/resources.html | 5 +++++ 3 files changed, 33 insertions(+), 7 deletions(-) (limited to 'pydis_site/apps') diff --git a/pydis_site/apps/resources/views/resources.py b/pydis_site/apps/resources/views/resources.py index a5c2cf7c..a38c3b59 100644 --- a/pydis_site/apps/resources/views/resources.py +++ b/pydis_site/apps/resources/views/resources.py @@ -1,3 +1,4 @@ +import json import typing as t from pathlib import Path @@ -8,6 +9,7 @@ from django.shortcuts import render from django.views import View from pydis_site import settings +from pydis_site.apps.resources.templatetags.as_css_class import as_css_class RESOURCES_PATH = Path(settings.BASE_DIR, "pydis_site", "apps", "resources", "resources") @@ -83,6 +85,14 @@ class ResourceView(View): self.filters["Topics"]["filters"].remove("Other") self.filters["Topics"]["filters"].append("Other") + # A complete list of valid filter names + self.valid_filters = { + "topics": [as_css_class(topic) for topic in self.filters["Topics"]["filters"]], + "payment_tiers": [as_css_class(tier) for tier in self.filters["Payment tiers"]["filters"]], + "type": [as_css_class(type_) for type_ in self.filters["Type"]["filters"]], + "difficulty": [as_css_class(tier) for tier in self.filters["Difficulty"]["filters"]], + } + def get(self, request: WSGIRequest, resource_type: t.Optional[str] = None) -> HttpResponse: """List out all the resources, and any filtering options from the URL.""" # Add type filtering if the request is made to somewhere like /resources/video. @@ -101,6 +111,7 @@ class ResourceView(View): context={ "resources": self.resources, "filters": self.filters, + "valid_filters": json.dumps(self.valid_filters), "resource_type": resource_type, } ) diff --git a/pydis_site/static/js/resources/resources.js b/pydis_site/static/js/resources/resources.js index 44d4db5c..ad26afd4 100644 --- a/pydis_site/static/js/resources/resources.js +++ b/pydis_site/static/js/resources/resources.js @@ -67,17 +67,27 @@ function deserializeURLParams() { if (paramFilterContent !== null) { // We use split here because we always want an array, not a string. let paramFilterArray = paramFilterContent.split(","); - activeFilters[filterType] = paramFilterArray; // Update the corresponding filter UI, so it reflects the internal state. $(paramFilterArray).each(function(_, filter) { - let checkbox = $(`.filter-checkbox[data-filter-name='${filterType}'][data-filter-item='${filter}']`); - let filterTag = $(`.filter-box-tag[data-filter-name='${filterType}'][data-filter-item='${filter}']`); - let resourceTags = $(`.resource-tag[data-filter-name='${filterType}'][data-filter-item='${filter}']`); - checkbox.prop("checked", true); - filterTag.show(); - resourceTags.addClass("active"); + // Make sure the filter is valid before we do anything. + if (String(filter) === "rickroll" && filterType === "type") { + window.location.href = "https://www.youtube.com/watch?v=dQw4w9WgXcQ"; + } else if (String(filter) === "sneakers" && filterType === "topics") { + window.location.href = "https://www.youtube.com/watch?v=NNZscmNE9QI"; + } else if (validFilters[filterType].includes(String(filter))) { + let checkbox = $(`.filter-checkbox[data-filter-name='${filterType}'][data-filter-item='${filter}']`); + let filterTag = $(`.filter-box-tag[data-filter-name='${filterType}'][data-filter-item='${filter}']`); + let resourceTags = $(`.resource-tag[data-filter-name='${filterType}'][data-filter-item='${filter}']`); + checkbox.prop("checked", true); + filterTag.show(); + resourceTags.addClass("active"); + activeFilters[filterType].push(filter); + } }); + + // Ditch all the params from the URL, and recalculate the URL params + updateURL(); } }); } diff --git a/pydis_site/templates/resources/resources.html b/pydis_site/templates/resources/resources.html index 13bba1f2..a37bf80a 100644 --- a/pydis_site/templates/resources/resources.html +++ b/pydis_site/templates/resources/resources.html @@ -6,6 +6,11 @@ {% block title %}Resources{% endblock %} {% block head %} + {# Inject a JSON object of all valid filter types from the view #} + + -- cgit v1.2.3 From 4215332c248a8c272865a88d5e10fd1b7582e604 Mon Sep 17 00:00:00 2001 From: Leon Sandøy Date: Mon, 31 Jan 2022 18:44:23 +0100 Subject: Add Socratica to the resource list. Closes https://github.com/python-discord/meta/issues/119 --- pydis_site/apps/resources/resources/socratica.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 pydis_site/apps/resources/resources/socratica.yaml (limited to 'pydis_site/apps') diff --git a/pydis_site/apps/resources/resources/socratica.yaml b/pydis_site/apps/resources/resources/socratica.yaml new file mode 100644 index 00000000..bd9fdc7e --- /dev/null +++ b/pydis_site/apps/resources/resources/socratica.yaml @@ -0,0 +1,16 @@ +description: 'Socratica is a small studio focused on producing high quality STEM-related educational content, +including a series about Python. Their videos star actress Ulka Simone Mohanty, who plays an android-like +instructor explaining fundamental Python concepts in a concise and entertaining way.' +title_image: https://i.imgur.com/4SoHeLz.png +title_url: https://www.youtube.com/playlist?list=PLi01XoE8jYohWFPpC17Z-wWhPOSuh8Er- +tags: + topics: + - general + - databases + payment_tiers: + - free + - subscription + difficulty: + - beginner + type: + - video -- cgit v1.2.3 From 03f504d4a84f31297483030debf2b5d3fe85e26c Mon Sep 17 00:00:00 2001 From: Leon Sandøy Date: Mon, 31 Jan 2022 18:56:23 +0100 Subject: Minor changes to socratica resource. --- pydis_site/apps/resources/resources/socratica.yaml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'pydis_site/apps') diff --git a/pydis_site/apps/resources/resources/socratica.yaml b/pydis_site/apps/resources/resources/socratica.yaml index bd9fdc7e..43d033c0 100644 --- a/pydis_site/apps/resources/resources/socratica.yaml +++ b/pydis_site/apps/resources/resources/socratica.yaml @@ -1,15 +1,21 @@ description: 'Socratica is a small studio focused on producing high quality STEM-related educational content, including a series about Python. Their videos star actress Ulka Simone Mohanty, who plays an android-like -instructor explaining fundamental Python concepts in a concise and entertaining way.' +instructor explaining fundamental concepts in a concise and entertaining way.' title_image: https://i.imgur.com/4SoHeLz.png title_url: https://www.youtube.com/playlist?list=PLi01XoE8jYohWFPpC17Z-wWhPOSuh8Er- +urls: + - icon: solid/database + url: https://www.youtube.com/playlist?list=PLi01XoE8jYojRqM4qGBF1U90Ee1Ecb5tt + color: teal + - icon: branding/youtube + url: https://www.youtube.com/channel/UCW6TXMZ5Pq6yL6_k5NZ2e0Q + color: youtube-red tags: topics: - general - databases payment_tiers: - free - - subscription difficulty: - beginner type: -- cgit v1.2.3 From 98c02d34aabb26babcc6def54c4f0872c7700be9 Mon Sep 17 00:00:00 2001 From: Leon Sandøy Date: Mon, 31 Jan 2022 19:57:06 +0100 Subject: Placate the flake8. --- pydis_site/apps/resources/views/resources.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'pydis_site/apps') diff --git a/pydis_site/apps/resources/views/resources.py b/pydis_site/apps/resources/views/resources.py index a38c3b59..55d104bd 100644 --- a/pydis_site/apps/resources/views/resources.py +++ b/pydis_site/apps/resources/views/resources.py @@ -88,7 +88,9 @@ class ResourceView(View): # A complete list of valid filter names self.valid_filters = { "topics": [as_css_class(topic) for topic in self.filters["Topics"]["filters"]], - "payment_tiers": [as_css_class(tier) for tier in self.filters["Payment tiers"]["filters"]], + "payment_tiers": [ + as_css_class(tier) for tier in self.filters["Payment tiers"]["filters"] + ], "type": [as_css_class(type_) for type_ in self.filters["Type"]["filters"]], "difficulty": [as_css_class(tier) for tier in self.filters["Difficulty"]["filters"]], } -- cgit v1.2.3 From 71b1e7ec1ed5fd8f445015a759d74bfdd8828986 Mon Sep 17 00:00:00 2001 From: Leon Sandøy Date: Mon, 31 Jan 2022 22:29:18 +0100 Subject: Revert changes to pyproject.toml. These changes were not necessary. I am very sorry for the things that I did. --- pydis_site/apps/resources/tests/test_views.py | 2 +- pyproject.toml | 33 ++++++++++++++------------- 2 files changed, 18 insertions(+), 17 deletions(-) (limited to 'pydis_site/apps') diff --git a/pydis_site/apps/resources/tests/test_views.py b/pydis_site/apps/resources/tests/test_views.py index dab3599d..0af5ce5f 100644 --- a/pydis_site/apps/resources/tests/test_views.py +++ b/pydis_site/apps/resources/tests/test_views.py @@ -2,7 +2,7 @@ from pathlib import Path from django.conf import settings from django.test import TestCase -from django_hosts import reverse +from django.urls import reverse TESTING_RESOURCES_PATH = Path( settings.BASE_DIR, "pydis_site", "apps", "resources", "tests", "testing_resources" diff --git a/pyproject.toml b/pyproject.toml index 8525a16e..6392f871 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,26 +6,25 @@ authors = ["Python Discord "] license = "MIT" [tool.poetry.dependencies] +python = "3.9.*" django = "~=3.1.14" -django-distill = "~=2.9.0" django-environ = "~=0.4.5" django-filter = "~=21.1" -django-prometheus = "~=2.1" -django-simple-bulma = "~=2.4" djangorestframework = "~=3.12.0" -gunicorn = "~=20.0.4" -markdown = "~=3.3.4" psycopg2-binary = "~=2.8.0" -python = "3.9.*" -python-frontmatter = "~=1.0" -pyyaml = "~=5.1" +django-simple-bulma = "~=2.4" +whitenoise = "~=5.0" requests = "~=2.21" +pyyaml = "~=5.1" +gunicorn = "~=20.0.4" sentry-sdk = "~=0.19" -whitenoise = "~=5.0" +markdown = "~=3.3.4" +python-frontmatter = "~=1.0" +django-prometheus = "~=2.1" +django-distill = "~=2.9.0" [tool.poetry.dev-dependencies] coverage = "~=5.0" -coveralls = "~=2.1" flake8 = "~=3.7" flake8-annotations = "~=2.0" flake8-bandit = "~=2.1" @@ -39,18 +38,20 @@ mccabe = "~=0.6.1" pep8-naming = "~=0.9" pre-commit = "~=2.1" pyfakefs = "~=4.5" -python-dotenv = "~=0.17.1" +coveralls = "~=2.1" taskipy = "~=1.7.0" +python-dotenv = "~=0.17.1" [build-system] -build-backend = "poetry.core.masonry.api" requires = ["poetry-core>=1.0.0"] +build-backend = "poetry.core.masonry.api" [tool.taskipy.tasks] +start = "python manage.py run --debug" +makemigrations = "python manage.py makemigrations" django_shell = "python manage.py shell" +test = "coverage run manage.py test" +report = "coverage report -m" lint = "pre-commit run --all-files" -makemigrations = "python manage.py makemigrations" precommit = "pre-commit install" -report = "coverage report -m" -start = "python manage.py run --debug" -test = "coverage run manage.py test" +static = "python manage.py distill-local build --traceback --force" -- cgit v1.2.3 From 47248a0a1e183871879ad1506b08a19a0b2042f4 Mon Sep 17 00:00:00 2001 From: Leon Sandøy Date: Mon, 31 Jan 2022 22:52:08 +0100 Subject: Add more tests for the new resources page. Coverage is now 100%. --- pydis_site/apps/resources/tests/test_views.py | 12 ++++++++++++ pyproject.toml | 1 + 2 files changed, 13 insertions(+) (limited to 'pydis_site/apps') diff --git a/pydis_site/apps/resources/tests/test_views.py b/pydis_site/apps/resources/tests/test_views.py index 0af5ce5f..a2a203ce 100644 --- a/pydis_site/apps/resources/tests/test_views.py +++ b/pydis_site/apps/resources/tests/test_views.py @@ -15,3 +15,15 @@ class TestResourcesView(TestCase): url = reverse("resources:index") response = self.client.get(url) self.assertEqual(response.status_code, 200) + + def test_resources_with_valid_argument(self): + """Check that you can resolve the resources when passing a valid argument.""" + url = reverse("resources:index", kwargs={"resource_type": "book"}) + response = self.client.get(url) + self.assertEqual(response.status_code, 200) + + def test_resources_with_invalid_argument(self): + """Check that you can resolve the resources when passing an invalid argument.""" + url = reverse("resources:index", kwargs={"resource_type": "urinal-cake"}) + response = self.client.get(url) + self.assertEqual(response.status_code, 404) diff --git a/pyproject.toml b/pyproject.toml index 6392f871..b350836e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,6 +51,7 @@ start = "python manage.py run --debug" makemigrations = "python manage.py makemigrations" django_shell = "python manage.py shell" test = "coverage run manage.py test" +coverage = "coverage run manage.py test --no-input; coverage report -m" report = "coverage report -m" lint = "pre-commit run --all-files" precommit = "pre-commit install" -- cgit v1.2.3 From 1f41d185414d5d3a7ce056828541d09a860037ce Mon Sep 17 00:00:00 2001 From: Leon Sandøy Date: Tue, 1 Feb 2022 02:38:48 +0100 Subject: Sort resources alphabetically, disregarding 'the'. --- pydis_site/apps/resources/views/resources.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'pydis_site/apps') diff --git a/pydis_site/apps/resources/views/resources.py b/pydis_site/apps/resources/views/resources.py index 55d104bd..1895f12a 100644 --- a/pydis_site/apps/resources/views/resources.py +++ b/pydis_site/apps/resources/views/resources.py @@ -17,6 +17,15 @@ RESOURCES_PATH = Path(settings.BASE_DIR, "pydis_site", "apps", "resources", "res class ResourceView(View): """Our curated list of good learning resources.""" + @staticmethod + def _sort_key_disregard_the(tuple_): + """Sort a tuple by its key alphabetically, disregarding 'the' as a prefix.""" + name, resource = tuple_ + name = name.casefold() + if name.startswith("the ") or name.startswith("the_"): + return name[4:] + return name + def __init__(self, *args, **kwargs): """Set up all the resources.""" super().__init__(*args, **kwargs) @@ -28,7 +37,7 @@ class ResourceView(View): } # Sort the resources alphabetically - self.resources = dict(sorted(self.resources.items())) + self.resources = dict(sorted(self.resources.items(), key=self._sort_key_disregard_the)) # Parse out all current tags resource_tags = { -- cgit v1.2.3 From 3ad82bfd3f288dcd5eb270caa9f248cf7f97ffc5 Mon Sep 17 00:00:00 2001 From: Leon Sandøy Date: Tue, 1 Feb 2022 02:51:50 +0100 Subject: Add type annotations for sort key method. --- pydis_site/apps/resources/views/resources.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pydis_site/apps') diff --git a/pydis_site/apps/resources/views/resources.py b/pydis_site/apps/resources/views/resources.py index 1895f12a..0e448ece 100644 --- a/pydis_site/apps/resources/views/resources.py +++ b/pydis_site/apps/resources/views/resources.py @@ -18,7 +18,7 @@ class ResourceView(View): """Our curated list of good learning resources.""" @staticmethod - def _sort_key_disregard_the(tuple_): + def _sort_key_disregard_the(tuple_: tuple) -> str: """Sort a tuple by its key alphabetically, disregarding 'the' as a prefix.""" name, resource = tuple_ name = name.casefold() -- cgit v1.2.3 From 11cbc008ee5f5bafb9ca24fbd8564202310fa6f4 Mon Sep 17 00:00:00 2001 From: Leon Sandøy Date: Tue, 1 Feb 2022 20:21:10 +0100 Subject: Kaizen: Make jchrists wildest dreams come true Co-authored-by: Johannes Christ --- pydis_site/apps/resources/views/resources.py | 2 +- pydis_site/templates/resources/resource_box.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'pydis_site/apps') diff --git a/pydis_site/apps/resources/views/resources.py b/pydis_site/apps/resources/views/resources.py index 0e448ece..ac9e8355 100644 --- a/pydis_site/apps/resources/views/resources.py +++ b/pydis_site/apps/resources/views/resources.py @@ -111,7 +111,7 @@ class ResourceView(View): if resource_type: dashless_resource_type = resource_type.replace("-", " ") - if dashless_resource_type.title() not in self.filters['Type']['filters']: + if dashless_resource_type.title() not in self.filters["Type"]["filters"]: return HttpResponseNotFound() resource_type = resource_type.replace(" ", "-") diff --git a/pydis_site/templates/resources/resource_box.html b/pydis_site/templates/resources/resource_box.html index 0ba8b0ec..2ec233cb 100644 --- a/pydis_site/templates/resources/resource_box.html +++ b/pydis_site/templates/resources/resource_box.html @@ -14,8 +14,8 @@

{{ resource.description|safe }}

- {# Add primary link #} - {% if 'title_url' in resource %} + {# Add primary link #} + {% if "title_url" in resource %} -- cgit v1.2.3 From 6ca60006f8ae7d22f73556ab07ba89eb5251e162 Mon Sep 17 00:00:00 2001 From: Leon Sandøy Date: Tue, 1 Feb 2022 20:22:55 +0100 Subject: Murder some space Remove those pointless empty pages at the start and the end of a book. Co-authored-by: Johannes Christ --- pydis_site/apps/redirect/redirects.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pydis_site/apps') diff --git a/pydis_site/apps/redirect/redirects.yaml b/pydis_site/apps/redirect/redirects.yaml index dc8b9359..9b64011b 100644 --- a/pydis_site/apps/redirect/redirects.yaml +++ b/pydis_site/apps/redirect/redirects.yaml @@ -95,7 +95,7 @@ resources_reading_redirect: resources_books_redirect: original_path: resources/books/ redirect_route: "resources:index" - redirect_arguments: [ "book" ] + redirect_arguments: ["book"] resources_videos_redirect: original_path: resources/videos/ -- cgit v1.2.3 From f3bccff688a7f5a9eb619dbed3f726ef2c07c402 Mon Sep 17 00:00:00 2001 From: Leon Sandøy Date: Tue, 1 Feb 2022 20:54:39 +0100 Subject: Refactor as_css_class to 'to_kebabcase'. We're making a few changes here - Changing the name to 'to_kebabcase' - Covering all edge cases - Adding a unit test for this utility --- .../apps/resources/templatetags/as_css_class.py | 18 ---------- .../apps/resources/templatetags/to_kebabcase.py | 39 ++++++++++++++++++++++ pydis_site/apps/resources/tests/test_resources.py | 9 ----- .../apps/resources/tests/test_to_kebabcase.py | 19 +++++++++++ .../testing/foobar/resource_test.yaml | 1 - .../testing_resources/testing/my_resource.yaml | 1 - pydis_site/apps/resources/views/resources.py | 14 ++++---- pydis_site/templates/resources/resource_box.html | 10 +++--- pydis_site/templates/resources/resources.html | 22 ++++++------ 9 files changed, 80 insertions(+), 53 deletions(-) delete mode 100644 pydis_site/apps/resources/templatetags/as_css_class.py create mode 100644 pydis_site/apps/resources/templatetags/to_kebabcase.py delete mode 100644 pydis_site/apps/resources/tests/test_resources.py create mode 100644 pydis_site/apps/resources/tests/test_to_kebabcase.py delete mode 100644 pydis_site/apps/resources/tests/testing_resources/testing/foobar/resource_test.yaml delete mode 100644 pydis_site/apps/resources/tests/testing_resources/testing/my_resource.yaml (limited to 'pydis_site/apps') diff --git a/pydis_site/apps/resources/templatetags/as_css_class.py b/pydis_site/apps/resources/templatetags/as_css_class.py deleted file mode 100644 index 8b628dc9..00000000 --- a/pydis_site/apps/resources/templatetags/as_css_class.py +++ /dev/null @@ -1,18 +0,0 @@ -from django import template - -register = template.Library() - - -@register.filter -def as_css_class(class_name: str) -> str: - """ - Convert any string to a css-class name. - - For example, convert - "Favorite FROOT_is_LEMON" to - "favorite-froot-is-lemon" - """ - class_name = class_name.lower() - class_name = class_name.replace(" ", "-") - class_name = class_name.replace("_", "-") - return class_name diff --git a/pydis_site/apps/resources/templatetags/to_kebabcase.py b/pydis_site/apps/resources/templatetags/to_kebabcase.py new file mode 100644 index 00000000..41e2ac85 --- /dev/null +++ b/pydis_site/apps/resources/templatetags/to_kebabcase.py @@ -0,0 +1,39 @@ +import re + +from django import template + +REGEX_CONSECUTIVE_NON_LETTERS = r"[^A-Za-z0-9]+" +register = template.Library() + + +def _to_kebabcase(class_name: str) -> str: + """ + Convert any string to kebab-case. + + For example, convert + "__Favorite FROOT¤#/$?is----LeMON???" to + "favorite-froot-is-lemon" + """ + # First, make it lowercase, and just remove any apostrophes. + # We remove the apostrophes because "wasnt" is better than "wasn-t" + class_name = class_name.casefold() + class_name = class_name.replace("'", '') + + # Now, replace any non-letter that remains with a dash. + # If there are multiple consecutive non-letters, just replace them with a single dash. + # my-favorite-class is better than my-favorite------class + class_name = re.sub( + REGEX_CONSECUTIVE_NON_LETTERS, + "-", + class_name, + ) + + # Now we use strip to get rid of any leading or trailing dashes. + class_name = class_name.strip("-") + return class_name + + +@register.filter +def to_kebabcase(class_name: str) -> str: + """Convert a string to kebab-case.""" + return _to_kebabcase(class_name) diff --git a/pydis_site/apps/resources/tests/test_resources.py b/pydis_site/apps/resources/tests/test_resources.py deleted file mode 100644 index 81638e2f..00000000 --- a/pydis_site/apps/resources/tests/test_resources.py +++ /dev/null @@ -1,9 +0,0 @@ -from django.test import TestCase - - -class TestResources(TestCase): - """Test our resource filtering systems.""" - - def test_utils_to_retrieve_tags(self): - """Test that the utils that retrieve the tags work as intended.""" - pass diff --git a/pydis_site/apps/resources/tests/test_to_kebabcase.py b/pydis_site/apps/resources/tests/test_to_kebabcase.py new file mode 100644 index 00000000..a141143d --- /dev/null +++ b/pydis_site/apps/resources/tests/test_to_kebabcase.py @@ -0,0 +1,19 @@ +from django.test import TestCase + +from pydis_site.apps.resources.templatetags.to_kebabcase import _to_kebabcase + + +class TestToKebabcase(TestCase): + """Tests for the `as_css_class` template tag.""" + + def test_to_kebabcase(self): + """Test the to_kebabcase utility and template tag.""" + weird_input = ( + "_-_--_A_LEm0n?in&¤'the##trEE£$@€@€@@£is-NOT----QUITE//" + "as#good! as one __IN-YOUR|||HaND" + ) + + self.assertEqual( + _to_kebabcase(weird_input), + "a-lem0n-in-the-tree-is-not-quite-as-good-as-one-in-your-hand", + ) diff --git a/pydis_site/apps/resources/tests/testing_resources/testing/foobar/resource_test.yaml b/pydis_site/apps/resources/tests/testing_resources/testing/foobar/resource_test.yaml deleted file mode 100644 index 22835090..00000000 --- a/pydis_site/apps/resources/tests/testing_resources/testing/foobar/resource_test.yaml +++ /dev/null @@ -1 +0,0 @@ -name: Resource Test diff --git a/pydis_site/apps/resources/tests/testing_resources/testing/my_resource.yaml b/pydis_site/apps/resources/tests/testing_resources/testing/my_resource.yaml deleted file mode 100644 index 61df6173..00000000 --- a/pydis_site/apps/resources/tests/testing_resources/testing/my_resource.yaml +++ /dev/null @@ -1 +0,0 @@ -name: My Resource diff --git a/pydis_site/apps/resources/views/resources.py b/pydis_site/apps/resources/views/resources.py index ac9e8355..2375f722 100644 --- a/pydis_site/apps/resources/views/resources.py +++ b/pydis_site/apps/resources/views/resources.py @@ -9,7 +9,7 @@ from django.shortcuts import render from django.views import View from pydis_site import settings -from pydis_site.apps.resources.templatetags.as_css_class import as_css_class +from pydis_site.apps.resources.templatetags.to_kebabcase import to_kebabcase RESOURCES_PATH = Path(settings.BASE_DIR, "pydis_site", "apps", "resources", "resources") @@ -58,9 +58,7 @@ class ResourceView(View): # Make a CSS class friendly representation too, while we're already iterating. for tag in tags: - css_tag = f"{tag_type}-{tag}" - css_tag = css_tag.replace("_", "-") - css_tag = css_tag.replace(" ", "-") + css_tag = to_kebabcase(f"{tag_type}-{tag}") css_classes.append(css_tag) # Now add the css classes back to the resource, so we can use them in the template. @@ -96,12 +94,12 @@ class ResourceView(View): # A complete list of valid filter names self.valid_filters = { - "topics": [as_css_class(topic) for topic in self.filters["Topics"]["filters"]], + "topics": [to_kebabcase(topic) for topic in self.filters["Topics"]["filters"]], "payment_tiers": [ - as_css_class(tier) for tier in self.filters["Payment tiers"]["filters"] + to_kebabcase(tier) for tier in self.filters["Payment tiers"]["filters"] ], - "type": [as_css_class(type_) for type_ in self.filters["Type"]["filters"]], - "difficulty": [as_css_class(tier) for tier in self.filters["Difficulty"]["filters"]], + "type": [to_kebabcase(type_) for type_ in self.filters["Type"]["filters"]], + "difficulty": [to_kebabcase(tier) for tier in self.filters["Difficulty"]["filters"]], } def get(self, request: WSGIRequest, resource_type: t.Optional[str] = None) -> HttpResponse: diff --git a/pydis_site/templates/resources/resource_box.html b/pydis_site/templates/resources/resource_box.html index 2ec233cb..e26203e9 100644 --- a/pydis_site/templates/resources/resource_box.html +++ b/pydis_site/templates/resources/resource_box.html @@ -1,5 +1,5 @@ {% load as_icon %} -{% load as_css_class %} +{% load to_kebabcase %} {% load get_category_icon %}
@@ -38,7 +38,7 @@ {{ tag|title }} @@ -48,7 +48,7 @@ {{ tag|title }} @@ -58,7 +58,7 @@ {{ tag|title }} @@ -68,7 +68,7 @@ {{ tag|title }} diff --git a/pydis_site/templates/resources/resources.html b/pydis_site/templates/resources/resources.html index c221c8a3..70fad097 100644 --- a/pydis_site/templates/resources/resources.html +++ b/pydis_site/templates/resources/resources.html @@ -1,6 +1,6 @@ {% extends 'base/base.html' %} {% load as_icon %} -{% load as_css_class %} +{% load to_kebabcase %} {% load get_category_icon %} {% load static %} @@ -44,8 +44,8 @@ {% if filter_name == "Difficulty" %} {{ filter_item|title }} @@ -55,8 +55,8 @@ {% if filter_name == "Type" %} {{ filter_item|title }} @@ -66,8 +66,8 @@ {% if filter_name == "Payment tiers" %} {{ filter_item|title }} @@ -77,8 +77,8 @@ {% if filter_name == "Topics" %} {{ filter_item|title }} @@ -127,8 +127,8 @@ {{ filter_item }} -- cgit v1.2.3 From e144d4d1b4d1ef2ec2f9f8b771b3606b581ace34 Mon Sep 17 00:00:00 2001 From: Leon Sandøy Date: Tue, 1 Feb 2022 22:43:15 +0100 Subject: Complete refactor of collapsibles. This is now a completely self-contained feature, which can be used in the same way on every page. I've moved all the collapsible-related logics out of the resources.js file and into collapsibles.js, and added documentation and other quality-of-life features that will apply to other pages, as well. Changes: - The icon will now always change when the collapsible opens or closes. - By adding the "collapsed" class, you can tell the collapsible to be collapsed by default. --- .../guides/pydis-guides/contributing/bot.md | 20 ++++---- pydis_site/static/css/collapsibles.css | 4 -- pydis_site/static/js/collapsibles.js | 60 ++++++++++++++++++++-- pydis_site/static/js/resources/resources.js | 15 +----- 4 files changed, 67 insertions(+), 32 deletions(-) (limited to 'pydis_site/apps') diff --git a/pydis_site/apps/content/resources/guides/pydis-guides/contributing/bot.md b/pydis_site/apps/content/resources/guides/pydis-guides/contributing/bot.md index ed9e3db3..2aa10aa3 100644 --- a/pydis_site/apps/content/resources/guides/pydis-guides/contributing/bot.md +++ b/pydis_site/apps/content/resources/guides/pydis-guides/contributing/bot.md @@ -14,10 +14,10 @@ First things first, to run the bot's code and make changes to it, you need a loc -
+