Red Onion and Thyme Tart

Mild, sweet red onions grow well in my garden, but they never seem to keep for very long.  They make delicious tarts