[snowy] Add __unicode__ function to UserProfile (#595850)
- From: Sanford Armstrong <sharm src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [snowy] Add __unicode__ function to UserProfile (#595850)
- Date: Tue, 29 Sep 2009 13:32:33 +0000 (UTC)
commit 104d3322ec72887e5f28abf89bdfb815752a73e5
Author: Shayne Macaulay <v0lksman69 gmail com>
Date: Tue Sep 29 06:30:55 2009 -0700
Add __unicode__ function to UserProfile (#595850)
Necessary for admin pages to list the data correctly.
accounts/models.py | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/accounts/models.py b/accounts/models.py
index 15338bf..259b105 100644
--- a/accounts/models.py
+++ b/accounts/models.py
@@ -34,6 +34,9 @@ class UserProfile(models.Model):
verbose_name=_(u'Application Language'),
null=True, blank=True)
+ def __unicode__(self):
+ return str(self.user)
+
def _create_profile(sender, instance, created, **kwargs):
"""
Create a UserProfile object in response to a new User being created.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]