When optimising your site for mobile, sometimes you need margins that only apply at certain screen sizes. For example I have this on the desktop size of my website HorseRecords: And on mobile it goes to this: There is no… Read More »Adding margins in Bootstrap on mobile screens only
Say you have a button that you want people to click to submit a form. Like this one: And you want to have the text change when they click the button and you are doing some form processing (like sending… Read More »Changing button text on click – as well as reducing form double clicks
Every Django Application has the magnificent Django Admin built in enabling you to access your database tables in a very nice way. The url is typically admin/ The problem is that hackers also know the default admin url for a… Read More »Securing your Django Admin by using a HoneyPot
Sometimes you have large data sets. Most of the time this makes Django slow. For example there are 17,000 suburbs in Australia – so having an address with a foreign key to suburb is going to create slowness in forms… Read More »Choose, and choose quickly: Optimising ModelChoiceField
Yes. Yes you should. There is almost no reason not to, and plenty of reasons why it’s the right choice. Background A universally unique identifier (UUID) is a 128-bit number used to identify information in computer systems. When generated according… Read More »Should I use UUIDs as my model ID in Django?
A few years ago, I had the opportunity to interview people for a Senior Software Engineer role. I was dead keen to do this as I take an interest in how to interview programmers. Amongst the questions I asked, there… Read More »The interview question that stumped 30% of Senior Software Engineers
I recently came across this bug while working through the alpha of HorseRecords. Image upload worked perfectly in development but in production it bailed out on all but very small images. The solution was to adjust the nginx config variable… Read More »Fixing Ubuntu error “entity too large” in nginx, Django