On Sat, 06 Mar 2010 09:52:06 -0800, uthaman wrote: > url: > url(r'top25/(?P<poll>\d{1})/$', views.top25_test, name='top25_test'), > > view: > def top25_test(request, poll): > entry = Poll.objects.filter(poll_id=poll) > > model: > class Poll(models.Model): > PUBLISHED_STATUS = 1 > DARK_STATUS = 2 > STATUS_CHOICES = ( > (PUBLISHED_STATUS, 'Published'), > (DARK_STATUS, 'Dark'), > ) > poll_id = models.AutoField(primary_key=True) > > My problem is that this query returns nothing when I KNOW there is a > record there! The url I am using is "/top25/1/". I have tried the > django-debug-toolbar, but for some reason it does not debug the query. > Aargh!
Hello, Your view doesn't seem to return anything - generally, it should to return an HttpResponse object. Review part three of the Django tutorial. Cheers, Kev -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.