Monthly Archives: April 2017

Limited time for Django?

Having decided that Rails development had run its course and that the future was all things Python and Django, it looks like I’ll be reining back on the web development front and sticking to simple stuff with Flask and uwsgi.

I started rewriting an application with Django following the standard tutorials and make some progress, even getting as far as a form that can subnit new records.

But, staying true to my original goal of ensuring that testing is a fundamental part of the project, I tried the simplest possible scenario,

from django.utils import timezone
from .models import Commission, Enquiry

# Create your tests here.
class CommissionMethodTests(TestCase):

    def basic_test(self):
        a = 1
        assert a == 1

Nothing could be simpler,

$ python manage.py test commissions
Creating test database for alias 'default'...
System check identified no issues (0 silenced).

----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK
Destroying test database for alias 'default'...

When something this simple doesn’t work and gives no error or any kind of output, there’s not a great deal of point trying to continue.

I did find another Django tutorial that suggested using ‘self.asert’, but that just give an error; I’m not a fan of failing at the first fence.

So, while I’m still like writing Python and will continue with Flask and keeping things simple, it’s time to abandon Django and look to see if WordPress plugins are up to the task.

BLAT

Taken from the back of the i newspaper in the UK which lists it as from ‘All day cafe’ by Stuart McKenzie (Murdoch books), but it appeals to me because I can easily make the aioli and pide and, if all goes well in the garden, will be able to source the lettuce and tomato.

The avocado is mashed with lemon juice and salt and pepper and spread on one half of toasted pide. Aioli  is spread on the other half, and in between is the cooked (in olive oil) bacon, lettuce and tomato.

IMG_20170415_124357685

A great lunch after a morning spent in the garden weeding.

Pide and BLAT

I have been cutting out the daily recipe from the i newspaper for some time now and recently there was one for a BLAT (bacon, lettuce, avocado and tomato) with pide bread and aioli.

Well, for me, making the bread is a no-brainer and I have made pide before. But since I have recently been making my own aioli, this seemed like too good an opportunity to miss.

IMG_20170415_091615695

Okay, so maybe they’re supposed to be round, but decided right at the end to make more, smaller breads and didn’t want to have to wait too long again to prove them.

The BLAT post to follow.