views:

41

answers:

0

i get this string:

{'id': 1, 'weight': 101, 'attrs': {'date_added': 1265274382, 'group_id': 1}}{'id': 2, 'weight': 100, 'attrs': {'date_added': 1265274382, 'group_id': 1}}{'id': 4, 'weight': 100, 'attrs': {'date_added': 1265274382, 'group_id': 2}}

i want to get the real data(title and content): alt text

and my view is :

from djangosphinx.models import SphinxSearch,SphinxQuerySet
def xx(request):
    queryset =Document.search.query(u'test')
    return HttpResponse(queryset)#
    #return render_to_response('a.html',{'a':queryset})#

and my model is:

import datetime

class Group(models.Model):
    name = models.CharField(max_length=32)

class Document(models.Model):
    group       = models.ForeignKey(Group)
    date_added  = models.DateTimeField(default=datetime.datetime.now)
    title       = models.CharField(max_length=32)
    content     = models.TextField()

    search      = SphinxQuerySet(index="test1")

    class Meta:
        db_table = 'documents'

how do i change my code to show the title and content.

thanks