Django community: RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
Django News - Django 3.2 release! - Apr 9th 2021
News Django 3.2 released! Django 3.2 is a long-term support (LTS) release meaning that security and data loss fixes will be applied for at least the next three years. The last LTS release was 2.2. The release notes contain new features in detail. djangoproject.com Django security releases issued: 3.1.8, 3.0.14, and 2.2.20 A "low" severity security issue has been addressed with the new release of Django 3.1.8, Django 3.0.14 and Django 2.2.20. We encourage all users of Django to upgrade as soon as possible. djangoproject.com Python 3.9.4 and 3.8.9 are now available Those are expedited security releases, recommended to all users. blogspot.com Get PyCharm, Support Django Until April 29, you can purchase PyCharm at 30% off and the full purchase price will be donated to the Django Software Foundation. jetbrains.com Python Software Foundation News: The PSF is hiring a Developer-in-Residence to support CPython! The Python Software Foundation is happy to announce the creation of the Developer-in-Residence role. The Developer-in-Residence will work fu... blogspot.com Tailwind CSS v2.1 – Tailwind CSS We just released Tailwind CSS v2.1 which brings the new JIT engine to core, adds first-class CSS filter support, and more! What is new in Tailwind CSS version 2.1? is a … -
I Can’t Do This … Yet.
I’ve been “soft” looking for a job, since the end of last year when I learnt the basics of Python. (Want me to come work you as a junior developer? Here’s my resume!) Read more… (2 min remaining to read) -
Creating a virtual environment with python...
This guideline will be tailored towards Linux Operating System but I will drop the Windows Operating System equivalent as we go on. There are several ways people create an environment while writing a python project, be it web, data science, or machin... -
A Love Letter to Books
Despite financial troubles there’s a sense in which my childhood was immensely privileged — a pauper in the material world, I was a sultan in the world of ideas. — Erik Hoel I started by wanting to share that quote and link on my microblog and then my thoughts turned into a blog post sized comment. I decided to post it here too, then. Read more… (2 min remaining to read) -
How to Create a Fancy Range-Slider Filter in Django
Introduction In this tutorial, we are going to create a nice crispy range slider using django-crispy-forms for an integer filter provided by django-filters. The tutorial can be split into four sections. In the first or prerequisite section, we will i... -
Fluent in Django: Improving your application
This is the second part of Fluent in Django series. We're going to upgrade the code we created in Part 1. You can find the finished code from the first part here. Prerequisites Python Basics of Django (Creating a project, Model, View, Templates, Fo... -
Django Architecture
Ok you have decided to create your website using Django as the backend and so it will be a smart move to know how Django actually do the work underground when requests are being sent to it from the front end. Django is said to be made of three layers... -
Embrace the Grind
Sometimes, programming feels like magic: you chant some arcane incantation and a fleet of robots do your bidding. But sometimes, magic is mundane. If you’re willing to embrace the grind, you pull off the impossible. -
HTML Over WebSockets
This article looks at a new approach for achieving a Single-page Application (SPA) -- HTML over WebSockets. -
Django Admin tip: Auto-generated slug content
<![CDATA[ Django Admin tip: Auto-generated slug content In this post I want to share super quick tip that can help you a lot, assuming you use Django Admin and at least some slug fields. Slugs are these human readable parts of an URL, that also let you identify a piece of content. For example this URL: https://nemecek.be/blog/79/working-with-django-imagefield. The last part is a slug based on the post title "Working with Django ImageField". The motivation for slugs is that URLs cannot contain spaces (among other characters) so we use process which is called "slugify" to turn a piece of text into valid slug. Django offers a SlugField which will automatically validate its input to allow only slugs and you can use these as part of the URL. And now we can finally move to the tip. Django ModelAdmin has setting called prepopulated_fields which is mainly there for automatic slug creation. We can use an example from the official docs: class ArticleAdmin(admin.ModelAdmin): prepopulated_fields = {"slug": ("title",)} This will monitor the value of title input and automatically create slugified version with the help of JavaScript. Django also makes sure to not automatically update this slug later on, because you probably don't want your … -
Django at a glance 😋
Welcome developer, in this tutorial we are going to look into what Django web framework is at a glance. By the end of this tutorial you should be comfortable with the following Websites and Webpages Web frameworks and Type of web frameworks Djang... -
What is Werkzeug?
This article explains what Werkzeug is and how Flask uses it for its core HTTP functionality. -
Django 3.2 - News on compressed fixtures and fixtures compression
In the Django 3.2 version just released I contributed with new features related to compressed fixtures and fixtures compression. In this article I have explored into the topic and produced some sample benchmarks. -
Django 3.2 - News on compressed fixtures and fixtures compression
In the Django 3.2 version just released I contributed with new features related to compressed fixtures and fixtures compression. In this article I have explored the topic and produced some sample benchmarks. -
Guest Post: Django Crispy Forms Advanced Usage Example
This is a guest post by Serhii Kushchenko, Python/Django developer and data analyst. He is skillful in SQL, Python, Django, RESTful APIs, statistics, and machine learning. This post aims to demonstrate the creation and processing of the large and complex form in Django using django-crispy-forms. The form contains several buttons that require executing different actions during the processing phase. Also, in the form, the number of rows and columns is not static but varies depending on some conditions. In our case, the set of rows and columns changes depending on the number of instances (columns) associated with the main object (data schema) in a many-to-one relationship. The django-crispy-forms documentation includes a page Updating layouts on the go. That page is quite helpful. However, it does not contain any detailed example of a working project. IMHO such an example is much needed. I hope my project serves as a helpful addition to the official Django Crispy Forms documentation. Feel free to copy-paste the pieces of code that you find applicable. Please see the full codebase here. It is ready for Heroku deployment. Task Suppose we have a database with information about people: name, surname, phone numbers, place of work, companies owned, … -
FYP-DevLog-004
Progress Highlights Finalised Table of Comparison on Related Works on Detecting Mental Health on Bilingual Twitter Posts with supervisor (the most stressful task of this week since my supervisor demands more information to be included) Attended se... -
Python, Django, and React Development on Apple Silicon
Last year, Apple announced that they would transition their entire Mac line from Intel processors to their ARM64 Apple Silicon chip called the M1. Several weeks ago, I started testing development on MacBook Air with the Apple M1 chip (pictured above). -
Django News - Get PyCharm, Support Django, Django 3.2 release is soon - Apr 2nd 2021
News Get PyCharm, Support Django Until April 29, you can purchase PyCharm at 30% off and the full purchase price will be donated to the Django Software Foundation. jetbrains.com Django 3.2 release and security releases for 3.1.8, 3.0.14, and 2.2.20 On April 6th, Django 3.2 is scheduled to be released along with new security releases for 3.1.8, 3.0.14, and 2.2.20. djangoproject.com PyCon US Schedule Posted! Head over to the PyCon website to see the lineup for Tutorials, Talks, Charlas, Summits and Sponsor Workshops. blogspot.com Events DjangoCongress JP 2021 運営ミーティング5月 - connpass connpass.com Sponsored Link Django Full-text Search with Postgres and Elasticsearch Learn how to leverage the native search capabilities offered by Postgres to add full text-search to Django. Use React, Docker, and Cypress to create a full-stack application with Test-driven Development. Swap out Postgres with Elasticsearch to provide comparable functionality. testdriven.io Articles The Python Handbook From FreeCodeCamp, a very detailed introduction to Python and its functions intended for newcomers. freecodecamp.org In Pursuit of PostgreSQL Performance by Ken Whitesell Or: How someone who doesn’t really know what they’re doing manages to improve the performance of lengthy queries. dev.to Shooting yourself in a foot with Django and recovering from it A great … -
Django User Profile - Learn to code in Django - Themesberg Blog
This article explains how to code a Django User Profile available for authenticated users outside of the admin module. The content might help beginners to learn new things about Django and code a real project with commercial value. For newcomers, Dja... -
Django modify_settings and receivers
Sometimes, tests expose weird behaviour. In this instance, I have a `Makefile` command that calls a `cookiecutter` command to create a new integration with a payroll system. We'd noticed that over time, this infrequntly used code had become slightly less than perfect. So, I wrote a test that runs this code. Not directly using the `make new-payroll-system` command, but rather using a test case from within Django. This worked great in development. I was able to have code that was generated, some tests on that code were run (including generating migrations for the new app), and then the code was removed. {% highlight python %} def test_cookie_cutter(self): from cookiecutter.main import cookiecutter try: cookiecutter( 'integrations/__template__', extra_context={'system_name': 'new_thing'}, output_dir='integrations/systems', no_input=True, ) with modify_settings(INSTALLED_APPS={'append': 'integrations.systems.new_thing'}): call_command('makemigrations', 'new_thing', no_input=True, verbosity=0) finally: shutil.rmtree('integrations/systems/new_thing') {% endhighlight %} But this failed in CI. Turns out that our Codeship-based testing infrastructure doesn't allow for writing the files in the expected location. Never mind, we can use `tempfile.TemporaryDirectory()` instead. That will handle the cleanup for us, which is better than removing files ourselves: {% highlight python %} def test_cookie_cutter(self): from cookiecutter.main import cookiecutter with tempfile.TemporaryDirectory() as dirname: # Put our new temporary directory on the PYTHONPATH. sys.path.insert(0, dirname) cookiecutter( … -
Django modify_settings and receivers
Sometimes, tests expose weird behaviour. In this instance, I have a `Makefile` command that calls a `cookiecutter` command to create a new integration with a payroll system. We'd noticed that over time, this infrequntly used code had become slightly less than perfect. So, I wrote a test that runs this code. Not directly using the `make new-payroll-system` command, but rather using a test case from within Django. This worked great in development. I was able to have code that was generated, some tests on that code were run (including generating migrations for the new app), and then the code was removed. {% highlight python %} def test_cookie_cutter(self): from cookiecutter.main import cookiecutter try: cookiecutter( 'integrations/__template__', extra_context={'system_name': 'new_thing'}, output_dir='integrations/systems', no_input=True, ) with modify_settings(INSTALLED_APPS={'append': 'integrations.systems.new_thing'}): call_command('makemigrations', 'new_thing', no_input=True, verbosity=0) finally: shutil.rmtree('integrations/systems/new_thing') {% endhighlight %} But this failed in CI. Turns out that our Codeship-based testing infrastructure doesn't allow for writing the files in the expected location. Never mind, we can use `tempfile.TemporaryDirectory()` instead. That will handle the cleanup for us, which is better than removing files ourselves: {% highlight python %} def test_cookie_cutter(self): from cookiecutter.main import cookiecutter with tempfile.TemporaryDirectory() as dirname: # Put our new temporary directory on the PYTHONPATH. sys.path.insert(0, dirname) cookiecutter( … -
PyCharm - Paul Everett & Aleksei Kniazev
PyCharmPyCharm Issue TrackerDjangoProject.comSupport the ShowThis podcast is a labor of love and does not have any ads or sponsors. To support the show, please consider recommending a book from LearnDjango.com, signing up for the free weekly Django News newsletter, or learning more about Button, a simpler deployment story for Django. -
Why use Django for complex WebApps?
Django - A great framework ? Django is a high-level Python web framework that enables the rapid development of secure and maintainable websites. Built by experienced developers, Django takes care of much of the hassle of web development, so you can f... -
Rapid Prototyping with Django, htmx, and Tailwind CSS
This tutorial looks at how to add htmx and Tailwind CSS to Django to reduce the amount of time it takes to create and style an interactive front-end. -
How to upload images in Django without 504 Gateway Timeout
Have you ever tried uploading images in Django and encountered 504 Gateway Timeout? Then this blog is for you. What we will implement in this tutorial is an image uploader in Django with crop option. The upload is done asynchronously using AJAX funct...