diff options
author | Étienne Loks <etienne.loks@proxience.com> | 2015-09-23 22:43:59 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@proxience.com> | 2015-09-23 22:44:31 +0200 |
commit | d23f19fe226ffe900c5f00c3deed65de2a5a47b1 (patch) | |
tree | 36ad98bde6c927e16ddbb88380fd4e3b80e197a8 /ishtar_common/views.py | |
parent | 4e937bb9391f719ba5073e183b5fa30db2237fd0 (diff) | |
download | Ishtar-d23f19fe226ffe900c5f00c3deed65de2a5a47b1.tar.bz2 Ishtar-d23f19fe226ffe900c5f00c3deed65de2a5a47b1.zip |
Add an action in admin for importing general types from CSV
Diffstat (limited to 'ishtar_common/views.py')
-rw-r--r-- | ishtar_common/views.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ishtar_common/views.py b/ishtar_common/views.py index 4f089d258..81f394bbb 100644 --- a/ishtar_common/views.py +++ b/ishtar_common/views.py @@ -147,7 +147,7 @@ def get_autocomplete_generic(model, extra={'available': True}): limit = 20 objects = model.objects.filter(query)[:limit] get_label = lambda x: x.full_label() if hasattr(x, 'full_label') \ - else unicode(x) + else unicode(x) data = json.dumps([{'id': obj.pk, 'value': get_label(obj)} for obj in objects]) return HttpResponse(data, mimetype='text/plain') |