Merge pull request #37 from gugu/master
Python 3 support for indexes posted in do_sortting_view. map in Python3 returns an instance of Map instead of a list.master
commit
724f073f38
|
|
@ -210,7 +210,7 @@ class SortableAdmin(SortableAdminBase, ModelAdmin):
|
|||
"""
|
||||
if request.is_ajax() and request.method == 'POST':
|
||||
try:
|
||||
indexes = map(str, request.POST.get('indexes', []).split(','))
|
||||
indexes = list(map(str, request.POST.get('indexes', []).split(',')))
|
||||
klass = ContentType.objects.get(id=model_type_id).model_class()
|
||||
objects_dict = dict([(str(obj.pk), obj) for obj in
|
||||
klass.objects.filter(pk__in=indexes)])
|
||||
|
|
|
|||
Loading…
Reference in New Issue