20131210 (Tuesday, 10 December 2013)

The online demos found yet another bug:

  • AttrDict instance has no key ‘PanelEvents’ (AttributeError at /restful/cal/PanelEvents)

How to make money with Lino

Thanks to Michael Hipp who discovered and helped me to fix a documentation bug. He wrote:

Lino says: “you may run your Lino application on an Internet server and sell subscriptions to users of your system. You don’t need to publish your source code in that case since you are not conveying your work.” http://www.lino-framework.org/about/license.html

ExtJS says: ““Conveyance” for a web application is triggered when a user outside the legal entity that created the application uses the application.” http://www.sencha.com/legal/open-source-faq/

These seem to be in conflict.

And I think that he is right. I modified /about/license to remove this conflict.

Continued on Renamed “Lino Faggio” to “Lino Voga”

  • Ran autopep8 over the code. Afterwards commit.
  • Added workflow_buttons to detail of courses.CourseDetail
  • Defined default workflow transitions for courses.CourseStates
  • clicking on the lookup button of a ForeignKey combobox was meant to open the insert window. didn’t work because all fields were disabled. Fixed. Lino.show_fk_detail must pass record_id: -99999.
  • New method courses.Enrolment.create_pupil_choice to add automatic learning.
  • New function parse_name to automatically uppercase the first letter of a person’s first and last name.
  • The “Refresh” button in the toolbar of a modified form didn’t behave as expected: it first saved current changes, then refreshed. That’s what the Save button is expected to do. The Refresh button now again asks whether to save the changes in current form.
  • New table cal.SubscriptionsByCalendar.

N.B.: When there are more than a certain number of columns, then the menu used to hide or show them has special scroll markers to indicate that not all items are visible. Hovering with the mouse over one of them starts scrolling. But sometimes not until the end. If you cannot find the column you want, then click on the scroll marker.

I had to write and test the following snippet before I found the above trick!

>>> import os
>>> os.environ['DJANGO_SETTINGS_MODULE'] = 'lino_faggio.settings.test'
>>> from lino.api.shell import *
>>> from __future__ import print_function
>>> ses = settings.SITE.login()
>>> ah = courses.EventsByCourse.get_handle()
>>> 'state' in ah.list_layout.hidden_elements
>>> 'state' in [col.name for col in ah.list_layout.main.columns]
>>> 'state' in [e.name for e in courses.EventsByCourse.wildcard_data_elems()]