Changes between Initial Version and Version 1 of Ticket #11802


Ignore:
Timestamp:
Aug 29, 2009, 3:17:27 PM (15 years ago)
Author:
Karen Tracey
Comment:

Fixed formatting -- please use preview.

I don't see the Django bug here. Your code had an error and you got some kind of exception. You didn't include the details of the exception so it is difficult for anyone to explain why you got the exception you got instead of what you might have been expecting. "Random behavior" is extremely unlikely. If you care to post a complete example including details of the exception you received on django-users, then someone may be able to explain why you got what you got. But without a specific suggestion for something to improve in Django this is not a valid ticket.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #11802

    • Property Resolutioninvalid
    • Property Status newclosed
  • Ticket #11802 – Description

    initial v1  
    11Assuming that an AJAX query posts (start, limit) for retrieving Polls (Django tutorial), writing the following code leads to request.POST problem.
    22
     3{{{
     4#!python
    35from django.core import serializers
    46from django.http import HttpResponse
     
    2022   
    2123    return respond(rows, totalCount)
    22 
     24}}}
    2325
    2426surprisingly, fixing the code to:
    25 
     27{{{
     28#!python
    2629    totalCount = Vehicle.objects.aggregate(Count('id'))['id__count']
    27 
     30}}}
    2831fixes the request.POST exception. The issue is that the django error report about request.POST not having a key named 'start' or 'limit' distracts the programmer to debugging the front end AJAX code rather than focusing on the Python bug. It also may indicate a more fundamental issue that exhibits random behavior.
Back to Top