Django community: RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
Django News - djangoproject.com website redesign! - Jun 2nd 2023
News Help us make the djangoproject.com website better The 20tab agency is currently engaged in a pro-bono redesign of the djangoproject.com website. Please fill out this short survey to help. google.com Thinking about running for the Python Software Foundation Board of Directors? Let’s talk! This year’s Board Election Nomination period is open. Current board members want to share what being on the board is like and are making themselves available to answer all your questions about responsibilities, activities, and time commitments via online chat. blogspot.com Enforcement of 2FA for upload.pypi.org began June 1st, 2023 PyPI now requires all uploads from accounts with 2FA enabled to use an API token or Trusted Publisher configuration. pypi.org PEP 594 has been implementated: Python 3.13 removes 20 stdlib modules Python 3.13 removes 20 stdlib modules and Python 3.12 removed 5 stdlib modules. Check out this forum post to see what modules were removed. python.org PEP 658 is now live on PyPI - Packaging Wheels uploaded to PyPI will have their METADATA files served along side them on files.pythonhosted.org , and the appropriate information served in the Simple API to determine if the file as available. python.org Updates to Django Django PRs this week We're … -
New SaaS Signup - Building SaaS with Python and Django #161
In this episode, we dug into the first portion of the journey SaaS. I acquired the domain name of journeyinbox.com for this service. That service is not live yet. We started at the beginning to set up users and sign up features. -
New SaaS Signup - Building SaaS #161
In this episode, we dug into the first portion of the journey SaaS. I acquired the domain name of journeyinbox.com for this service. That service is not live yet. We started at the beginning to set up users and sign up features. -
Frequently Asked Questions about Django
## What is Django? Django is a Python web framework that takes care of the difficult parts of web development--authentication, database connection, CRUD (Create, Read, Update, Delete) operations, URL routing, … -
Django News - DjangoCon Europe in Edinburgh starts Monday! - May 26th 2023
News DjangoBook.com This classic domain--first used to host a free book on Django written by Adrian Holovaty and Jacob Kaplan-Moss--is now a community guide to current books on Django. djangobook.com Python 3.12.0 beta 1 released Python 3.12 is still in development. This release, 3.12.0b1, is the first of four planned beta release previews of 3.12. blogspot.com python2.7 will be removed from the python-versions on June 19 GitHub is dropping platform support (actions/setup-python ) for Python 2.7 on June 19th. Python2.7 was officially sunset on January 1, 2020. github.com PyPI was subpoenaed The PSF received three subpoenas from the US Department of Justice for PyPI user data in March and April of 2023. In additional news, PGP signatures will be removed from PyPI going forward. pypi.org Django Feeds A valuable resource on Django tutorials in video, podcast, and book format. djangofeeds.com Updates to Django Django PRs May 14th - 22nd We're trying out a new category, curated by Sarah Boyce, highlighting contributions to the Django codebase. On the week starting May 15th, we had 10 pull requests merged into Django by 8 different contributors - including 3 first time contributors! Congratulations to Julie Rymer, Dingning and Rajeesh Punathil for having their … -
PyGrunn 2023: modern python through fastAPI and friends - Sebastián Ramírez
(One of my summaries of the May 2023 Dutch PyGrunn conference). Sebastián Ramírez ("tiangolo") has created fastAPI (and other open source projects). He talks about modern python. With modern python he means 3.7+. One of the new items: f-strings, formatted strings. f"Hi {name}". Type annotations, type hints. We've been working without type annotations all this time, so why should we add them? Well, for instance for great editor support. Suddenly the editor's autocompletion is way better. If the editor knows some variable is a string, it can offer autocompletion for the variable by showing string's methods. You also get better errors in your editor when multiplying by something that can also be a None, for instance. Type annotations are used a lot in fastAPI. @app.get("/recipes/{name}") as a decorator on a view function and a type "string" on the name argument and you get autocompletion. And type checking in the fastAPI api with automatic input validation. And you get data conversion: a ?quantity=2 in a URL is basically a string. But fastAPI knows it should be converted into an integer. Typer is a library for using the same functionality for command line interfaces. Including tab completion. A tip: use rich to … -
PyGrunn 2023: software design tips for lazy people - Arjan Egges
(One of my summaries of the May 2023 Dutch PyGrunn conference). Arjan Egges runs the ArjanCodes youtube channel. "Software design" often sounds like "huge diagrams with lots of arrows". Sometimes software design is complicated, like determining what the customer actually wants. Or a big change in your mayor concept. Or fitting together completely different technologies, especially when they are opinionated. What you also hear... "the code works, I don't have time for refactoring". "I have deadlines, and it works, so I don't have to write tests". "I just ask chatgpt to clean my code". His main point: software design is about consistently taking slightly different decisions while you're coding. These decisions compound and should make you code faster and better. He has seven tips for us: Name wisely. This about categorising things. Being clear about what it is. Even better: a good name makes sure you yourself knows what something is :-) If you cannot find a good name for something, perhaps you should approach the problem in a different way? Perhaps you should turn your class into a couple of functions. If a function has "and" in the name: perhaps it should be split into two separate functions. If … -
PyGrunn 2023: frontend for backenders ("twinspark") - Alexander Solovyov
(One of my summaries of the May 2023 Dutch PyGrunn conference). Single page applications (SPA) suck! Stop building them! (He worked on them for the last 12 years :-) ) The promises of SPAs: UI is a function of the state. A unified API for UI and native apps. Nice composability. Better long-term maintentance. And faster development because you can split in backend and frontend teams. 6 years later... 2.5MB minimized javascript. Page speed perfomance sucked. The negative side of SPAs: Performance is bad. Complexity is through the roof. Display logic in your app logic. Business logic creeps into your clients. The codebase is split. And the tech split makes people feel helpless. The backenders are excluded from the frontend so they just start to care about the API. The frontenders complain about the unusable API that doesn't care about the frontend... Back to jquery? Never. It takes only two years instead of six years for your code to go bad. Composability doesn't even exist as a word in jquery. Logic spread out everywhere. We need a modern interactive site. What do we actually want? Composability. Understandability. Server-side html rendering and a minimum of javascript. Empowered backend developers. He demoed … -
PyGrunn 2023: FastAPI with Django - Ivor Bosloper
(One of my summaries of the May 2023 Dutch PyGrunn conference). Ivor works for dacom, a GIS and agri company. They use both django and fastAIP. FastAPI is a relatively new web framework for building REST APIs. The ingredients are pydantic, data validation based on python type hints, and starlette, an asgi async toolkit. With pydantic you can define classes/models of your data. With python type hints. Pydantic takes care of the type checking and also converts the input to the correct type. With Django, you'll get the correct type out of the database, but it won't automatically fix up the model you're instantiating yourself. He showed a simple django app with two models ("Farm" and "Field"). Right next to it he generated a fastAPI app. In the asgi.py file he hooked up django as usual and added a fastAPI app to the router. So django and fastapi run side by side. He showed the django admin, running as usual, and /api/ with the fastAPI functionality. He uses fastapi-utils for a "DTO", data transfer object. fastapi-models has an APIModel class to map pydantic models to models in some other system. In this case django's ORM. Seemed to work like a … -
PyGrunn 2023: optimization for mere mortals - Dulaj Disanayaka
(One of my summaries of the May 2023 Dutch PyGrunn conference). Mere mortals? There are two kinds pf people in the world: those that like to optimize and those that are mere mortals :-) He'll try to get us over to the optimization side. Python is pretty slow. It is getting faster and faster all the time, though. And speed isn't everything: readability and maintainability are also important. And a large community. Optimization at the language level will be talked about in the "python under the hood" later during this conference. Something you often hear: Premature optimizaton is bad. Worrying about efficiency in the wrong places and at the wrong times is a real problem accourding to Donald Knuth. Micro-optimization is bad. But... is that so? A small part of your code might be called lots of times. Have you profiled it? Look at the ROI (return on investment). Time spend optimizing code that isn't the actual problem is time that is wasted. Time spend on slow code that is called a lot, that's a good thing. What he's suggesting is what he calls opportunistic optimization. It is a bit like the "boy scouts' rule": make the code a little … -
PyGrunn 2023: your API on-the-fly - Jan Murre
(One of my summaries of the May 2023 Dutch PyGrunn conference). API on the fly? The talk is about autogenerating APIs using "Amsterdam Schema". Jan works for datapunt Amsterdam, a project for being transparant as the city of Amsterdam. Your citizens pay taxes, so they have a right to access the open data that the municipality maintains. They have api projects for many datasets. Like "BAG", the official building database. Or a list of the power sockets for the weekly markets. Lots of geographical information. They use postgres, docker containers, ubuntu, python + django + djangorestframework. Developed specific for this project: django gisserver. DSO, digitaal stelsel omgevingswet, is a Dutch API specification for this kind of data. The various sorts of data are all specified in a json format that they call Amsterdam Schema. All data sets are available as geographical layers. They have a custom django management command (import_schemas --create-tables) to read such a json schema file and create the empty tables in the database. He demonstrated (live) how it works. The data was in the dabase and a nice swagger-like page was shown in the website with the option to browse the REST API. There's even support for … -
PyGrunn 2023: python under the hood, why slow and how to speed it up - Mike Huls
(One of my summaries of the May 2023 Dutch PyGrunn conference). You might get the question "why do you use python, isn't that a slow language"? Well, it is slower than many other languages, but not that slow. You should also look at programmer productivity. You wouldn't write an operating system in python. You also wouldn't write a web framework in C. How python is designed Python is dynamically typed instead of statically typed. This makes it easier for humans to understand and quicker. It makes sure you don't have to deal with many low-level details. But it can cause errors. Python is interpreted instead of compiled. If you compile code, it turns your program into machine code. The compiler has nothing further to do with it. With an interpreter, the interpreter is actually running your code when you run it. So the interpreter can handle all the OS-specific optimizations. "Live". There's byte code caching, so it's not that it does double work. In a compiled language, variables are stored in a fixed location in memory. If you give a variable a new value, that new value is stored in the same memory location. In python, everything is stored as … -
PyGrunn 2023: testing files like a pro ("faker-file") - Artur Barseghyan
(One of my summaries of the May 2023 Dutch PyGrunn conference). You might need files for testing. Real test files are perhaps not available when you need it. Synthetic data might just do fine for most use-cases. Real data might not even be allowed due to privacy concerns, for instance. You could use Faker to generate fake names and adresses and so for your test. You have control over what you generate. faker.zip_code(), faker.company_email(). Faker helps when you need to generate separate fields. But sometime you need actual files. For that you can use faker-file. faker-file works with Faker and factory_boy. It is added as a "faker provider". It supports text, csv, docx, mp3, png, pdf, epub, etc, etc. Also .eml email files. You can have it generate random text, but you can also pass sample text. You can also pass a template: you can use Faker's regular methods like first_name and address in there. Handy! If you generate a png, it will be a png with a bitmap of the text. A zipfile with some folders and docx files is also possible. And zipfiles with folders and zipfiles with pngs in them. So: basically everything. Normally, the files are … -
Hurray, this friday there's PyGrunn again
Hurray, this friday (23 May) there's the 11th installment of the Dutch PyGrunn conference. Time to wake up again at an early hour to grab the train to the north of the Netherlands :-) Oh, and to dig out a historic legendary pygrunn t-shirt (I've chosen the 2012 one). I really enjoy these conferences. There is a nice mix of talks to choose from, from python inner details to how-we-use-it. Here are four that I'm looking forward to: Combining fastAPI and Django. At our company we're using fastAPI for a new project, but all our existing projects are in Django. I hope to get a better feel for the (im)possibilities. Personally I haven't used fastAPI, so a conference like pygrunn helps a to broaden my knowledge. Sebastián Ramírez, the creator of fastAPI, gives the closing talk so that'll be a good source of information. And... Sebastián's talk might also be a good source of a "mental model", a way of thinking about software and software design and projects. He'll talk about how to make code that is less error-prone, simpler, more efficient, and have a great developer experience, all at the same time. And all this while including best practices … -
Django RSS Feed Tutorial
Django comes with a built-in [syndication feed](https://docs.djangoproject.com/en/dev/ref/contrib/syndication/) for dynamically generating [RSS (Really Simple Syndication)](https://en.wikipedia.org/wiki/RSS) or [Atom](https://en.wikipedia.org/wiki/Atom_(web_standard)) feeds. These feeds contain recently updated content on a website, and users can subscribe … -
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: 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 … -
Django News - Real-time chat application in Django 4.2 with Server-Sent Events - May 19th 2023
News Django database defaults coming to 5.0 Lily Foote just added support for database defaults on fields. Coming to Django 5.0 in December. This is a massive effort--18 years after the ticket was created. Thanks also to Simon Charette, Adam Johnson, and Mariusz Felisiak for reviews. github.com Django Software Foundation Django 5.x Steering Council Election Results The Steering Council for the Django 5.x release cycle with 74 votes received out of 268 eligible voters: Simon Charette Andrew Godwin Adam Johnson James Bennett djangoproject.com Django Software Foundation monthly meeting, May 13, 2023 Meeting minutes for DSF Board monthly meeting, May 13, 2023. djangoproject.com Django Software Foundation May 2023 Grants A list of grants made by the DSF in support of the community for May 2023. djangoproject.com Sponsored Link Django for Beginners/APIs/Professionals Level up your Django knowledge with Django for Beginners, Django for APIs, or Django for Professionals, or gift it to a friend. Sample chapters are available to preview for free. Bundle discount available! learndjango.com Articles Writing a chat application in Django 4.2 using async StreamingHttpResponse, Server-Sent Events and PostgreSQL LISTEN/NOTIFY A very, very cool example of using "old" tech to solve new problems, aka using server-sent events, Psycopg3, and Django … -
Django REST Framework Authentication
This tutorial looks at how to add authentication to Django REST Framework with django-allauth and dj-rest-auth. -
New SaaS From Scratch - Building SaaS with Python and Django #160
In this episode, I started a brand new SaaS project from scratch. This new SaaS, a journal service, will allow users to journal via email and be provided with past posts as a engaging prompt. -
New SaaS From Scratch - Building SaaS #160
In this episode, I started a brand new SaaS project from scratch. This new SaaS, a journal service that will be at journeyinbox.com, will allow users to journal via email and be provided with past posts as a engaging prompt. -
Django Form Validation Guide
In this tutorial, I will talk about some ways to do form validation in Django, and compare them to help you choose the best way in your project. -
Giving It All Away: My Philanthropic Plan
A major personal accomplishment in 2022 – something I’m proud of – was creating a philanthropic framework. My wife and I intend to use this framework to guide our charitable giving for the rest of our lives, with the explicit goal of giving away almost all of our wealth in our lifetimes. Here’s some backstory, and all the details of our plan and the framework that guides our giving. -
Django News - DjangoCon Africa 2023 announced! - May 12th 2023
News Announcing DjangoCon Africa 2023 The African Django community is excited to announce the first DjangoCon Africa event, taking place this year in Zanzibar, Tanzania, from 6th - 11th November 2023. djangoproject.com DjangoCon US Call for Proposals - Ends May 15th! The CFP is open until May 15th. There are several posts listed in this issue with suggested talk topics. djangocon.us Python Software Foundation Board Election Dates for 2023 The Python Software Foundation Board election timeline has been posted for the 2023 election. There will be four seats open on the PSF board. blogspot.com Wagtail CMS Going Green with Google Summer of Code This year, Google Summer of Code has accepted two proposals from the Wagtail community. The team is excited to see what these collaborations will bring, following impressive contributions made in the past year. wagtail.org Meet Damilola Oladele, Our First Technical Writer for Google Season of Docs 2023 The Wagtail community welcomes its first technical writer, Damilola Oladele, through the Google Season of Docs (GSoD) program. This initiative aims to enhance and modernize Wagtail's developer documentation, making it easier for new community members to learn about the latest versions and features of Wagtail. wagtail.org Sponsored Link Sponsor Django …