whoisearth
whoisearth

Reputation: 4170

Django - Invalid Syntax with my view

I have the following view that gives me "invalid syntax (views.py, line 251)"

Line 251 is the "return HttpResponse(queryresults)"

What gives?

def test_queryjoin(request):
    jobmstquery = Jobmst.objects.filter(jobmst_id=3296)
    jobdtlquery = Jobdtl.objects.filter(jobdtl_id=3296)
    queryeset = chain(jobmstquery, jobdtlquery)
    queryresults = serializers.serialize("python", queryset, fields=('jobmst_id', 'jobmst_prntid', 'jobmst_name', 'jobdtl_cmd')
    return HttpResponse(queryresults)

My urls.py has the following -

url(r'^Blah/test/$', 'test_queryjoin'),

Upvotes: 0

Views: 393

Answers (1)

user2555451
user2555451

Reputation:

You are missing a closing parenthesis at the end of this line:

queryresults = serializers.serialize("python", queryset, fields=('jobmst_id', 'jobmst_prntid', 'jobmst_name', 'jobdtl_cmd'))
#                                                                                                                    here--^

Upvotes: 2

Related Questions