Tag archive for "Django"

Django

This website was built with Django.

Friendship I recently had to restore some data from backups, and was using Django serializers to get the job done. Objects of one class were not deleted, but the relationships were set to None when the related objects were deleted. Here's how I restored the relationship information. more

Django models are usually created with a get_absolute_url method, but Wagtail pages don't have one. On this site I mix Wagtail pages with other Django models and needed an url without a domain in some places, below is the solution I'm using right now. Most methods to get a page … more

Wagtail has the modeladmin module in contrib which allows you to edit any Django model through the Wagtail admin interface. Unfortunately it's not very flexible, the code calls the get_edit_handler method on the admin class and the panels property of the model can only be a list. In one project … more

Tor Tor has many uses, especially for oppressed and persecuted people, people who have to fear for their safety when accessing information on the internet. The more people use Tor, the safer it gets. more

Dinosaur While checking my logs for this site and seeing the usual malicious requests against every spammers favorite software WordPress I decided to make things a little harder for them with a tarpit. more

Powerboat The title of this post is what I originally tried to do, but the solution to the problem was to do a small refactoring and to use the low level cache API. This post will explain how I modified my approach after thinking about the problem for a while. more

Wagtail has "scheduled" pages that are not yet visible on the site. I think the interface is not ideal as you need to click the Publish button after setting a publication date on the Settings tab. I'm not sure how exactly the data models work, but the actual publication is … more

Recently I started working on a Django project, loaded the prod database into it, and ran the tests. Then the data was gone. I know some people intentionally want to run tests on the "main database", and there is a very simple way to achieve this. Simply inherit from a … more

This is an update for my post about automated django deployments Edit 09-2020: I've expanded the script to fetch remote data and load it into the local Django dev instance. Make sure you never run this script anywhere except than a development environment. more

Battleship engine room This post describes a deployment and maintenance method for Django projects that was designed with scalability in mind. The goal is to push new releases into production at any moment with minimal or no downtime. Upgrades can be performed with unprivileged access to the production server, and rollbacks are possible. I use Gunicorn, Fabric and Supervisord in the examples. more

DjangoPythonBitcoinTuxDebianHTML5 badgeSaltStackUpset confused bugMoneyHackerUpset confused bugX.OrggitFirefoxWindowMakerBashIs it worth the time?i3 window managerWagtailContainerIrssiNginxSilenceUse a maskWorldInternet securityPianoFontGnuPGThunderbirdJenkinshome-assistant-logo