DEV Community

Jeff Triplett (he/him) for Django News

Posted on • Originally published at django-news.com on

Issue 39 - Django Security Release, Django Day in Denmark, bonus documentation sites, and more

News

Django security releases issued: 3.1.1, 3.0.10 and 2.2.16

Time to update your Django version!


Events

Django Day 2020 - Sept 25th

Djangonauts from in and around Denmark are meeting up for the second edition of Django Day, to be held on September 25th 2020. It will be a full day of talks, either to be experienced online -or- at our venue with safe social distancing.


Articles

Django ORM if you already know SQL

An illustrated guide to Django's ORM by drawing analogies to equivalent SQL statements.


OneToOne Relationship

Linking your user model to your custom profile model in Django.


Bonus Django Documentation Sites

Links and brief descriptions of Classy Class-Based View/Forms/REST Framework which are vital additional documentation resources.


Demystifying Django’s Magic

Precious Ndubueze breaks down a default Django project one generated file and folder at a time.


Linux Commands for Developers

A good introduction to basic Linux commands for developers. This is a nice refresher for developers of any skill level.


Podcasts

Running in Production - DataWellness

DataWellness is a Django service that helps organizations stay safe and compliant, hosted on a single DigitalOcean server and up since 2016.


Test & Code - Adam Johnson & pytest-randomly

Adam Johnson discusses pytest-randomly and pytest-reverse.


Projects

GitHub logo rcrowther / django-streamfield-w

A StreamField for Django. Ported from Wagtail, with new DjangoAdmin-like API.

StreamField

A Streamfield for Django. Saves data as JSON to the referenced field. The admin display is designed to operate unobtrusively and be styled as the stock Django Admin.

The distribution is called 'django-streamfield-w', but internally the module is called 'streamfield'.

Pros

  • It's a StreamField
  • Written data should be Wagtail-compatible (mostly, no guarantee)

Cons

  • No file or image handling (unless you implement from another app)
  • Small but scenery-chewing admin

And an admission: anything that works here has needed code reduction, code expansion, and/or hacks. There are still many possibilities for work within the programmer API. So this codebase will not be solid anytime soon, and lacks tests on code, app, and distribution. Best I can say is that I have outlined the functionality.

Examples

Want to give a user the ability to add blocks of text, interspaced with blockquotes, URL links and dates? Declare this field,

body = StreamField(
    block_types

GitHub logo makinacorpus / django-safedelete

Mask your objects instead of deleting them from your database.

Django safedelete

https://coveralls.io/repos/makinacorpus/django-safedelete/badge.png

What is it ?

For various reasons, you may want to avoid deleting objects from your database.

This Django application provides an abstract model, that allows you to transparently retrieve or delete your objects without having them deleted from your database.

You can choose what happens when you delete an object :
  • it can be masked from your database (soft delete, the default behavior)
  • it can be masked from your database and mask any dependent models. (cascading soft delete)
  • it can be normally deleted (hard delete)
  • it can be hard-deleted, but if its deletion would delete other objects, it will only be masked
  • it can be never deleted or masked from your database (no delete, use with caution)

Example

# imports
from safedelete.models import SafeDeleteModel
from safedelete.models import HARD_DELETE_NOCASCADE
# Models

# We create a new model, with the given policy : Objects will
Enter fullscreen mode Exit fullscreen mode

GitHub logo lowercase-app / django-taxtea

TaxTea 🐸 ☕️ - Django app that calculates tax rates for SaaS products

TaxTea

Django app that calculates tax rates for SaaS products 🐸 🍵
A little package that goes a long way. Built by Matt Strayer and contributors

Table of Contents

Purpose

Taxes are hard, but that shouldn't stop you from building your dreams. When building lowercase, we found out just how hard calculating the right sales tax rate is. TaxTea does the heavy lifting, and tells you exactly what sales tax, if any, you need to charge your customers. So, sit back, sip some tea, and channel your inner Kermit because tax rates are none of your business...anymore!

Currently only supporting US 🇺🇸

Features

  • Simple API: Get up & running in minutes.
  • Tax Nexuses, Origin, & Destination Support: The three factors in calculating tax rates. TaxTea handles them all expertly.
  • Up-to-date: No…

Top comments (0)