django-planet

Blog: Adam Johnson

web https://adamj.eu/
Author Adam Johnson

How to Run a Django Migration “By Hand”

June 28, 2022 » Adam Johnson » [Archived Version]

Normally your Django project’s deploy process runs the migrate command, and that takes care of updating your database as necessary. Especially on smaller databases, Django’s migration system can “just do it” for you. But sometimes it can be necessary to run migrations “by hand” in your database’s …

Read More

How to Patch Requests to Have a Default Timeout

June 22, 2022 » Adam Johnson » [Archived Version]

Python’s requests package is very popular. Even if you don’t use it directly, it’s highly likely one of your dependencies does. One wrinkle in requests’ design is that it has no default timeout. This means that requests can hang forever if the remote server doesn’t respond …

Read More

How to Patch Requests to Have a Default Timeout

June 22, 2022 » Adam Johnson » [Archived Version]

Python’s requests package is very popular. Even if you don’t use it directly, it’s highly likely one of your dependencies does. One wrinkle in requests’ design is that it has no default timeout. This means that requests can hang forever if the remote server doesn’t respond …

Read More