Category Archives: Uncategorized

Mystery brassica solved

While weeding the flower bed a couple of months ago my wife spotted some cabbage-like plants that we assumed had self-seeded following our rather poor efforts at growing green veg last year.

We quickly transferred them to pots and kept them under cover away from the cabbage whites and other bugs.

They survived. And after getting some decent netting – as much for keeping randy pigeons away from the onions – they went into the soil while we waited and hoped for what would undoubtedly be our best bit of veg growing to fully develop.

The plants continue to grow but after a closer look during today’s weeding session we have to declare that we have actually got broccoli and kale.

Although we have tried growing both of these in the past, it hasn’t been for a few years now and we had pretty much given up on the idea; we’re just not good enough at gardening to pull this off.

And even though I had said I wasn’t going to work on the garden this year, we have actually ended up putting in more effort than usual, but more targeted at keeping control of the weeds and it certainly seems to be paying dividends: the courgettes and potatoes are just about ready to start picking.


I just hope we can keep it all going for a vote more months.

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.

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.

Saying goodbye to Rails

I give up.

Everywhere I look suggests that what I have should be enough for this to work. But it isn’t.

And since this is a fundamental feature of the project, and what with the still patchy cross-browser performance of JQuery auto-select, it’s time to abandon Rails and look for another framework.

So, I will be taking a pause while I get Django up and running. Rails is no more.

3 sources, all slightly different, none work

Now on the case with http://apidock.com/rails/v4.2.1/ActionView/Helpers/FormHelper/fields_for (yes, I know, Rails 4, probably isn’t supported in 5) and mentions more possibilities that probably aren’t relevant, but don’t work anyway.

I mention it here because if (I’m not confident enough to say when) I get this working I will be needing to auto-populate some fields (am I mad!) and there might be value in the comments.

It’s another one of those times when it’s clear that I’m doing something wrong (other than actually attempting to do this) but I have no idea what and very little indication of where to start looking. For all the times that development can accelerate with Rails, there are these occasions when it grinds to a halt and you’re never actually sure how it got fixed.