Lessons about Django (page 16)
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
Request.POST["key"]returns only the last value of a list, if you want a list of values for a key, use the following:values = request.POST.getlist('key')Shared by
- Django
Tech Insights
When using django orm get() method, if there are no results that match the query, get() will raise a DoesNotExist exception.
Shared by
- Django


Tech Insights· docs.djangoproject.com
Django 1.11 Subquery expressions: #subquery-expressions
Shared by
Read on docs.djangoproject.com- DB
- Django
- SQL

hackernoon.com
5 ways to make Django Admin safer
For a better reading experience, check out this article on my website.
Lais Varejão

Tech Insights· hackernoon.com
5 ways to make Django Admin safer
From hackernoon.com
For a better reading experience, check out this article on my website.
Shared by
Read on hackernoon.com- Django

docs.djangoproject.com
In Django,
in_bulkqueryset method allows bulk fetching via primary key: #in-bulkFlávio Juvenal

Tech Insights· docs.djangoproject.com
In Django,
in_bulkqueryset method allows bulk fetching via primary key: #in-bulkShared by
Read on docs.djangoproject.com- Database
- Django




Tech Insights· docs.djangoproject.com
The get_search_results method modifies the list of objects displayed in the admin and you can override to show what you want: #django.contrib.admin.ModelAdmin.get_search_results
Shared by
Read on docs.djangoproject.com- Django

hackernoon.com
Advantages and Disadvantages of Django:
The Fastest Solution For Developing; Django-Advantages & Disadvantages
Lais Varejão

Tech Insights· hackernoon.com
Advantages and Disadvantages of Django:
From hackernoon.com
The Fastest Solution For Developing; Django-Advantages & Disadvantages
Shared by
Read on hackernoon.com- Django
- Python
Tech Insights
How to use the template tag
pluralize: for words that don’t pluralize by simple suffix, you can specify both a singular and plural suffix, separated by a comma. Ex:{{ quantity|pluralize:"y,ies" }}Shared by
- Django
- Template

revsys.com
Use priority workers to run celery tasks
Using Celery and Redis for Python asynchronous workers. Part of our 12 Days of Performance Series.
Carlos Coelho

Tech Insights· revsys.com
Use priority workers to run celery tasks
From revsys.com
Using Celery and Redis for Python asynchronous workers. Part of our 12 Days of Performance Series.
Shared by
Read on revsys.com- Celery
- Django
- Python

hynek.me
Easily make Django connect to Postgres using SSL
I’d thought something like this is a FAQ but the database docs on postgres don’t write a bit about forcing Django to connect using SSL to the database server.
Carlos Coelho

Tech Insights· hynek.me
Easily make Django connect to Postgres using SSL
From hynek.me
I’d thought something like this is a FAQ but the database docs on postgres don’t write a bit about forcing Django to connect using SSL to the database server.
Shared by
Read on hynek.me- Django
- PostgreSQL
- Ssl

blog.lotech.org
Add Postgres full-text searching to your Django application
Django has added support for Postgres's built-in full-text searching as of version 1.10. This is a great alternative to a heavier search system such as elasticsearch or SOLR, when we want decent search capabilities without having to setup and maintain another service. Postgres's full-text search is Good Enough for …
Carlos Coelho

Tech Insights· blog.lotech.org
Add Postgres full-text searching to your Django application
From blog.lotech.org
Django has added support for Postgres's built-in full-text searching as of version 1.10. This is a great alternative to a heavier search system such as elasticsearch or SOLR, when we want decent search capabilities without having to setup and maintain another service. Postgres's full-text search is Good Enough for …
Shared by
Read on blog.lotech.org- Django
- PostgreSQL


Tech Insights· docs.djangoproject.com
Use
django.contrib.syndication.viewsfor generating RSS feeds:Shared by
Read on docs.djangoproject.com- Django
Today I learned
In Celery configuration use:
app.autodiscover_tasks(lambda: [n.name for n in apps.get_app_configs()]) instead of: app.autodiscover_tasks(lambda: settings.INSTALLED_APPS) autodiscover_tasks() will not understand if you declare in INSTALLED_APPS some app through django AppConfig. (Ex: INSTALLED_APPS += ['users.apps.UsersConfig', ])
Victor Carriço
Tech Insights
In Celery configuration use:
app.autodiscover_tasks(lambda: [n.name for n in apps.get_app_configs()])instead of:
app.autodiscover_tasks(lambda: settings.INSTALLED_APPS)autodiscover_tasks()will not understand if you declare inINSTALLED_APPSsome app through djangoAppConfig. (Ex:INSTALLED_APPS += ['users.apps.UsersConfig', ])Shared by
- Celery
- Django
Today I learned
In a
admin.ModelAdmin, a field can either be inprepopulated_fieldsorreadonly_fields, but not in both.Lais Varejão
Tech Insights
In a
admin.ModelAdmin, a field can either be inprepopulated_fieldsorreadonly_fields, but not in both.Shared by
- Admin
- Django
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



