Skip to content

Commit

Permalink
Added ability to select specific fields
Browse files Browse the repository at this point in the history
  • Loading branch information
Jairus Martin committed Mar 26, 2014
1 parent ee42ec6 commit 3a4a1f0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion xadmin/plugins/ajax.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ class AjaxListPlugin(BaseAjaxPlugin):

def get_result_list(self, response):
av = self.admin_view
base_fields = av.base_list_display
if '_fields' in self.request.GET:
base_fields = self.request.GET['_fields'].split(',')
else:
base_fields = av.base_list_display
headers = dict([(c.field_name, force_unicode(c.text)) for c in av.result_headers(
).cells if c.field_name in base_fields])

Expand Down

0 comments on commit 3a4a1f0

Please sign in to comment.