Commits

Colin Copeland  committed 30e8f12

add Profile to admin

  • Participants
  • Parent commits 95a185a

Comments (0)

Files changed (1)

File committees/admin.py

 from django.contrib import admin
 from django.core.urlresolvers import reverse
 
-from committees.models import Committee, CommitteeMember, CommitteeType
+from committees.models import Committee, CommitteeMember, CommitteeType, \
+                              Profile
 
 
 class CommitteeTypeAdmin(admin.ModelAdmin):
 
 class CommitteeMemberAdmin(admin.TabularInline):
     model = CommitteeMember
-    raw_id_fields = ('contact',)
+    raw_id_fields = ('profile',)
 
 
 class CommitteeAdmin(admin.ModelAdmin):
     )
     ordering = ('name',)
 admin.site.register(Committee, CommitteeAdmin)
+
+
+class ProfileAdmin(admin.ModelAdmin):
+    list_display = ('id', 'first_name', 'last_name', 'email')
+    prepopulated_fields = {'slug': ('first_name', 'last_name')}
+
+admin.site.register(Profile, ProfileAdmin)