I have one problem in building a list of id using django. if i choose more than 1 id it ok but if i choose only one it will produce extra \',\' in list.
test
Yo say you want a list but de facto you are creating a tuple.
To get a list of ids take a look at values_list
>>> Entry.objects.values_list('id', flat=True).order_by('id') [1, 2, 3, ...] >>> Entry.objects.filter(id=1).values_list('id', flat=True) [1]