Skip to content

Django Andy

My travels through the world of Django, Python, DevOps, PHP and Full Stack web development.
  • Home
  • Contact

Django Andy

My travels through the world of Django, Python, DevOps, PHP and Full Stack web development.
  • Home
  • Contact

Adding margins in Bootstrap on mobile screens only

  • by djangoandy
  • 24 October, 202024 October, 2020

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

Submit Button

Changing button text on click – as well as reducing form double clicks

  • by djangoandy
  • 22 October, 202023 October, 2020

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

Securing your Django Admin by using a HoneyPot

  • by djangoandy
  • 18 October, 202019 October, 2020

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

Choose, and choose quickly: Optimising ModelChoiceField

  • by djangoandy
  • 16 October, 202016 October, 2020

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

Should I use UUIDs as my model ID in Django?

  • by djangoandy
  • 14 October, 202016 October, 2020

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?

The interview question that stumped 30% of Senior Software Engineers

  • by djangoandy
  • 10 October, 202016 October, 2020

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

Session Variables in Django

  • by djangoandy
  • 6 October, 20205 October, 2020

I’ve been coding in Django for nearly 2 years now and only recently have I needed to code a session variable. It is probably because sessions are mainly to do with login and that was handled by the django-allauth plugin… Read More »Session Variables in Django

Fixing Ubuntu error “entity too large” in nginx, Django

  • by djangoandy
  • 5 October, 202016 October, 2020

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

print(f”Hello World”)

  • by djangoandy
  • 5 October, 202016 October, 2020

“I must note that somewhere!” This blog is intended to be a collection of various tit bits that I discover on my travels within the Web Development World. My main interest is in Django which I use at work and… Read More »print(f”Hello World”)

Recent Posts

  • Adding margins in Bootstrap on mobile screens only
  • Changing button text on click – as well as reducing form double clicks
  • Securing your Django Admin by using a HoneyPot
  • Choose, and choose quickly: Optimising ModelChoiceField
  • Should I use UUIDs as my model ID in Django?

Tags

bootstrap css django django-filter django-rest-framework form HorseRecords interview javascript jquery know what you are doing nginx optimising python security security django-admin-honeypot snippets ubuntu user input uuid world of pain

Side Projects

HorseRecords

Recent Comments