benjaoming
101% objective - always
  • Blog
  • Projects
  • About
  • Blog RSS feed
  • Fediverse account (Mastodon)
  • Twitter account
  • GitHub account
  • A Venn diagram of Open Source governance

    July 1st, 2024 - Benjamin Balder Bach
    Read the rest of this entry »
    Tags: maintenance, open-source
  • Duplicate form submissions and how to handle them in Django

    January 21st, 2024 - Benjamin Balder Bach

    Let's have a look at duplicate form submissions, understand the problem and fix it with a nice server-side solution. It's a common problem that almost always needs to be addressed - whether you are building HTML-over-the wire or a backend/frontend architecture, you will have the same issues:

    User clicks the … Read the rest of this entry »
    Tags: django
  • Code globally, meet locally

    December 18th, 2023 - Benjamin Balder Bach

    I recently shared initial thoughts around Local conferences: Big potential! In this follow-up blog post, I want to share practical information on the specific format that we've been organizing Django Day Copenhagen around -- aaaand finish with some good old motivation 🥕️

    With a practical focus, I hope that the …

    Read the rest of this entry »
    Tags: django, community
  • A settings pattern for reusable Django apps

    December 10th, 2023 - Benjamin Balder Bach
    Read the rest of this entry »
    Tags: django
  • Local conferences: Big potential!

    October 3rd, 2023 - Benjamin Balder Bach
    Read the rest of this entry »
    Tags: django, community
  • Incoming blog posts!

    September 26th, 2023 - Benjamin Balder Bach
    Read the rest of this entry »
    Tags: personal-updates
  • Why I work for Learning Equality

    February 16th, 2018 - Benjamin Balder Bach

    Opinions and motivations of a tech-skeptical software developer @ an NGO working in education

    Building a future with equal access to learning opportunities (via technology!) is a long and winding road: We need to consider sustainable scenarios for our technology and face up to true challenges — not be tempted by hype or simple fixes.

    Anecdotes from when things were easier

    About a decade ago, when bandwidth was a sparsity …

    Read the rest of this entry »
  • Blogging in Django: Zinnia or Wagtail-Blog?

    March 21st, 2017 - Benjamin Balder Bach

    Simple answer: If you're already running Wagtail or planning to run it on your site, you'll probably benefit from an integrated blog like wagtail_blog. It may not be full of features in itself, but since Wagtail is, you can easily go where you want. I'm adding support for custom …

    Read the rest of this entry »
    Tags: django
    Posted in django |
  • Suspend using your own custom timing - unlike screen savers

    March 13th, 2017 - Benjamin Balder Bach

    I fail to use automatic standby because:

    1. I often switch off automatic power saving and screen savers and forget to switch them back on
    2. In many cases, it's disturbing unattended processes like downloading
    3. Often defaults to not being active while in docking station or charger

    So you might fall asleep in front of a movie. Or you might go out and forget your laptop.

    Basically, if I for instance don't …

    Read the rest of this entry »
  • Versioning your Python project for Debian

    July 27th, 2015 - Benjamin Balder Bach

    Version numbers matter! Using a consistent version numbering throughout your project's life matters, too. Changing project name is a high price to pay for cleaning up version errors.

    So there's some good news! The Python community's PEP-440 specifies how to use versions.

    Here are some examples of versions that abide …

    Read the rest of this entry »
    Posted in Debian, pip, pkg_resources, Python, Ubuntu, version numbers |
  • Debating Internet.org

    June 1st, 2015 - Benjamin Balder Bach

    [also brought on FAIR Denmark]

    Facebook has launched Internet.org, maybe a solution that will provide internet access to lots of people who need it? In this post, I'll explain what I think about it, because certainly it doesn't seem like a project we can just ignore.

    Others are also …

    Read the rest of this entry »
    Posted in Debate, ICT4D |
  • Regenerating Shotwell thumbnails

    December 23rd, 2014 - Benjamin Balder Bach

    When reinstalling, upgrading or moving settings, thumbnails may be missing in Shotwell. The problem can look like this:

    Each time you import photos, Shotwell will generate thumbnails in two different sizes. If you loose them, you have the problem that they are regenerated on-demand, everytime you scroll by an image. …

    Read the rest of this entry »
    Posted in Multimedia, shotwell, Ubuntu |
  • Nokia 301 on Wammu / Gammu

    September 8th, 2014 - Benjamin Balder Bach

    I had an older Nokia and got a new one which I needed to upload my phone book to. In order to connect to Nokia 301 from Gammu, plug the phone in with a USB cable and select the "Modem" option on the phone. The others won't work.

    Wammu is …

    Read the rest of this entry »
    Posted in Computers, Ubuntu |
  • Ubuntu 14.04 Trusty with DNS server and NetworkManager (disabling dnsmasq)

    June 16th, 2014 - Benjamin Balder Bach

    I've badly been looking for a way to both run an internal network server on eth0 and connecting to any kind of internet device, be it on wlan0 or a USB dongle.

    That way, I can be online and browsing documentation, downloading new stuff etc. on the server but not …

    Read the rest of this entry »
    Posted in dnsmasq, network-manager, Ubuntu |
  • Ubuntu, Kickstart, preseeding, and Wireless (WLAN)

    August 31st, 2013 - Benjamin Balder Bach

    I have been trying to get an automated network install running. The starting point is a Kickstart (Kickseed) setup that works fine on LAN. Problem is: Computers do not do PXE netbooting from WLAN, and secondly that the debian installer was not configuring the network correctly. But the steps are …

    Read the rest of this entry »
    Posted in Ubuntu |
  • Limiting choices in a ModelAdmin list_filter

    July 1st, 2013 - Benjamin Balder Bach

    So, you need to limit choices, because the list of related choices is too long? Then do NOT use limit_choices_to parameter on the ForeignKey! Why? Because you risk having options missing in your forms, deleting relations unknowingly.

    For instance, consider that you have the following case, expressed in pseudo code: …

    Read the rest of this entry »
    Posted in django, django-admin |
  • Testing and tracking down Warnings in Django

    March 5th, 2013 - Benjamin Balder Bach

    Warnings are often suppressed through many layers of control mechanisms in Python and Django. However, you should really be aware of these and clean them up once in a while!

    In other cases, the Warnings reflect an inconsistent state, such as if you are mixing naive and timezone-aware variables. It …

    Read the rest of this entry »
    Posted in django, Python |
  • Django: Log and block brute force attempts

    February 26th, 2013 - Benjamin Balder Bach

    Here is a very simple mechanism for wrapping a decorator around your views to protect them against brute force attempts. For instance, if you have a secret file download available only with the right secret (/view/id/secret-hash/), you expose your view to simple brute force attempts.

    Simply put, this decorator will …

    Read the rest of this entry »
    Posted in django |
  • Share an internet connection: A nice little script for quickly getting the task done.

    February 17th, 2013 - Benjamin Balder Bach

    This script uses iptable forwarding and dnsmasq to share an internet connection with full relay of remote DNS servers and a local DHCP server. Before trying the script, here is the over all steps:

    You connect to the internet in your normal fashion. For instance with a 3G dongle and …

    Read the rest of this entry »
    Posted in Computers, Ubuntu, Web |
  • To Save Everything, Click Here: The Folly of Technological Solutionism

    February 9th, 2013 - Benjamin Balder Bach

    There is a new book coming up with a very remarkable abstract, to be released on March 5, 2013:

    In the very near future, “smart” technologies and “big data” will allow us to make large-scale and sophisticated interventions in politics, culture, and everyday life. Technology will allow us to solve …

    Read the rest of this entry »
    Posted in Debate, Web |
  • First impressions of GTK3 migration in Python

    January 11th, 2013 - Benjamin Balder Bach

    Yesterday, I succeeded in moving a GTK2 project* with a custom Cairo widget to GTK3. It's about 750 lines of Python and took ~5 hours to migrate, mainly because my method was about googling and solving all Exceptions one by one. That's not very advisable.

    You can read a more …

    Read the rest of this entry »
    Posted in gtk, gtk3, pygobject, python, Python, Uncategorized |
  • django-wiki

    December 10th, 2012 - Benjamin Balder Bach
    Read the rest of this entry »
    Posted in Main menu |
  • Using gtk with threads? Write a decorator for gobject.idle_add

    December 8th, 2012 - Benjamin Balder Bach

    Hi there!

    If you've ventured just a little bit into GTK and threading, you have probably noticed how things can explode if you manipulate GTK objects directly from a thread. GTK is not threadsafe.

    However, this tip might help you get stuff done properly:

    1) Do your actual work in …

    Read the rest of this entry »
    Posted in pygtk, python, Python, Uncategorized |
  • Making the django foreign key admin widget more useful

    June 14th, 2012 - Benjamin Balder Bach

    Thanks to a user at Django-snippets, I was able to quickly create an app containing a widget for displaying icons along side the normal related widget for foreignkey fields.

    The result looks like this:

    It's pretty easy to use.

    Check it out on Github!

    Read the rest of this entry »
    Posted in django |
  • Large-scale Computer Reuse Suite (LCRS)

    May 2nd, 2012 - Benjamin Balder Bach
    For the benefit of people and the planet, let us start re-using, repairing and refurbishing computers instead of creating more e-waste!

    This software allows for a computer refurbishing organization (such as FAIR) to keep track computers being broad through a refurbishing system, including individual hardware profiles, hard drive wiping, and …

    Read the rest of this entry »
  • Ubuntu tip: Save a list of installed packages for reinstallation purposes

    April 8th, 2012 - Benjamin Balder Bach

    If you have a nicely running Ubuntu system with all your favourite packages installed, it might not seem like a good idea to start all over or to replace your hard drive. But here's a tip: To save a list of all packages that are currently installed! This should be …

    Read the rest of this entry »
    Posted in Ubuntu |
  • Overriding change_form.html and accessing the object instance

    April 3rd, 2012 - Benjamin Balder Bach

    Here's an example for a custom change_form.html located in app/templates/admin/appname/modelname/change_form.html - and the cool thing is that it accesses the actual instance of the object, which I found to be very convenient and undocumented. If you want it to be more explicit than access through the builtin context variable adminform.form.instance, …

    Read the rest of this entry »
    Posted in django |
  • To all my Thinkpad friends running Linux

    March 9th, 2012 - Benjamin Balder Bach

    Hello there!

    A little tip that can really improve your battery life and give you peace of mind while working: Install thinkfan: A simple fan control program.

    Installation

    Here is how it goes on Ubuntu: Step zero is to become superuser ( sudo bash ). Then you install the thinkfan …

    Read the rest of this entry »
    Posted in Computers, thinkfan, thinkpad, ubuntu, Ubuntu |
  • django-cms 2.0.2 and Django 1.2 - 1.3

    February 1st, 2012 - Benjamin Balder Bach

    If you are running an old version of django-cms, you can still upgrade Django. I would strongly suggest doing this since it's very uncomplicated. However, if you are running django-cms 2.0, you should first upgrade to 2.0.2 and run the South migrations, which is also totally uncomplicated.

    django-cms 1.x are …

    Read the rest of this entry »
    Posted in django, django-cms |
  • Stopforumspam Django Middleware

    September 18th, 2011 - Benjamin Balder Bach

    I have created a new Django app for keeping out spammers on the basis of data collected by stopforumspam.com. Read all about it here »

    It's free, open source, and I hope people will make it better on github.

    Read the rest of this entry »
    Posted in django, Ubuntu, Web |
  • ← Older