Hi all,
I need to execute a query with a order_by with some parameters that I
read from another query..
something like this:

this is my model:

class Widget(models.Model):
    name = models.CharField(maxlength=50,core=True)
    ....
    order = models.CharField(maxlength=50,blank=True,null=True)

and this is my view :

temp_list =
Story.objects.filter(id_section=section_id).select_related().order_by(widget.order)

i have this error:
OperationalError at /
no such column: stories_story.

for example, if I make this:
order = '-title'
temp_list =
Story.objects.filter(id_section=section_id).select_related().order_by(order)

it works (but it isn't whar i need...)!!

How can I do..??


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to