~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/database.py

  • Committer: Matt Giuca
  • Date: 2009-05-12 13:50:49 UTC
  • mto: This revision was merged to the branch mainline in revision 1247.
  • Revision ID: matt.giuca@gmail.com-20090512135049-mlg7kqdpcqmdgphe
ivle.database: User/ProjectGroup: Added 'short_name' methods so we have a
        general interface for displaying the short name.
    ProjectGroup: Changed display_name from showing the name (short name) to
        the nick (friendly name).
    Added docstrings.

Show diffs side-by-side

added added

removed removed

Lines of Context:
117
117
 
118
118
    @property
119
119
    def display_name(self):
 
120
        """Returns the "nice name" of the user or group."""
120
121
        return self.fullname
121
122
 
122
123
    @property
 
124
    def short_name(self):
 
125
        """Returns the database "identifier" name of the user or group."""
 
126
        return self.login
 
127
 
 
128
    @property
123
129
    def password_expired(self):
124
130
        fieldval = self.pass_exp
125
131
        return fieldval is not None and datetime.datetime.now() > fieldval
559
565
 
560
566
    @property
561
567
    def display_name(self):
 
568
        """Returns the "nice name" of the user or group."""
 
569
        return self.nick
 
570
 
 
571
    @property
 
572
    def short_name(self):
 
573
        """Returns the database "identifier" name of the user or group."""
562
574
        return self.name
563
575
 
564
576
    def get_projects(self, offering=None, active_only=True):