20130913 (Friday, 13 September 2013)¶
Printing mail labels for all partners of a list¶
The missing piece of yesterday’s the jigsaw puzzle (2013-09-12) was this: Repetition or conditional inclusion of table cells.
Voilà, any Lino application which uses
lino.modlib.contacts
has now an additional button “Labels”
in the top toolbar of every table on Partner, Person, Company
(and every subclass of them), and this button will immediately
produce a pdf with address labels.
Site-wide formatting of these labels can be configured by copying
/lino/config/Labels.odt to your local config
directory and adapt it to your needs.
Moved the
Addressable
mixin from lino.modlib.contacts
to a new module lino.mixins.addressable
.
Added a
get_address_html
method and an
address_html
.
property to
Updated docstring of lino.dd
Replaced Action.called_from by Action.is_callable_from¶
I noticed that Lino displayed tha button for the pdf action (wrongly) also in a detail form. This incited me to tiny up with that strange system using a static callable_from tuple. (TODO: document it)
More about DavLink¶
Gerd and Nicolas reported that DavLink failed in certain environments.
Added a
<param name="separate_jvm" value="true">
to the<applet>
tags generated bylino.extjs.ext_renderer
. This is to work around some problem in certain Java versions.
In a post Java 7 update 21 mixed code warning dialog with signed applet about “New security feature in 7u21 causes warnings on Java<–>JavaScript communication” I read that “Starting with Java 7u21 calling between all-permission Java applets and JavaScript is classed as mixed code and requires the signed jar to have the following manifest entry: Trusted-Library: true.
According to the docs this attribute should be used “for applications and applets that are designed to allow unsigned components”.
What is an “all-permission Java applet”? Maybe the root of the problems is that my applet asks too much? Maybe I should not set the PermissionManager myself because that is like telling users that they must instruct their browser to give me full access to their computer. In fact I need less than that, just permission to run a program from their machine (and permission to store some preferences).
What is a Manifest file? Why did I not need one until now? Answer: http://docs.oracle.com/javase/6/docs/technotes/guides/jweb/mixed_code.html#manifest describes “best practices for developers and deployers to protect their applications and applets from being maliciously re-purposed by replacing trusted components with untrusted ones.”
(Checkin and upgrade Online demo sites to newes development version.)
test_sdist¶
The idea behind the fab test_sdist
command is to run the following
steps before actually releasing to PyPI:
run setup.py sdist –dist-dir /home/luc/sdist
create a virgin virtualenv and activate it
run pip install –extra-index file:/home/luc/sdist mypackage
At this point we must be aware of the fact that neither the setup.py nor the tests directory is part of a source distribution. The tests suite often uses a many resources that are not included in a source distribution. So we cannot simply run setup.py test now.
One idea is a new convention: add a module mypackage.selftest which I can invoke using:
$ python -m mypackage.selftest
This would then test everything testable from within a source distribution. Just an idea for the moment. To be tried.