Django community: RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
Accepting Crypto Payments with Django and Coinbase
This tutorial looks at how to accept crypto Payments with Django and Coinbase Commerce. -
Pandas for Data Analysis
#Pandas is a great library for reading and manipulating data. Chris Malec gave an overview of pandas, focusing on how to read in some common data types, create filters to specific table cells, apply functions to your data, merge tables together, and create nice plots as well as summary tables from your data. For an application, Chris used some financial data, and briefly discussed his work at FinRA finding manipulative behavior in the US stock market. -
Pandas for Data Analysis
#Pandas is a great library for reading and manipulating data. Chris Malec gave an overview of pandas, focusing on how to read in some common data types, create filters to specific table cells, apply functions to your data, merge tables together, and create nice plots as well as summary tables from your data. For an application, Chris used some financial data, and briefly discussed his work at FinRA finding manipulative behavior in the US stock market. -
Coverage.py - Ned Batchelder
Ned’s personal site@nedbat on Twitter, Discord, and IRCInteractive Walks post coverage.py django-coverage-pluginSpeed Up Your Django Tests by Adam Johnson bookedx-platform CogSupport the ShowThis podcast does not have any ads or sponsors. To support the show, please consider visiting LearnDjango.com, Button, or Django News. -
What is your labor worth? Tech compensation in 2021
Salaries in tech are going up, and many people are looking for new jobs or reevaluating the ones they have. However, many tech workers have no idea what their labor is worth on the open market. There’s a huge information asymmetry here: employers have access to detailed industry data on salaries, but workers don’t. In this article, I’ll share a method people can use to determine the “market rate” for their skills. I’ve developed this method over the last six months, as I’ve helped nearly 100 people figure out their worth. Feedback has been that this is pretty accurate, so I’m sharing the technique here so you can use it to determine what your labor is worth. -
Python 3.10: What's New
This article looks at the new features in Python 3.10 and how they can be implemented. -
Three more uses for functools.partial() in Django
I remain convinced that Python’s functools.partial() is underappreciated. Following my previous post, here are three more ways to use partial() with Django. (For an explanation of partial() see PyDanny’s post.) 1. Customizing render() Django’s render() shortcut simplifies generating an HTTP Response from rendering a template. If several views need to pass the same arguments, we can wrap the shortcut with partial() to avoid repetition. For example, imagine we have several views that return text, rather than HTML. We could create our own render_text shortcut that calls render with the content_type argument pre-filled: from functools import partial from django.shortcuts import render render_text = partial(render, content_type="text/plain") def robots_txt(request): ... return render_text(request, "robots.txt") def security_txt(request): ... return render_text(request, "security.txt") (See my posts on robots.txt and security.txt.) We can use this approach with other shortcut functions, or even HttpResponse & its subclasses. 2. transaction.on_commit() callbacks Django’s examples for transaction.on_commit() use functions, or lambdas: from django.db import transaction # With a function def send_email(): send_admin_email( subject="Author created", # ... ) transaction.on_commit(send_email) # With a lambda transaction.on_commit( lambda: send_admin_email( subject="Author created", # ... ) ) In the wild, most on_commit() callbacks only call another function with pre-filled arguments. Using lambda can make this easy, but lambda … -
DjangoCon is Back and Free of Charge
We’ve waited eagerly for DjangoCon 2021 since last year’s event was cancelled due to COVID-19. Not only is the event back, but it’s free to attend! DjangoCon will take place virtually on October 22 and 23 — it will be unprecedented since this is the first time the conference will be virtual. “We are very excited to allow our virtual conference to be free,” said Sponsors Co-Chair Catherine Holmes who has been involved as an organizer since 2018. “In the past, the cost of tickets varied based on the cost of location, including the venue and catered meals.” But with none of that this year, the event is much more affordable to host, and the organizers decided to pass those savings on to the attendees. For comparison, tickets for the last in-person conferences in San Diego in 2018-19 were as high as $795 — so attending for free provides substantial savings. There is an option to submit a donation when you register for DjangoCon. Donations in any amount are appreciated and will go toward conference costs. Organizers like Holmes and Sponsors Chair Dawn Wages hope the low barrier to entry will attract more attendees, especially those who may not have … -
Django News - Django 3.2.8 and Python 3.10.0 now available! - Oct 8th 2021
News Django bugfix release: 3.2.8 A new bugfix that fixes two issues from 3.2.7. As ever, the best security practice is to always be on the latest version of Django. Here's how to upgrade. djangoproject.com Python Insider: Python 3.10.0 is available Python 3.10.0 is the newest major release of the Python programming language, and it contains many new features and optimizations. blogspot.com 🎃 GitHub's guide to Hacktoberfest 2021 October is Hacktoberfest, and there are better-defined rules this year and plenty of Django and Python projects that are looking for contributions. github.blog Events PyCascades 2022 is back! The CFP (Call for Proposals) is open now and closes Sunday, October 24th. Speaker invitations will be sent out Monday, November 15th. pretalx.com DjangoCon US 2021 DjangoCon US 2021 will be online only on October 22-23. Make sure to grab a free ticket in advance. djangocon.us Sponsored Jobs 💼 Canopy is hiring software engineers! We are seeking experienced software engineers to join our talented engineering team. We provide social impact programs evaluation & technical tools to maximize success! canopyteam.org Articles Django Fellow Reports Carlton Gibson, one of two Django Fellows, has moved his Fellow Reports to his website. These are excellent ways to catch … -
Bulk Delete Form - Building SaaS with Python and Django #117
In this episode, I worked on the bulk delete form that I need so that my customers can delete many tasks in the system at once. -
Bulk Delete Form - Building SaaS #117
In this episode, I worked on the bulk delete form that I need so that my customers can delete many tasks in the system at once. -
How to Delegate Meeting Attendance
Wrapping up my series on delegation with an example: how to delegate meeting attendance. -
Dutch python meeting: behaviour driven development - Jan-Hein Bührman
(One of my summaries of a talk at a Dutch python meeting, this one in october 2021 at the Amersfoort zoo) Behaviour driven development (BDD) is something that gets mentioned at python meetups and conferences from time to time. See this example from 2019. What is behaviour driven development? The core point is that you specify feature behaviour. Concrete, realistic examples to create a shared understanding of how the system should behave. It is defined as a scenario: Input Actions Outcomes What is commonly used is the "Gherkin" language: "given .... when .... then ....". In Java, "cucumber" is a well-known library for BDD. In python you have behave. BDD has a big benefit: you have concrete examples in an unambiguous specification. And it is in a language that can be understood by everyone from customer to programmer. An example: Scenario: simple google search Given: the google homepage is displayed When: the user enters "panda" in the search bar Then: links related to "panda" are shown on the results page. "Given" describes the initial stable state. "When" describes the action that's relevant for the scenario. "Then" describes the outcome of the action. You can add "and" statements to expand on … -
Dutch python meeting: structural pattern matching - Sebastiaan Zeeff
(One of my summaries of a talk at a Dutch python meeting, this one organised by Ordina in october 2021 at the Amersfoort zoo) Link to his slides Structural pattern matching (PEP (python enhancement proposal) 634) is the main new feature of the new python 3.10. Not everyone was happy with structural pattern matching. One of the comments: I see the match statement as a domain specific language that looks like python, but that does something surprisingly differently. Yes it is a special mini-language. A bit like regular expressions, which is also a special mini-language within python. What is structural pattern matching? It is not a simple C++ "switch" statement. One of the differences is that python's "match" statement only matches one of the patterns: with C++, you'd have to add "break" statements otherwise you can have multiple matches. It is not just matching string literals. Structural pattern matching tries to match objects by their shape. So: the value and/or the type. For sequences: how many elements? Dicts: which keys? What kind of values? Which attributes does an object have? This is how it looks: match <target>: case <pattern> [if <guard>]: <block of code> case <pattern> [if <guard>]: <block of … -
Django REST Framework Views - ViewSets
This article takes a deep dive into Django REST Framework's most powerful view, ViewSets. -
Django News - Python 3.10 and PostgreSQL 14 Release - Oct 1st 2021
News PostgreSQL 14 Released! The PostgreSQL Global Development Group announced the release of PostgreSQL 14, the latest version of the open-source database. postgresql.org What’s New In Python 3.10 New syntax features, additions to the standard library, typing features, and a few deprecations. python.org Python 3.10 Release Stream Python 3.10 is set to be released on 4 October 2021. Join us live in our Python 3.10 Release Stream with Pablo Galindo, CPython Core Developer and Python 3.10 Release Manager, and Leon Sandøy. youtube.com Events Django Girls Mentors needed for DjangoCon US DjangoCon US is partnering with Django Girls and we're looking for mentors. Please visit our signup form. We are looking for 15 engineers to help with one of the most rewarding aspects of Open Source Software: bringing new people into the community! We look forward to seeing you there! djangogirls.org Sponsored Jobs 💼 Canopy is hiring software engineers! We are seeking experienced software engineers to join our talented engineering team. We provide social impact programs evaluation & technical tools to maximize success! canopyteam.org Articles New Testing Features in Django 4.0 Django 4.0 had its first alpha release last week and the final release should be out in December. It contains … -
High Performance Django Is Free Online
In 2014 Yann Malet and I (with the help of the rest of the team here) wrote a book about building and scaling Django websites. It was the culmination of things we'd learned from, at the time, close to a decade of experience building, deploying, and supporting Django sites. It's been seven years since its release and it's fair to say that the book has run its course. While I didn't feel good about continuing to sell the book given its age, I also believe it still contains a lot of valuable information. As you'd expect, after seven years, many of the technical examples are outdated. The book, however, is largely conceptual. Code snippets are rarely the "secret sauce" when scaling a site. Topics such as caching and reducing/optimizing database queries aren't usually coding challenges. In fact, thanks to the stability of Django, much of that code is still the same today. So instead of relegating the book to the dustbin, we're releasing it for free online. It's something we've wanted to do for a long time and I'm excited to finally get the book in more people's hands. You can find it on this site at https://lincolnloop.com/high-performance-django/. -
High Performance Django Is Free Online
In 2014 Yann Malet and I (with the help of the rest of the team here) wrote a book about building and scaling Django websites. It was the culmination of things we'd learned from, at the time, close to a decade of experience building, deploying, and supporting Django sites. It's been seven years since its release and it's fair to say that the book has run its course. While I didn't feel good about continuing to sell the book given its age, I also believe it still contains a lot of valuable information. As you'd expect, after seven years, many of the technical examples are outdated. The book, however, is largely conceptual. Code snippets are rarely the "secret sauce" when scaling a site. Topics such as caching and reducing/optimizing database queries aren't usually coding challenges. In fact, thanks to the stability of Django, much of that code is still the same today. So instead of relegating the book to the dustbin, we're releasing it for free online. It's something we've wanted to do for a long time and I'm excited to finally get the book in more people's hands. You can find it on this site at https://lincolnloop.com/high-performance-django/. Photo by … -
Bulk Delete View - Building SaaS with Python and Django #116
In this episode, I started a bulk delete view to make it possible for customers to delete many course tasks at once. -
Bulk Delete View - Building SaaS #116
In this episode, I started a bulk delete view to make it possible for customers to delete many course tasks at once. -
Django REST Framework Views - Generic Views
This article looks at how to use Django REST Framework's Generic Views to prevent repeating certain patterns over and over again. -
Django 4.0
Django 4.0 alpha 1 released Django 4.0 release notes - UNDER DEVELOPMENT DjangoCon US 2021It’s About Time: DjangoCon US 2018 talk by Russell Keith-Mageeawesome-django repo Support the ShowThis podcast does not have any ads or sponsors. To support the show, please consider visiting LearnDjango.com or Button. -
New Testing Features in Django 4.0
Django 4.0 had its first alpha release last week and the final release should be out in December. It contains an abundance of new features, which you can check out in the release notes. In this post we’ll look at the changes to testing in a bit more depth. 1. Random test order with --shuffle¶ The release note for this reads: Django test runner now supports a --shuffle option to execute tests in a random order. I’m delighted that Django now has this option. It gives us strong protection against non-isolated tests. When tests are not isolated, one test depends on the side effect from another. For example, take this test case: from django.test import SimpleTestCase from example.core.models import Book class BookTests(SimpleTestCase): def test_short_title(self): Book.SHORT_TITLE_LIMIT = 10 book = Book(title="A Christmas Carol") self.assertEqual(book.short_title, "A Chris...") def test_to_api_data(self): book = Book(title="A Song of Ice and Fire") self.assertEqual( book.to_api_data(), {"title": "A Song of Ice and Fire", "short_title": "A Song ..."}, ) The tests pass when run forwards (test_short_title first), but fail in reverse. This is because test_short_title monkeypatches Book.SHORT_TITLE_LIMIT to a new value, and test_to_api_data’s expected data depends on this change. Non isolated tests can arise all too easily in an evolving … -
Django REST Framework Views - APIViews
This article takes a deep dive into how Django REST Framework's views work and its most basic view, APIView. -
Creating dynamic RSS feed with parameters
<![CDATA[ Creating dynamic RSS feed with parameters Setting up basic RSS feed with Django is pretty quick process thanks to Syndication framework included in Django. And it turns out setting up RSS feed that takes a parameter is not significantly more involved. For my IndieAppsCatalog I wanted to generate separate RSS feeds for all categories, so people could follow just "Productivity" category, for example. Let's see how this is done, with emphasis on what is different from setting up basic RSS. Setting up the feed You need a way to identify the "base object" the RSS feeds uses. For that we can use get_object method: class NewlyAddedAppsByCategory(Feed): author_name = "Indie Apps Catalog" def get_object(self, request, category_id, **kwargs): return AppCategory.objects.get(appstore_id=category_id) This is the key difference from basic RSS feeds which don't make use of the get_object method. Next you can change properties of the feed like title, link or description to be methods which allows you to customize them based on the category. For example: def title(self, obj): return "IndieAppsCatalog: Newly added apps to '{0}'".format(obj.display_name) def link(self, obj): return obj.get_absolute_url() The obj is AppCategory instance so we can use its display_name property to customize title for this RSS feed. Customizing what …