Welcome | Get started | Dive | Contribute | Topics | Reference | Changes | More

ivo : A Lino Voga in Estonia

The lino_book.projects.ivo demo project uses Lino Voga for managing a dance school. The dance school organizes group trainings and individual trainings. Teachers are either engaged employees or freelancers paid per hour by the participants. Scheduling individual lessons is a very dynamic process where the participants decide individually whether the can come to a suggested appointment, often very short-term.

Lines starting with >>> in this document are code snippets that get tested as part of our development workflow.

>>> from lino import startup
>>> startup('lino_book.projects.ivo.settings')
>>> from lino.api.doctest import *
>>> dd.demo_date()
datetime.date(2020, 5, 22)
>>> mary = users.User.objects.get(username="mary")
>>> print(mary.user_type)
400 (Pupil)
>>> print(courses.Pupil.objects.get(id=mary.partner.id))
Mary Morgan (N)
>>> course = rt.models.courses.Course.objects.get(id=11)
>>> print(course)
011C FG (Functional gymnastics)
>>> event = course.get_existing_auto_events().first()
>>> print(list(course.suggest_cal_guests(event)))
[Guest(event=574,partner=153,role=1,state=<cal.GuestStates.invited:10>), Guest(event=574,partner=155,role=1,state=<cal.GuestStates.invited:10>)]
>>> rt.models.cal.Event.get_default_table()