#2351: MySQL syntax error on object.all().count(), when called from template
---------------------+------------------------------------------------------
   Reporter:  gumuz  |                Owner:  adrian          
     Status:  new    |            Component:  Database wrapper
    Version:         |           Resolution:                  
   Keywords:         |                Stage:  Unreviewed      
  Has_patch:  1      |           Needs_docs:  0               
Needs_tests:  0      |   Needs_better_patch:  0               
---------------------+------------------------------------------------------
Comment (by [EMAIL PROTECTED]):

 mir: here you are.  Note the resulting SQL query at the end.
 
 All the interesting parts of code:
 
 models.py:
 {{{
 #!python
     class Article(models.Model):
         text = models.TextField()
 }}}
 
 urls.py:
 
 {{{
 #!python
     urlpatterns = patterns('',
         (r'^$', 'django.views.generic.simple.direct_to_template',
          {'extra_context': {'object_list': Article.objects.all()},
           'template': 'index.html'}),
     )
 }}}
 
 index.html:
 {{{
 {{ object_list.count }}
 }}}
 
 I tried to attach the detailed backtrace in HTML, but Akismet said it was
 spam.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/2351#comment:6>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to