Django 2 and Python 3

I just saw this tweet which I actually found a little discouraging. As of March 2017, only 12% of PyPI downloads were initiated by Python3. As an avid user of Python3 this anti-Python3 attitude continues to baffle me. Hell, even Flask now recommends using Python3. It's been quite a while…

Django's getting old

I've been playing around with Django for years. Back when I was a PHP developer that was learning Python it was great. It works the way you expect an MVC framework to work so if you're coming from another language with similar frameworks it's great. For the past year though…

Wagtail

So there I was, moaning about the current state of CSMs when I attended the Django mini-conf before PyConAu an saw Adam Brenecki's presentation: Comparing Wagtail, Django CMS and Mezzanine. For whatever reason Wagtail really appealed to me. It had a really nice interface and seemed to do a good…

Podcast Feeds in Django

I've been talking to Terry Johal about getting our podcast up and running again. Naturally my action plan was to rebuild the website. It was original built in CakePHP but has a few little bugs I've never got around to fixing so I thought I'd just rebuild it in Django.…

Testing File uploads in Flask

I was recently writing Flask integration tests for a form that had a file upload parameter. As it turns out, is isn't as straight forward as I had thought it would be. A basic file upload test might look like this: def test_logo(self): data = dict(logo=(io.BytesIO(…

Flask-WTF tricks

I use Flask-WTF's What the Form module for most of my Flask projects as it takes care of things like csrf tokens and so on which is a nice piece of mind. I have recently come across a couple of really powerful features that have been hiding from me in…