Browse files

Merge pull request #262 from jsocol/admin-clarity

Clarify where data in UserProfileAdmin comes from.
  • Loading branch information...
2 parents c957841 + 079696b commit 42117ee8af9f915c7d50672e709e3f7a3880c29c @readevalprint readevalprint committed Jun 14, 2012
Showing with 6 additions and 6 deletions.
  1. +4 −4 apps/users/admin.py
  2. +2 −2 apps/users/models.py
View
8 apps/users/admin.py
@@ -6,12 +6,12 @@
class UserProfileAdmin(AdminImageMixin, admin.ModelAdmin):
- fields = ['user', 'user__email', 'display_name', 'photo', 'ircname',
+ fields = ['user', 'user_email', 'display_name', 'photo', 'ircname',
'is_vouched', 'vouched_by', 'bio', 'website', 'groups', 'skills']
- list_display = ['display_name', 'user__email', 'user__username', 'ircname',
+ list_display = ['display_name', 'user_email', 'user_username', 'ircname',
'is_vouched', 'vouched_by']
- list_display_links = ['display_name', 'user__email', 'user__username']
- readonly_fields = ['user', 'user__email']
+ list_display_links = ['display_name', 'user_email', 'user_username']
+ readonly_fields = ['user', 'user_email']
save_on_top = True
search_fields = ['display_name', 'user__email', 'user__username',
'ircname']
View
4 apps/users/models.py
@@ -75,10 +75,10 @@ def __unicode__(self):
def get_absolute_url(self):
return reverse('profile', args=[self.user.username])
- def user__email(self):
+ def user_email(self):
return self.user.email
- def user__username(self):
+ def user_username(self):
return self.user.username
def anonymize(self):

0 comments on commit 42117ee

Please sign in to comment.