Saturday, September 25, 2021

Lino Corsa

I started the Lino Corsa project, an application for managing races, i.e. sport events where people compete against each other in order to see who’s the best.

This was my first usage of the getlino startproject.

Go to your projects root directory:

$ cd ~/projects

Run getlino startproject:

$ getlino startproject -c corsa

Install the new Python package:

$ pip install -e corsa/
Obtaining file:///home/luc/work/corsa
Installing collected packages: lino-corsa
  Running develop for lino-corsa
Successfully installed lino-corsa-0.2.0

Add the project to your ~/.atelier/ file.

Decide whether you want to copy functionality from existing projects.

For example, we started Lino Corsa with a copy the courses plugin from Lino Voga:

$ cp -a ~/projects/voga/lino_voga/lib/courses lino_corsa/lib

And then manually edited the copied source code.

Edit the file of your new project.

In our example we add the following to our file:

from import CoursesUser
from import OfficeUser

class SiteUser(SiteUser, CoursesUser, OfficeUser):

class SiteStaff(SiteStaff, CoursesUser, OfficeUser):

class SiteAdmin(SiteAdmin, CoursesUser, OfficeUser):

Summary: we import the roles of the plugins, then tell Lino which user type inherits from which role.

Go to the demo project:

$ cd ~/projects/corsa/lino_corsa/projects/corsa1
$ pm prep

If you changed anything, you are likely to get error messages here.