diff options
author | 2024-02-03 00:50:43 -0800 | |
---|---|---|
committer | 2024-02-03 00:50:43 -0800 | |
commit | ad2410ef24e97742bc22f0d8775a0f37a5bf2db5 (patch) | |
tree | cce3c380e6b695d11dcb65ee65411f6f654e2be3 /pydis_site/apps | |
parent | Migrate mailing lists to their own API endpoints (diff) | |
parent | Merge pull request #1220 from python-discord/dependabot/pip/ruff-0.2.0 (diff) |
Merge branch 'main' into mailing-list-model
Diffstat (limited to 'pydis_site/apps')
37 files changed, 115 insertions, 60 deletions
diff --git a/pydis_site/apps/api/serializers.py b/pydis_site/apps/api/serializers.py index a2dc68f0..ea94214f 100644 --- a/pydis_site/apps/api/serializers.py +++ b/pydis_site/apps/api/serializers.py @@ -153,12 +153,9 @@ class MessageDeletionContextSerializer(ModelSerializer): """ messages = validated_data.pop('deletedmessage_set') deletion_context = MessageDeletionContext.objects.create(**validated_data) - for message in messages: - DeletedMessage.objects.create( - deletion_context=deletion_context, - **message - ) - + DeletedMessage.objects.bulk_create( + DeletedMessage(deletion_context=deletion_context, **message) for message in messages + ) return deletion_context @@ -510,13 +507,8 @@ class ExpandedInfractionSerializer(InfractionSerializer): """Return the dictionary representation of this infraction.""" ret = super().to_representation(instance) - user = User.objects.get(id=ret['user']) - user_data = UserSerializer(user).data - ret['user'] = user_data - - actor = User.objects.get(id=ret['actor']) - actor_data = UserSerializer(actor).data - ret['actor'] = actor_data + ret['user'] = UserSerializer(instance.user).data + ret['actor'] = UserSerializer(instance.actor).data return ret diff --git a/pydis_site/apps/api/viewsets/bot/infraction.py b/pydis_site/apps/api/viewsets/bot/infraction.py index 09c05a74..8da82822 100644 --- a/pydis_site/apps/api/viewsets/bot/infraction.py +++ b/pydis_site/apps/api/viewsets/bot/infraction.py @@ -230,7 +230,11 @@ class InfractionViewSet( }) additional_filters['type__in'] = [i.strip() for i in filter_types.split(",")] - return self.queryset.filter(**additional_filters) + qs = self.queryset.filter(**additional_filters) + if self.serializer_class is ExpandedInfractionSerializer: + return qs.prefetch_related('actor', 'user') + + return qs @action(url_path='expanded', detail=False) def list_expanded(self, *args, **kwargs) -> Response: diff --git a/pydis_site/apps/api/viewsets/bot/nomination.py b/pydis_site/apps/api/viewsets/bot/nomination.py index 953513e0..d083464c 100644 --- a/pydis_site/apps/api/viewsets/bot/nomination.py +++ b/pydis_site/apps/api/viewsets/bot/nomination.py @@ -170,7 +170,7 @@ class NominationViewSet(CreateModelMixin, RetrieveModelMixin, ListModelMixin, Ge """ serializer_class = NominationSerializer - queryset = Nomination.objects.all() + queryset = Nomination.objects.all().prefetch_related('entries') filter_backends = (DjangoFilterBackend, SearchFilter, OrderingFilter) filterset_fields = ('user__id', 'active') frozen_on_create = ('ended_at', 'end_reason', 'active', 'inserted_at', 'reviewed') diff --git a/pydis_site/apps/content/resources/guides/pydis-guides/contributing.md b/pydis_site/apps/content/resources/guides/pydis-guides/contributing.md index b36c0afd..5dc6408c 100644 --- a/pydis_site/apps/content/resources/guides/pydis-guides/contributing.md +++ b/pydis_site/apps/content/resources/guides/pydis-guides/contributing.md @@ -9,8 +9,8 @@ Our projects on Python Discord are open source and [available on GitHub](https:/ <!-- Project cards --> <div class="columns is-multiline is-centered is-3 is-variable"> <div class="column is-one-third-desktop is-half-tablet"> - <div class="card github-card"> - <div class="card-header"> + <div class="card github-card has-background-white"> + <div class="card-header has-background-white"> <div class="card-header-title is-centered"> <a class="is-size-5" href="https://github.com/python-discord/sir-lancebot"> <i class="fab fa-github"></i> <strong >Sir Lancebot</strong> @@ -22,11 +22,11 @@ Our projects on Python Discord are open source and [available on GitHub](https:/ Sir Lancebot has a collection of self-contained, for-fun features. If you're new to Discord bots or contributing, this is a great place to start! </div> </div> - <div class="card-footer"> + <div class="card-footer has-background-white"> <a href="https://github.com/python-discord/sir-lancebot/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc" class="card-footer-item"><i class="fas fa-exclamation-circle"></i> Issues</a> <a href="https://github.com/python-discord/sir-lancebot/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc" class="card-footer-item"><i class="fas fa-code-merge"></i> PRs</a> </div> - <div class="card-footer"> + <div class="card-footer has-background-white"> <a href="/pages/guides/pydis-guides/contributing/sir-lancebot" class="card-footer-item"><i class="fas fa-cogs"></i> Setup and Configuration Guide</a> </div> </div> diff --git a/pydis_site/apps/content/resources/guides/pydis-guides/how-to-contribute-a-page.md b/pydis_site/apps/content/resources/guides/pydis-guides/how-to-contribute-a-page.md index 65a402fd..8470a6c1 100644 --- a/pydis_site/apps/content/resources/guides/pydis-guides/how-to-contribute-a-page.md +++ b/pydis_site/apps/content/resources/guides/pydis-guides/how-to-contribute-a-page.md @@ -85,6 +85,31 @@ Pages, which include guides, articles, and other static content,... - **toc:** A number representing the smallest heading tag to show in the table of contents. See: [Table of Contents](#table-of-contents) +## Working with dark mode + +If your article includes images, you can apply a few classes for a better experience for readers using dark mode. + +### Add a white background to an image + +Use the `has-dark-mode-background` class to apply a white background to your image, so it can be read easily in dark mode. + +```md +{: class="has-dark-mode-background" } +``` + +### Alternate images for each mode + +If you can provide two images, suited for each of the light and dark modes specifically, you can use the `light-image` and `dark-image` classes to have the correct image be used depending on the mode. + +```md +{: class="light-image" } +{: class="dark-image" } +``` + +This way, when the reader is in light mode, only `image_light.png` is shown, and when the reader is in dark mode, only `image_dark.png` is shown. + +All images with `light-image` class are hidden in dark mode and all images with `dark-image` class are hidden in light mode. + ## Extended Markdown Apart from standard Markdown, certain additions are available: diff --git a/pydis_site/apps/content/resources/guides/python-guides/mutability.md b/pydis_site/apps/content/resources/guides/python-guides/mutability.md index 185dc87c..e180fd16 100644 --- a/pydis_site/apps/content/resources/guides/python-guides/mutability.md +++ b/pydis_site/apps/content/resources/guides/python-guides/mutability.md @@ -30,11 +30,11 @@ It just returns a new one. Let's examine what's going on here. At first, the variable `s` refers to some object, the string `'hello'`. - +{: class="has-dark-mode-background" } When you call `s.upper()`, a new string, which contains the characters `'HELLO'`, gets created. - +{: class="has-dark-mode-background" } This happens even if you just call `s.upper()` without any assignment, on its own line: ```python @@ -44,12 +44,12 @@ In this case, a new object will be created and discarded right away. Then the assignment part comes in: the name `s` gets disconnected from `'hello'`, and gets connected to `'HELLO'`. - +{: class="has-dark-mode-background" } Now we can say that `'HELLO'` is stored in the `s` variable. Then, because no variables refer to the _object_ `'hello'`, it gets eaten by the garbage collector. - +{: class="has-dark-mode-background" } It means that the memory reserved for that object will be freed. If that didn't happen, the 'garbage' would accumulate over time and fill up all the RAM. diff --git a/pydis_site/apps/content/utils.py b/pydis_site/apps/content/utils.py index cfd73d67..5a146e10 100644 --- a/pydis_site/apps/content/utils.py +++ b/pydis_site/apps/content/utils.py @@ -107,7 +107,7 @@ def fetch_tags() -> list[Tag]: for file in repo.getmembers(): if "/bot/resources/tags" in file.path: included.append(file) - repo.extractall(folder, included) + repo.extractall(folder, included) # noqa: S202 for tag_file in Path(folder).rglob("*.md"): name = tag_file.name @@ -206,9 +206,9 @@ def record_tags(tags: list[Tag]) -> None: # pretend it's previous state is the current state old_tag = new_tag - if old_tag.sha == new_tag.sha and old_tag.last_commit is not None: + if old_tag.sha == new_tag.sha and old_tag.last_commit_id is not None: # We still have an up-to-date commit entry - new_tag.last_commit = old_tag.last_commit + new_tag.last_commit_id = old_tag.last_commit_id new_tag.save() diff --git a/pydis_site/apps/resources/resources/adafruit.yaml b/pydis_site/apps/resources/resources/adafruit.yaml index c687f507..bedbf16a 100644 --- a/pydis_site/apps/resources/resources/adafruit.yaml +++ b/pydis_site/apps/resources/resources/adafruit.yaml @@ -4,7 +4,8 @@ description: Adafruit is an open-source electronics manufacturer 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_image: /static/images/resources/adafruit.png +title_image_dark: /static/images/resources_dark/adafruit.png title_url: https://adafruit.com/ urls: - icon: branding/discord 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 63f63193..f3b862d2 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: black + color: dark tags: topics: - general diff --git a/pydis_site/apps/resources/resources/awesome_programming_discord.yaml b/pydis_site/apps/resources/resources/awesome_programming_discord.yaml index 0ef7aefc..7079062b 100644 --- a/pydis_site/apps/resources/resources/awesome_programming_discord.yaml +++ b/pydis_site/apps/resources/resources/awesome_programming_discord.yaml @@ -3,7 +3,7 @@ description: We have listed our favourite communities, 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_icon_color: dark title_url: https://github.com/mhxion/awesome-programming-discord name: awesome-programming-discord tags: diff --git a/pydis_site/apps/resources/resources/byte_of_python.yaml b/pydis_site/apps/resources/resources/byte_of_python.yaml index c2f6ab84..e4d44369 100644 --- a/pydis_site/apps/resources/resources/byte_of_python.yaml +++ b/pydis_site/apps/resources/resources/byte_of_python.yaml @@ -6,10 +6,10 @@ title_url: https://python.swaroopch.com/ urls: - icon: regular/book url: https://www.lulu.com/shop/swaroop-c-h/a-byte-of-python/paperback/product-21142968.html - color: black + color: dark - icon: branding/goodreads url: https://www.goodreads.com/book/show/6762544-a-byte-of-python - color: black + color: dark tags: topics: - general diff --git a/pydis_site/apps/resources/resources/code_combat.yaml b/pydis_site/apps/resources/resources/code_combat.yaml index 84597c4d..0e308ddc 100644 --- a/pydis_site/apps/resources/resources/code_combat.yaml +++ b/pydis_site/apps/resources/resources/code_combat.yaml @@ -5,7 +5,7 @@ title_url: https://codecombat.com/ urls: - icon: branding/github url: https://github.com/codecombat/codecombat - color: black + color: dark tags: topics: - general diff --git a/pydis_site/apps/resources/resources/corey_schafer.yaml b/pydis_site/apps/resources/resources/corey_schafer.yaml index d66ea004..91abeb52 100644 --- a/pydis_site/apps/resources/resources/corey_schafer.yaml +++ b/pydis_site/apps/resources/resources/corey_schafer.yaml @@ -10,6 +10,7 @@ description: 'Corey has a number of exceptionally high quality tutorial series Check out his channel for more video series! ' title_image: https://i.imgur.com/KIfWw3b.png +title_image_dark: /static/images/resources_dark/coreyschafer.png title_url: https://www.youtube.com/channel/UCCezIgC97PvUuR4_gbFUs5g urls: - icon: solid/external-link-alt 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 86955fdb..755e5867 100644 --- a/pydis_site/apps/resources/resources/data_science_from_scratch.yaml +++ b/pydis_site/apps/resources/resources/data_science_from_scratch.yaml @@ -7,10 +7,10 @@ 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: black + color: dark - icon: branding/github url: https://github.com/joelgrus/data-science-from-scratch - color: black + color: dark tags: topics: - data science diff --git a/pydis_site/apps/resources/resources/effective_python.yaml b/pydis_site/apps/resources/resources/effective_python.yaml index b82fa0c3..2293ee84 100644 --- a/pydis_site/apps/resources/resources/effective_python.yaml +++ b/pydis_site/apps/resources/resources/effective_python.yaml @@ -5,10 +5,10 @@ title_url: https://effectivepython.com/ urls: - icon: branding/goodreads url: https://www.goodreads.com/book/show/48566725-effective-python - color: black + color: dark - icon: branding/github url: https://github.com/bslatkin/effectivepython - color: black + color: dark tags: topics: - general diff --git a/pydis_site/apps/resources/resources/exercism.yaml b/pydis_site/apps/resources/resources/exercism.yaml index c623db2d..fba5bce4 100644 --- a/pydis_site/apps/resources/resources/exercism.yaml +++ b/pydis_site/apps/resources/resources/exercism.yaml @@ -7,7 +7,7 @@ title_url: https://exercism.org/ urls: - icon: branding/github url: https://github.com/exercism/python - color: black + color: dark tags: topics: - general diff --git a/pydis_site/apps/resources/resources/flask_web_development.yaml b/pydis_site/apps/resources/resources/flask_web_development.yaml index 6905b2b4..9263efdd 100644 --- a/pydis_site/apps/resources/resources/flask_web_development.yaml +++ b/pydis_site/apps/resources/resources/flask_web_development.yaml @@ -5,10 +5,10 @@ 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: black + color: dark - icon: branding/github url: https://github.com/miguelgrinberg/flasky - color: black + color: dark tags: topics: - web development diff --git a/pydis_site/apps/resources/resources/fluent_python.yaml b/pydis_site/apps/resources/resources/fluent_python.yaml index c22fd388..0d9466e1 100644 --- a/pydis_site/apps/resources/resources/fluent_python.yaml +++ b/pydis_site/apps/resources/resources/fluent_python.yaml @@ -5,10 +5,10 @@ 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: black + color: dark - icon: branding/github url: https://github.com/fluentpython - color: black + color: dark tags: topics: - general 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 e48e5717..a96386d2 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: black + color: dark tags: topics: - general diff --git a/pydis_site/apps/resources/resources/kivy.yaml b/pydis_site/apps/resources/resources/kivy.yaml index f49c33fb..742fa274 100644 --- a/pydis_site/apps/resources/resources/kivy.yaml +++ b/pydis_site/apps/resources/resources/kivy.yaml @@ -2,9 +2,8 @@ name: Kivy 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/content/logos/kivy-logo-black-256.png -icon_size: 50 -title_image: https://i.imgur.com/EVP3jZR.png +title_image: /static/images/resources/kivy.png +title_image_dark: /static/images/resources_dark/kivy.png title_url: https://kivy.org/ urls: - icon: branding/discord @@ -12,7 +11,7 @@ urls: color: blurple - icon: branding/github url: https://github.com/kivy - color: black + color: dark tags: topics: - user interface diff --git a/pydis_site/apps/resources/resources/microsoft.yaml b/pydis_site/apps/resources/resources/microsoft.yaml index 290283cc..8b31020c 100644 --- a/pydis_site/apps/resources/resources/microsoft.yaml +++ b/pydis_site/apps/resources/resources/microsoft.yaml @@ -2,6 +2,7 @@ name: Microsoft Python 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_image_dark: /static/images/resources_dark/microsoft.png title_url: https://www.microsoft.com/en-us/boards/pycon2020.aspx urls: - icon: branding/discord diff --git a/pydis_site/apps/resources/resources/mission_python.yaml b/pydis_site/apps/resources/resources/mission_python.yaml index 391a2983..ca686952 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: black + color: dark 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 26e88cb9..5e7ee63f 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: black + color: dark tags: topics: - data science diff --git a/pydis_site/apps/resources/resources/pallets.yaml b/pydis_site/apps/resources/resources/pallets.yaml index a330b756..453c263f 100644 --- a/pydis_site/apps/resources/resources/pallets.yaml +++ b/pydis_site/apps/resources/resources/pallets.yaml @@ -3,6 +3,7 @@ description: The Pallets Projects develop Python libraries such as the Flask web 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_image_dark: /static/images/resources_dark/pallets.png title_url: https://www.palletsprojects.com/ urls: - icon: branding/discord diff --git a/pydis_site/apps/resources/resources/panda3d.yaml b/pydis_site/apps/resources/resources/panda3d.yaml index 51861474..dd200519 100644 --- a/pydis_site/apps/resources/resources/panda3d.yaml +++ b/pydis_site/apps/resources/resources/panda3d.yaml @@ -1,7 +1,8 @@ name: Panda3D 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: https://www.panda3d.org/wp-content/uploads/2019/01/panda3d_logo.png +title_image: /static/images/resources/panda3d.png +title_image_dark: /static/images/resources_dark/panda3d.png title_url: https://www.panda3d.org/ position: 9 urls: diff --git a/pydis_site/apps/resources/resources/people_postgres_data.yaml b/pydis_site/apps/resources/resources/people_postgres_data.yaml index 212eed89..ce5ad4a8 100644 --- a/pydis_site/apps/resources/resources/people_postgres_data.yaml +++ b/pydis_site/apps/resources/resources/people_postgres_data.yaml @@ -5,6 +5,7 @@ description: People, Postgres, Data specializes in building users of Postgres 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_image_dark: /static/images/resources_dark/people_postgres_data.png title_url: https://postgresconf.org/ urls: - icon: branding/discord diff --git a/pydis_site/apps/resources/resources/pyglet.yaml b/pydis_site/apps/resources/resources/pyglet.yaml index bdfb84cf..73f99bde 100644 --- a/pydis_site/apps/resources/resources/pyglet.yaml +++ b/pydis_site/apps/resources/resources/pyglet.yaml @@ -5,6 +5,7 @@ description: Pyglet is a powerful, 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_image_dark: /static/images/resources_dark/pyglet.png title_url: http://pyglet.org/ urls: - icon: branding/discord diff --git a/pydis_site/apps/resources/resources/python_cookbook.yaml b/pydis_site/apps/resources/resources/python_cookbook.yaml index bc05d743..751edf09 100644 --- a/pydis_site/apps/resources/resources/python_cookbook.yaml +++ b/pydis_site/apps/resources/resources/python_cookbook.yaml @@ -5,10 +5,10 @@ title_url: http://shop.oreilly.com/product/0636920027072.do urls: - icon: branding/goodreads url: https://www.goodreads.com/book/show/17152735-python-cookbook - color: black + color: dark - icon: branding/github url: https://github.com/dabeaz/python-cookbook - color: black + color: dark tags: topics: - general diff --git a/pydis_site/apps/resources/resources/python_crash_course.yaml b/pydis_site/apps/resources/resources/python_crash_course.yaml index d916075e..e8356491 100644 --- a/pydis_site/apps/resources/resources/python_crash_course.yaml +++ b/pydis_site/apps/resources/resources/python_crash_course.yaml @@ -11,10 +11,10 @@ title_url: https://nostarch.com/pythoncrashcourse2e urls: - icon: branding/goodreads url: https://www.goodreads.com/book/show/23241059-python-crash-course - color: black + color: dark - icon: branding/github url: https://ehmatthes.github.io/pcc/ - color: black + color: dark tags: topics: - general diff --git a/pydis_site/apps/resources/resources/python_graph_gallery.yaml b/pydis_site/apps/resources/resources/python_graph_gallery.yaml index b8aaeb4d..59aebc12 100644 --- a/pydis_site/apps/resources/resources/python_graph_gallery.yaml +++ b/pydis_site/apps/resources/resources/python_graph_gallery.yaml @@ -4,7 +4,7 @@ title_url: https://www.python-graph-gallery.com/ urls: - icon: branding/github url: https://github.com/holtzy/The-Python-Graph-Gallery - color: black + color: dark tags: topics: - data science diff --git a/pydis_site/apps/resources/resources/python_org.yaml b/pydis_site/apps/resources/resources/python_org.yaml index ece954dd..e7a9e806 100644 --- a/pydis_site/apps/resources/resources/python_org.yaml +++ b/pydis_site/apps/resources/resources/python_org.yaml @@ -1,6 +1,7 @@ name: The Python Tutorial description: The official Python tutorial by Python.org title_image: https://www.python.org/static/community_logos/python-logo-master-v3-TM.png +title_image_dark: /static/images/resources_dark/python.png title_url: https://docs.python.org/3/tutorial/ tags: topics: diff --git a/pydis_site/apps/resources/resources/python_tricks.yaml b/pydis_site/apps/resources/resources/python_tricks.yaml index aa1b2fcd..17c71107 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: black + color: dark tags: topics: - general diff --git a/pydis_site/apps/resources/resources/sentdex.yaml b/pydis_site/apps/resources/resources/sentdex.yaml index 7cb0a8a4..baf42163 100644 --- a/pydis_site/apps/resources/resources/sentdex.yaml +++ b/pydis_site/apps/resources/resources/sentdex.yaml @@ -10,6 +10,7 @@ description: 'An enormous amount of Python content for all skill levels Check out his channel for more video series! ' title_image: https://i.imgur.com/kJgWZIu.png +title_image_dark: /static/images/resources_dark/sentdex.png title_url: https://www.youtube.com/user/sentdex urls: - icon: solid/external-link-alt 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 3bb46e6d..bf461b0a 100644 --- a/pydis_site/apps/resources/resources/simple_guide_to_git.yaml +++ b/pydis_site/apps/resources/resources/simple_guide_to_git.yaml @@ -2,7 +2,7 @@ description: A simple, no-nonsense guide to the basics of using Git. name: A Simple Guide to Git title_url: https://rogerdudler.github.io/git-guide/ title_icon: branding/github -title_icon_color: black +title_icon_color: dark tags: topics: - tooling diff --git a/pydis_site/apps/resources/resources/software_design_by_example.yaml b/pydis_site/apps/resources/resources/software_design_by_example.yaml new file mode 100644 index 00000000..82d1c646 --- /dev/null +++ b/pydis_site/apps/resources/resources/software_design_by_example.yaml @@ -0,0 +1,26 @@ +name: Software Design by Example +description: A tool-based introduction to Software Design with Python. This book teaches + design by explaining examples of small versions of familiar tools to show how + experienced software designers think. It introduces some fundamental ideas in computer + science that many self-taught programmers haven’t encountered. +icon_image: https://third-bit.com/sdxpy/logo.svg +icon_size: 50 +title_url: https://third-bit.com/sdxpy/ +urls: +- icon: branding/goodreads + url: https://www.goodreads.com/book/show/199430059-software-design-by-example + color: dark +- icon: branding/github + url: https://github.com/gvwilson/sdxpy + color: dark +tags: + topics: + - general + - software design + payment_tiers: + - free + - paid + difficulty: + - intermediate + type: + - book diff --git a/pydis_site/apps/resources/resources/think_python.yaml b/pydis_site/apps/resources/resources/think_python.yaml index 7099afd8..f8b17761 100644 --- a/pydis_site/apps/resources/resources/think_python.yaml +++ b/pydis_site/apps/resources/resources/think_python.yaml @@ -8,10 +8,10 @@ title_url: https://greenteapress.com/wp/think-python-2e/ urls: - icon: branding/goodreads url: https://www.goodreads.com/book/show/14514306-think-python - color: black + color: dark - icon: branding/github url: https://github.com/AllenDowney/ThinkPython2 - color: black + color: dark tags: topics: - general 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 f372d35d..1ddb70e5 100644 --- a/pydis_site/apps/resources/resources/two_scoops_of_django.yaml +++ b/pydis_site/apps/resources/resources/two_scoops_of_django.yaml @@ -5,10 +5,10 @@ title_url: https://www.feldroy.com/books/two-scoops-of-django-3-x urls: - icon: branding/goodreads url: https://www.goodreads.com/book/show/55822151-two-scoops-of-django-3-x - color: black + color: dark - icon: branding/github url: https://github.com/twoscoops/two-scoops-of-django-2.0-code-examples - color: black + color: dark tags: topics: - web development |