Django community: RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
Diving into event-driven architectures - Marc-André Lemburg
(One of my summaries of the 2023 Dutch pythonconferentie python meeting in Utrecht, NL). Marc-André has been involved with python already since 1994. If you want to implement something you want to see grow, it should be scalable (vertically and horizontally). Easy to adapt, easy to maintain. Prepared for the enterprise. You have to keep it in mind from the beginning. Also: Have good failure modes. Everything will fail at some point: handle it elegantly. Integrate observability. If something fails you need to know what happened. Automate governance. You might not think about this from day one, but if you want to grow... There are two well-known synchronous archtectures: REST and the lesser known GraphQL. REST has good frontend support. Every backend can "do" it. GraphQL has the advantage that it simplifies querying new data. It is just more flexible. But performance is a problem. Regular REST also isn't necessarily speedy. EDA, event-driven architectures, could be a solution. Asynchronous. You can combine it with REST/GraphQL. The asynchronous nature ensures it scales well. It also promotes loose coupling. The main concept is event driven communication. You pass along messages. You produce and consume without a direct connection. There's always a broker … -
Python and freedom and bias - Laís Carvalho
(One of my summaries of the 2023 Dutch pythonconferentie python meeting in Utrecht, NL). She showed "the zen of python": >>> import this The Zen of Python, by Tim Peters Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex is better than complicated. Flat is better than nested. Sparse is better than dense. Readability counts. Special cases aren't special enough to break the rules. Although practicality beats purity. Errors should never pass silently. Unless explicitly silenced. In the face of ambiguity, refuse the temptation to guess. There should be one-- and preferably only one --obvious way to do it. Although that way may not be obvious at first unless you're Dutch. Now is better than never. Although never is often better than *right* now. If the implementation is hard to explain, it's a bad idea. If the implementation is easy to explain, it may be a good idea. Namespaces are one honking great idea -- let's do more of those! She herself wondered whether she fully understood those. Are they suggestions? Aphorisms? The law? She took the book "Gödel, Escher, Bach". Mentioned in there, are the three layers of any message: Frame message. … -
The IQ of AI: measuring intelligence in AI models - Jodie Burchell
(One of my summaries of the 2023 Dutch pythonconferentie python meeting in Utrecht, NL). Jodie wants to look at large language models (like chatgpt), which went into full-on hype mode this year. Let's look at some historical examples of what people have thought to be artificial intelligence. At the first demonstration of a remote contolled boat, people didn't know what happened. Was this artificial intelligence? In 1997, Kasparov lost the chess match to Deep Blue. The basic problem was that the computer did a totally unexpected move ("real intelligence") in the first match that threw Kasparov off track and caused him to make mistakes in confusion. Years later a google engineer thought an AI had come to life, It responded like a nine year old. He wanted legal protection for the AI. (He was fired). Now chatGPT: people think it displays real artificial general intelligence. But what is the reality? Can we look at it more scientifically? A well known article ("sparks of artifical general intelligence") claims to use categories from an older article to rank it: reasoning, planning, problem solving, abstract thinking, comprehending complex ideas, learning quickly and from experience. Only... Jodie has lots of experience in psychology and … -
The magic of self: how python inserts self into methods - Sebastiaan Zeeff
(One of my summaries of the 2023 Dutch pythonconferentie python meeting in Utrecht, NL). There's deep magic in python. Some of it is really hard to understand. Guido van Rossum: "from day one, there was deep magic hiding in some places, designed to quietly help users". Sebastiaan is going to show us a nice example of python magic: how "self" gets injected into method calls on a class: class Guitar: def __init__(self, name): self.name = name def play_note(self, note): print(f"{self.name} plays {note}") You can instantiate a guitar and call my_guitar.play_note("B") on it. With just the note as a parameter. But where is the self coming from? Somehow your instance of the Guitar class is magically inserted. Note: self is not a magical keyword. You can give it a different name and it will still work (though your code will be unreadable and people will hate you). Everything in python is an object. A class is an object (an instantiation of Type). A method inside a class is a regular function object. Plus it is also added with the name of the function as an attribute to the class (the namespace of the class). If you call my_guitar.play_note("B"), your my_guitar is … -
PyCharm's Year of Django - Paul Everitt
PyCharm JetBrains JetBrains Fleethttps://htmx.org/essays/right-click-view-source/ Django Chat #88: PyCharm with Paul Everitt & Aleksei Kniazev2023 Django Developers Survey django-microframework Badass: Making Users Awesome book Django Views the Right Way by Luke Plant Django Testing Tutorial The #ViewSource Affordance Support the ShowLearnDjango.comButtonDjango News newsletter -
Customizing Django 404 and 500 Error Pages
For any web application, users will inevitably navigate to error pages like 404 (Page Not Found) or 500 (Server Error). Django ships with default error pages for both, but if … -
My appearance on the Django Chat podcast
<![CDATA[ My appearance on the Django Chat podcast I was honored to be a guest on the Django Chat podcast recently! It was great fun, even though I was a bit nervous speaking on a podcast since English is not my first language, and I don’t speak often. I have been following Carlton and Will online for a long time and read Will’s books on Django, so it was great to meet both via video for the podcast. We talked about "mezcla" of things, including my background, switching to Django, using Django Rest Framework for SwitchBuddy, and also iOS stuff like new versions, API changes, and similar. You can find the episode on the official Django Chat website or in any of the podcast players you might use. ]] -
Django News - 200 OK - Django Security Releases: 4.2.6, 4.1.12, and 3.2.22 - Oct 6th 2023
News Django security releases issued: 4.2.6, 4.1.12, and 3.2.22 Posted by Natalia Bidart on October 4, 2023 djangoproject.com Python Release Python 3.12.0 Python 3.12.0 is the newest major release of the Python programming language, and it contains many new features and optimizations. python.org Python Insider: Python 3.11.6 is now available Python 3.11.6 is the newest major release of the Python programming language, and it contains many new features and optimizations. blogspot.com Updates to Django Last week we had 11 pull requests merged into Django by 6 different contributors - including 1 first time contributor! Congratulations to Dan Jacob for having their first commit merged into Django - welcome on board! Any bugs found in the new features of 5.0 are considered "Release blockers". We had 3 release blockers resolved last week (#34849, #34877, #34878) which were discovered by Mariusz Felisiak, Paolo Melchiorre and Dan Jacob. I want to thank each of you for testing 5.0 and uncovering these issues! Testing 5.0 is a great way to contribute to this release and might even lead to your first commit to Django! There are even a couple of 5.0 Testathons planned as community events - sign up here if you're free: https://forms.gle/eqXBtCTa8V5KrL9h9 … -
How to Stop macOS from Stealing Focus after Switching Apps Across Desktops
For years, I’ve had a macOS bug that occurred randomly and that I could only fix by rebooting or logging out. The Internet is full of similar problems, but I never found a solution to mine, and my pleas for help on Twitter went unanswered. Now, I have found a workaround myself. -
Django Fixtures Tutorial: How to use dumpdata and loaddata
A [fixture](https://docs.djangoproject.com/en/4.2/topics/db/fixtures/) is a collection of data that can be dumped or loaded into a Django database. It is serialized into a text-based format such as JSON or XML and … -
DNS Strikes Back - Building SaaS #172
In this episode, we returned to our DNS configuration from the previous stream and worked on testing email from end to end on the production site. On the stream, we spent a lot of time looking through SendGrid documentation, digging into layers of DNS, and troubleshooting the challenges that can arise when getting a site online. -
DNS Strikes Back - Building SaaS with Python and Django #172
In this episode, we returned to our DNS configuration from the previous stream and worked on testing email from end to end on the production site. On the stream, we spent a lot of time looking through SendGrid documentation, digging into layers of DNS, and troubleshooting the challenges that can arise when getting a site online. -
Django and iOS - Filip Němeček
Personal siteBlog MastodonDjango FeedsDjango BlogsImpressKitSwitch Buddy Gaming Buddy Support the ShowLearnDjango.comButtonDjango News newsletter -
Django Fixtures Tutorial: How to use dumpdata and loaddata
A [fixture](https://docs.djangoproject.com/en/4.2/topics/db/fixtures/) is a collection of data that can be dumped or loaded into a Django database. It is serialized into a text-based format such as JSON or XML and … -
Weeknotes (2023 week 40)
Weeknotes (2023 week 40)More work on hosting several websites from a single Django application server using feincms3-sites I have mentioned feincms3-sites last week in my last weeknotes entry; I have again given this package a lot of attention in the last days, so another update is in order. It is now possible to override the list of languages available on each site. That’s especially useful for an upcoming campaign site where the umbrella group’s site is available in three languages, but (most?) individual group sites (hosted on subdomains) will only have a subset of languages. Since I live in a country with four national languages (english isn’t one of them, but is spoken by many!) supporting more than one language, or even many languages is totally commonplace. It’s great that Django has good support for internationalization. For the sake of an example, I have the following sites: example.com: The default. The host has to match exactly. subdomain.example.com: One individual group’s site. The host has to match the regex ^subdomain\. (sorry, I actually do like regexes). Overriding configured hosts for local development One thing which always annoyed me when using django.contrib.sites was that “just” pulling the database from production to the … -
Django Best Practices: Docker
[Docker](https://www.docker.com/) is a very popular tool for managing Django projects. Many professional developers use it but I find it is still confusing to many newcomers. In this post I'll attempt … -
Django Best Practices: Imports
Imports are an inevitable part of Python and Django development. [Pep8](https://pep8.org/#imports), which is the official style guide for Python, recommends imports be placed at the top of the file, on … -
Django Best Practices: Models
Properly defining database models is arguably __the__ most important part of a new project, however Django provides us with tremendous flexibility around *how* we structure our models. There _is_ an … -
Django Best Practices: Security
Django is a mature, battle-tested web framework with a well deserved reputation for security over the past 15+ years.However the internet remains a dangerous place and web security is an … -
Django Best Practices: User permissions
Setting user permissions is a common part of most Django projects and can become quite complex quickly. We'll use the Blog example from my [Django for Beginners](http://djangoforbeginners.com) book as an … -
Database Design Tutorial for Beginners
Databases are at the heart of every web application. Their design, or schema, is literally the blueprint for how all information is stored, updated, and accessed. However learning about databases … -
Django Search Tutorial
__Note__: I gave a version of this tutorial at DjangoCon US 2019. You can see the video here: -
Django Rest Framework Tutorial: Todo API
[Django Rest Framework](http://www.django-rest-framework.org/) is a powerful library that sits on top of existing Django projects to add robust web APIs. If you have an existing Django project with only models … -
Is Django a Full Stack Framework?
The title of this post, "Is Django a Full Stack Framework?" is a question I receive often from new web developers. It's a very valid question so I wanted to … -
Django Markdown Tutorial
[Markdown](https://daringfireball.net/projects/markdown/) is a popular text-to-HTML conversion tool for web writers. It is far easier to use than plain old HTML. Many/most static site generators provide a built-in way to write …