Lessons about Django (page 4)
The links, tools and tips our engineers and designers share with each other, one “today I learned” at a time.
- lessons shared
- 288
- people sharing
- 29
- database started in
- 2016








Tech Insights· stackoverflow.com
Django: How can I see a list of urlpatterns?
Shared by
Read on stackoverflow.com- Debug
- Django
- Urls
Today I learned
As of django , test the callback functions passed to () with
()As of django, test the callback functions passed to () with ()
Mariane Pastor
Tech Insights
As of django , test the callback functions passed to () with
()As of django, test the callback functions passed to () with
()Shared by
- Django

docs.djangoproject.com
Test the callback functions passed to transaction on_commit with
captureOnCommitCallbacksMariane Pastor

Tech Insights· docs.djangoproject.com
Test the callback functions passed to transaction on_commit with
captureOnCommitCallbacksShared by
Read on docs.djangoproject.com- Django

b-list.org
Against service layers in Django:
*This post now has [a followup](/weblog/2020/mar/23/still-no-service/).* Recently I've seen posts and questions pop up in a few places about [a …
Rebeca Sarai

Tech Insights· b-list.org
Against service layers in Django:
From b-list.org
*This post now has [a followup](/weblog/2020/mar/23/still-no-service/).* Recently I've seen posts and questions pop up in a few places about [a …
Shared by
Read on b-list.org- Django

forum.djangoproject.com
Structuring large/complex Django projects, and using a services layer in Django projects:
Hi all, This is a long post so I’ve copied my two questions for a TL;DR. I’ve also bolded the questions within my post so you can grasp for any context if you think that it’d help your answers. is there any publicly available (paid is ok) literature or training available that covers how to best structure a large, ongoing, mature Django project? Does anyone have any experience writing complex Django applications with a services layer as discussed in the linked style guide? How has it gone ...
Rebeca Sarai

Tech Insights· forum.djangoproject.com
Structuring large/complex Django projects, and using a services layer in Django projects:
From forum.djangoproject.com
Hi all, This is a long post so I’ve copied my two questions for a TL;DR. I’ve also bolded the questions within my post so you can grasp for any context if you think that it’d help your answers. is there any publicly available (paid is ok) literature or training available that covers how to best structure a large, ongoing, mature Django project? Does anyone have any experience writing complex Django applications with a services layer as discussed in the linked style guide? How has it gone ...
Shared by
Read on forum.djangoproject.com- Django

forum.djangoproject.com
Where to put business logic in Django? Discussion:
I’m curious if there’s any consensus here. Obvious answers are: Models/Managers - make them FAT is often cited as the default but can have performance issues and in large projects become unwieldy to reason about Views - obvious place to put them but can also grow too large and not performant, plus do you really want all the calculations done on the fly? Templates - not advised to put much logic in here, bad for performance, hard to reason about Separate Python file…this is what I see larger si...
Flavio Juvenal

Tech Insights· forum.djangoproject.com
Where to put business logic in Django? Discussion:
From forum.djangoproject.com
I’m curious if there’s any consensus here. Obvious answers are: Models/Managers - make them FAT is often cited as the default but can have performance issues and in large projects become unwieldy to reason about Views - obvious place to put them but can also grow too large and not performant, plus do you really want all the calculations done on the fly? Templates - not advised to put much logic in here, bad for performance, hard to reason about Separate Python file…this is what I see larger si...
Shared by
Read on forum.djangoproject.com- Codearchitecture
- Django
Tech Insights· stackoverflow.com
How to specify a custom 404 view for Django using Class Based Views?
Shared by
Read on stackoverflow.com- Django
stackoverflow.com
Render HTML from a string to browser straight from Python (useful for debugging broken template/view tests!)
Flavio Juvenal
Tech Insights· stackoverflow.com
Render HTML from a string to browser straight from Python (useful for debugging broken template/view tests!)
Shared by
Read on stackoverflow.com- Debug
- Django
- Python
- Test


Tech Insights· docs.djangoproject.com
Django settings should be uppercase, otherwise it won't work
Shared by
Read on docs.djangoproject.com- Django
Today I learned
How to get quantity of tasks in Celery and Redis from the default queue.
import redis from django.conf import settings queue_name = "celery" client = redis.Redis.from_url(settings.REDIS_URL) length = client.llen(queue_name)
João Lins
Tech Insights
How to get quantity of tasks in Celery and Redis from the default queue.
import redis from django.conf import settings queue_name = "celery" client = redis.Redis.from_url(settings.REDIS_URL) length = client.llen(queue_name)Shared by
- Celery
- Django
- Redis


Tech Insights· github.com
django-add-default-value: This django Migration Operation can be used to transfer a Fields default value to the database scheme.
Shared by
Read on github.com- DB
- Django
- Migration

dev.to
Image Uploads in Wagtail Forms:
For developers using the Wagtail CMS who want to add image upload fields. Heads up - This is an...
Flavio Juvenal

Tech Insights· dev.to
Image Uploads in Wagtail Forms:
From dev.to
For developers using the Wagtail CMS who want to add image upload fields. Heads up - This is an...
Shared by
Read on dev.to- Django
- Wagtail

github.com
Django extension to allow working with 'clusters' of models as a single unit, independently of the database:
Django extension to allow working with 'clusters' of models as a single unit, independently of the database - wagtail/django-modelcluster
Flavio Juvenal

Tech Insights· github.com
Django extension to allow working with 'clusters' of models as a single unit, independently of the database:
From github.com
Django extension to allow working with 'clusters' of models as a single unit, independently of the database - wagtail/django-modelcluster
Shared by
Read on github.com- DB
- Django
- Model

github.com
Django - Deprecate Field:
This package allows deprecating model fields and allows removing them in a backwards compatible manner. - 3YOURMIND/django-deprecate-fields
Rebeca Sarai

Tech Insights· github.com
Django - Deprecate Field:
From github.com
This package allows deprecating model fields and allows removing them in a backwards compatible manner. - 3YOURMIND/django-deprecate-fields
Shared by
Read on github.com- Django


Tech Insights· hacksoft.io
Django filter - filter(A).filter(B) vs filter(A, B)
Shared by
Read on hacksoft.io- Django
- Python
- SQL
Book a call
Found it useful?
Let’s put it to work.
Tell us about your product and the problem in front of you. We’ll bring what we’ve learned on real projects.
Tell us about your product, and we’ll bring what we’ve learned.
Still prefer the good old email? Contact us



