DEV Community

Jeff Triplett (he/him) for Django News

Posted on • Originally published at on

Issue 38 - New release of Black, Wagtail 2.10.1, articles, and adding flame graphs to django-debug-toolbar.


Announcement of Technical Board Election Registration

There is an upcoming Django Technical Board election. All current DSF Members are automatically registered for this election. If you are not a DSF Member but would like to vote in this election there is a form to fill out.

Black 20.8b1

Pre-release of the latest version of Black, the opinionated Python formatter.

Wagtail 2.10.1 release notes

Bugfix release for the lastest major Wagtail version.

GitHub Changelog: Set the default branch for newly-created repositories

GitHub now allows you to change your default branch name for newly-created repositories.

PSA: On October 1, 2020, GitHub is changing the default from master to main.


PyCon AU / DjangoCon AU 2020 - Sept. 4th – 6th, 2020

PyConline AU and DjangoCon AU are one week away!


Administer All the Things

The next in a series by Matt Layman, this in-depth tutorial focuses on the Django admin.

Python Tools for Managing Virtual Environments

A comprehensive look at the multiple ways to manage Python virtual environments.

Test Elasticsearch in Django Without Mocking

Use Django and pytest to test Elasticsearch without mocking.


Deploying a Production-ready Django app on AWS

A comprehensive guide to deploying a Django app from start to finish using AWS and EC2.

Sponsored Link

Learn beginner to advanced Django

Learn beginner to advanced Django from Daniel "pydanny" Feldroy, co-author of Two Scoops of Django in live, online, interactive classes where students are encouraged to ask questions. Use discount code "django-news" to get 10% off all courses.


Tech Tips: How to get the best from your remote presentation

Some tech tips on how to get the best from your remote presentation - practical examples about microphones, webcams, lighting, resolutions, and how to get the most from what you already have.

Database Performance Tips with Django

From JetBrains, how to squeeze out performance from your Django-powered database.


Running in Production - Skillwell

Skillwell is video platform with Django that helps you get stronger and be more flexible. It’s hosted on a single $5 / month DigitalOcean server and has been up and running since fall 2019.


GitHub logo celery / django-celery-beat

Celery Periodic Tasks backed by the Django ORM

Database-backed Periodic Tasks

Build status coverage BSD License django-celery-beat can be installed via wheel Supported Python versions. Support Python implementations.

Version: 2.0.0
Keywords: django, celery, beat, periodic task, cron, scheduling


This extension enables you to store the periodic task schedule in the database.

The periodic tasks can be managed from the Django Admin interface, where you can create, edit and delete periodic tasks and how often they should run.

Using the Extension

Usage and installation instructions for this extension are available from the Celery documentation.

Important Warning about Time Zones


If you change the Django TIME_ZONE setting your periodic task schedule will still be based on the old timezone.

To fix that you would have to reset the "last run time" for each periodic task:

>>> from django_celery_beat.models import PeriodicTask, PeriodicTasks
>>> PeriodicTask.objects.all().update(last_run_at=None)
>>> for task in PeriodicTask.objects.all():
>>>     PeriodicTasks.changed(task)

Note that this will reset the state as if the periodic tasks have never run before.


  • django_celery_beat.models.PeriodicTask


GitHub logo jpadilla / pyjwt

JSON Web Token implementation in Python


A Python implementation of RFC 7519. Original implementation was written by @progrium.


auth0-logo If you want to quickly add secure token-based authentication to Python projects, feel free to check Auth0's Python SDK and free plan at


Install with pip:

$ pip install PyJWT


>>> import jwt
>>> encoded = jwt.encode({'some': 'payload'}, 'secret', algorithm='HS256')
>>> print(encoded)

>>> jwt.decode(encoded, 'secret', algorithms=['HS256'])
{'some': 'payload'}

Command line


pyjwt [options] INPUT

Decoding examples:

pyjwt --key=secret decode TOKEN
pyjwt decode --no-verify TOKEN

See more options executing pyjwt --help.


View the full docs online at


You can run tests from the project root after cloning with:

$ tox

GitHub logo 23andMe / djdt-flamegraph

Flamegraphs for Django Debug Toolbar

DjDT Flame Graph

Get a flame graph of the current request, right in Django.




  • Add djdt_flamegraph to your requirements.txt.
  • Add djdt_flamegraph.FlamegraphPanel to DEBUG_TOOLBAR_PANELS.
  • Run your server with python runserver --nothreading --noreload


  • ValueError at /: signal only works in main thread: Flame graphs can only be generated in a single threaded server.
  • Flame graphs are disabled by default. You'll have to enable it by clicking the checkbox next to it in the Debug Toolbar.
  • Probably won't work on Windows.


This panel comes with an example Django app to test with. Just run make example and the server should start running.

GitHub logo jorenvanhee / tailwindcss-debug-screens

A Tailwind CSS component that shows the currently active screen (responsive breakpoint).

Tailwind CSS Debug Screens πŸ“±

A Tailwind CSS component that shows the currently active screen (responsive breakpoint).



Requires Tailwind v1.0 or higher.

  1. Install the plugin:
npm install tailwindcss-debug-screens --save-dev
  1. Add it to your tailwind.config.js file:
// tailwind.config.js
module.exports = {
  plugins: [


Add the class debug-screens to your <body> tag.

<body class="debug-screens">

Make sure the class is only present during development. Here's an example of how you could do that in Craft CMS:

<body class="{{ devMode ? 'debug-screens' : '' }}">


You can customize this plugin in the theme.debugScreens section of your tailwind.config.js file.

Ignore screens

To ignore a specific screen (for instance if you use dark mode), add the screen name to the ignore configuration array.

// tailwind.config.js

I have been using this Tailwind CSS component a lot lately. This component show which breakpoint you are using.

Shameless Plugs

All three books in the series--Django for Beginners, Django for APIs, and Django for Professionals--have been updated to Django 3.1.

Discussion (0)