Re: Why can't templates access properties

2015-05-27 Thread Ram Rachum
Created: https://code.djangoproject.com/ticket/24863#ticket On Wed, May 27, 2015 at 2:56 AM, Curtis Maloney wrote: > Feel free to open a ticket, as it will give a place to retain the > discussion. > > Perhaps start with the use case for having additional properties on a > QuerySet :) > > -- > Cu

Re: Why can't templates access properties

2015-05-26 Thread Curtis Maloney
Feel free to open a ticket, as it will give a place to retain the discussion. Perhaps start with the use case for having additional properties on a QuerySet :) -- Curtis On 27 May 2015 at 07:14, Ram Rachum wrote: > I found the cause of my problem: `django.db.models.Manager.from_queryset` > cop

Re: Why can't templates access properties

2015-05-26 Thread Ram Rachum
I found the cause of my problem: `django.db.models.Manager.from_queryset` copies all the methods from the `QuerySet` class to the `Manager` class, but it doesn't copy the properties. What do you think about opening an issue for making `django.db.models.Manager.from_queryset` copy over propertie

Re: Why can't templates access properties

2015-05-26 Thread Tim Graham
Accessing properties in templates should work as far as I know. Maybe there is an error in your application. On Tuesday, May 26, 2015 at 2:27:40 PM UTC-4, Ram Rachum wrote: > > Hi, > > I noticed that when I use variables in Django templates that access object > properties, it doesn't work. (e.g.

Why can't templates access properties

2015-05-26 Thread Ram Rachum
Hi, I noticed that when I use variables in Django templates that access object properties, it doesn't work. (e.g. I have {{ foo.bar }} while bar is a Python property.) See the documentation for variables in Django templates: https://docs.djangoproject.com/en/1.8/ref/templates/language/#variabl