20110827

New flag lino.Lino.loading_from_dump

The flag used to define and see whether we are loading a serialized dump (generated by lino.utils.dpy.Serializer.serialize(), not a programmed fixture) (see 0727) is now lino.Lino.loading_from_dump. It is now set from within the dump itself:

settings.LINO.loading_from_dump = True

This has the advantage that application specific migration modules don’t need to worry about setting it. We are going to use this flag when loading back events of a remote calendar.

Verbose name of ForeignKey fields

If the verbose_name of a ForeignKey is not explicitly set by user code, Django sets it to field.name.replace('_', ' ') as for every field. Lino now replaces this default value by the verbose_name of the pointed model (field.rel.to._meta.verbose_name).

Advantage is that lino.mixins.ProjectRelated.project gets a correct label. The word “Project” as label would be incorrect or at least irritating for Lino/DSBE users.

Possible unwanted side effects if a model has more than one FK to the same model. But in that case, user code should simply specify an explicit verbose_name for those FK fields.

  • cal.Task.project and cal.Event.project
  • dsbe.Person.aid_type
  • dsbe.Study.person

Bug on sites with nonempty lino.Lino.root_url

Fixed: /grid_config and /detail_config didn’t work on nonempty lino.Lino.root_url.

Checkin series 20110827.

Continued on pp2lino

pp2lino importe maintenant les données suivantes:

  • TBEndroitMiseAuTravail –> JobProvider
  • CboTypeMiseEmplois –> ContractType
  • CboTypeContrat –> ContractType
  • TBMiseEmplois –> Contract, Job
  • TBTypeDeContratCPAS –> Contract, Job

Checkin series 20110827b.