20130719 (Friday, 19 July 2013)ΒΆ

Discovered an old bug: the csv view failed for tables which contained at least one DisplayField. The following snippet reproduced this bug:

>>> import os
>>> os.environ['DJANGO_SETTINGS_MODULE'] = 'lino_welfare.settings.test'
>>> from pprint import pprint
>>> from django.test import Client
>>> from lino.api.shell import *
>>> settings.SITE.startup()
>>> client = Client()
>>> # url = 'http://welfare-demo.lino-framework.org/api/newcomers/NewClients?fmt=csv'
>>> url = '/api/newcomers/NewClients?fmt=csv'
>>> res = client.get(url,REMOTE_USER='rolf')
>>> pprint(res.status_code)
200
>>> pprint(res.content[:24])
'name_column,client_state'

Wrote a new script lino.utils.xmlgen.sepa.validate which I used for developing a template for TIM to render a payment order as SEPA XML.