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 properties as 
well? 

On Tuesday, May 26, 2015 at 10:19:25 PM UTC+3, Tim Graham wrote:
>
> 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. 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/#variables
>>
>> It indeed doesn't mention properties.
>>
>> Why should properties not work through template? I can't think of a good 
>> reason. 
>>
>>
>> Thanks,
>> Ram.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/7188bfd5-632d-4333-868f-180540a8193c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to