Commits

Cole Krumbholz  committed 48cc634

added date_joined to registration_profile admin

  • Participants
  • Parent commits df26f5d

Comments (0)

Files changed (1)

File registration/admin.py

 
 class RegistrationAdmin(admin.ModelAdmin):
     actions = ['activate_users', 'resend_activation_email']
-    list_display = ('user', 'activation_key_expired')
+    list_display = ('user', 'date_joined', 'activation_key_expired')
     raw_id_fields = ['user']
     search_fields = ('user__username', 'user__first_name', 'user__last_name')
+    
+    def date_joined(self, profile):
+        return profile.user.date_joined
+    date_joined.admin_order_field = 'user__date_joined'
 
     def activate_users(self, request, queryset):
         """