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

« back to all changes in this revision

Viewing changes to ivle/database.py

  • Committer: William Grant
  • Date: 2009-03-31 05:07:32 UTC
  • mto: (1165.3.1 submissions)
  • mto: This revision was merged to the branch mainline in revision 1174.
  • Revision ID: grantw@unimelb.edu.au-20090331050732-f6whz1z87dpekp2b
Add display_name properties to users and groups.

Show diffs side-by-side

added added

removed removed

Lines of Context:
118
118
        return self.hash_password(password) == self.passhash
119
119
 
120
120
    @property
 
121
    def display_name(self):
 
122
        return self.fullname
 
123
 
 
124
    @property
121
125
    def password_expired(self):
122
126
        fieldval = self.pass_exp
123
127
        return fieldval is not None and datetime.datetime.now() > fieldval
448
452
        return "<%s %s in %r>" % (type(self).__name__, self.name,
449
453
                                  self.project_set.offering)
450
454
 
 
455
    @property
 
456
    def display_name(self):
 
457
        return '%s (%s)' % (self.nick, self.name)
 
458
 
451
459
    def get_projects(self, offering=None, active_only=True):
452
460
        '''Return Projects that the group can submit.
453
461