Ignore:
Timestamp:
27 Oct 2015, 08:03:37 (9 years ago)
Author:
Henrik Bettermann
Message:

Customize getBedCoordinates.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.aaue/trunk/src/waeup/aaue/students/utils.py

    r13348 r13353  
    197197        return 48
    198198
     199    def getBedCoordinates(self, bedticket):
     200        """Return descriptive bed coordinates.
     201        This method can be used to customize the `display_coordinates`
     202        property method in order to  display a
     203        customary description of the bed space.
     204        """
     205        bc = bedticket.bed_coordinates.split(',')
     206        if len(bc) == 4:
     207            return bc[0]
     208        return bedticket.bed_coordinates
     209
    199210    # AAUE prefix
    200211    STUDENT_ID_PREFIX = u'E'
Note: See TracChangeset for help on using the changeset viewer.