Room booking: Customize room format


Currently (2.1) the roombooking uses a rather fixed format to generate the room name:

    def full_name(self):
        if self.has_special_name:
            return u'{} - {}'.format(self.generate_name(),
            return u'{}'.format(self.generate_name())
    def generate_name(self):
        return u'{}-{}-{}'.format(

Is either changing this format (here the rooms are named quite differently) or at least adding a display_name that is or self.generate_name() and using this in indico a way that would still be compatible with the upcoming new roombooking?

Typical room names here (there are different nomenclatures):
UBA 0333 -> Building UBA , Floor 03 , room 33
GRS E40 -> Building GRS, Floor 1(named E here) , room 40
CHE 23456 -> Building CHE, part 2, floor 3 , room 456

The current result looks like:
GRS-1-40-GRS E40 which is repetitive and not very nice.


how about:

 rb.full_name_format_special = '{self.generated_name} - {} '
 rb.full_name_format = '{self.generated_name}'
 rb.generated_name_format = '{self.building} - {self.floor} - {self.number}'

room model:

def full_name(self):
      if self.has_special_name:
        return config.full_name_format_special'.format(self=self)
        return config.full_name_format.format(self=self)

def generated_name(self):
    return config.generated_name_format.format(self=self)

This would allow the definition of arbitrary formatting per configuration. The main question is if the change of generate_name to a property is ok?

Should I file a pull request?


For now I wouldn’t since we are changing many room booking things in 2.2 anyway.



a few quick follow-up question to the room boooking (in 2.2).

  • When is 2.2 planned to be released?
  • What would be the easiest way to import rooms of an external system into indico?



We plan to have a prerelease version to use here at CERN this year for sure (which you could of course try out as well); my guess is that the “final” 2.2 will arrive early next year

There’s not builtin functionality for importing rooms from outside, but it’d be pretty easy to do using indico shell (and if you want sync instead of an one-time import, you could have a look at the code we use to do exactly that at CERN - note: this will change a bit in 2.2 as well)