summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan S. Katz2014-04-30 12:13:37 +0000
committerJonathan S. Katz2014-04-30 12:13:37 +0000
commit98f79d39c297c84b49420c773e400249d321670e (patch)
tree0d6a06b216706a43ca977640e18f2ff5dd1d67bc
parent478bc1a4fe83b44b804e988e1285afd5f959db25 (diff)
Allow professional services to be searchable in the admin
Enables an admin to search over professional services, and additionally filter the services by whether or not they are approved.
-rw-r--r--pgweb/profserv/admin.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/pgweb/profserv/admin.py b/pgweb/profserv/admin.py
index 8cae2fbb..ef7405d8 100644
--- a/pgweb/profserv/admin.py
+++ b/pgweb/profserv/admin.py
@@ -1,4 +1,11 @@
-from util.admin import register_pgwebadmin
+from django.contrib import admin
+
+from util.admin import PgwebAdmin
from models import ProfessionalService
-register_pgwebadmin(ProfessionalService)
+class ProfessionalServiceAdmin(PgwebAdmin):
+ list_display = ('__unicode__', 'approved',)
+ list_filter = ('approved',)
+ search_fields = ('org__name',)
+
+admin.site.register(ProfessionalService, ProfessionalServiceAdmin)