For me it takes more than a week to solve it alone... So to the point, is it possible to merge two querysets and sort it as well? Recently I've used itertools, but it returns a table with duplicated value and requested objects not properly displayed (the get_full_name displayed separately with other, creating a new row)
here's the codes views.py def view_siswa(request): # list_detail.object_list, {"queryset": Data_Siswa.objects.all(), "template_name": "views/view-siswa-list.html"} namasiswa = User.objects.all().exclude(is_staff='false') datasiswa = Data_Siswa.objects.all().order_by('kode_nis') query = chain(datasiswa, namasiswa) variables = RequestContext(request, {'siswa':query,}) # variables = RequestContext(request, {'siswa':datasiswa,}) return render_to_response( 'views/view-siswa-list.html', # { 'siswa':namasiswa, 'datasiswa': datasiswa, } variables, ) template {% for object in siswa %} <tr> <td scope="row"class="spec">{{ object.username }}</td> <td scope="row">{{ object.kode_nis }}</td> <td scope="row">{{ object.first_name }}</td> <td scope="row">{{ object.kode_jurusan }}</td> <td scope="row" width="20px"><a href="/jurnal/siswa/ {{ object.id }}/">Lihat</a></td> <td scope="row" width="20px">Edit</td> </tr> {% endfor %} Muchly appreciated any help... btw I'm new in Django Regards Rian -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.