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.

Re: Call stacks for Model classes

2015-05-26 Thread Shai Berger
Hi, Please ask questions about developing with Django on the django-users group. This group is for discussions about the development of Django itself. (as a general rule: decorating single methods should work fine; trying to use decorators on model classes will probably be painful. These classe

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

Call stacks for Model classes

2015-05-26 Thread malhar
So, there is a huge Django app with multiple classes in Model. I am interested in getting call stacks of some classes. I have few questions in the approach and few questions regarding the implementation. I am using Django 1.4.20 and python 2.7 1. What if we decide to write a decorator for the