Thursday, July 31, 2014

Re: Access to custom fields in view?

On Wednesday, 30 July 2014 19:02:00 UTC+1, Miguel Angel Yáñez Camacho wrote:

in my view in this code i can access to a regular field but i CANT access to custom fields, give me error
            plantillas_db = templates_keyword.objects.select_related('plantilla').filter(keyword=bd_keywordsfinal, plantilla__state='1', plantilla__promocionada=False).distinct().order_by('-plantilla__inserted_date')

= set(plantillas_db)
for i in s:

How can i access to this fields?


*What* error you you get *exactly*? The code you've given should be fine, although it's cleaner to use the @property decorator rather than manually wrapping a function (but the functionality is exactly the same). Show us what happens.

You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
To view this discussion on the web visit
For more options, visit

No comments:

Post a Comment