Ok, now it works!!
Thanks a lot
On 31 Ott, 16:57, "Marty Alchin" <[EMAIL PROTECTED]> wrote:
> On 10/31/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> > for example the field 'order' is set to: -publish_date,section
>
> > I know that in my view I can't do this:
>
> > Story.objects.filter(id
On 10/31/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> for example the field 'order' is set to: -publish_date,section
>
> I know that in my view I can't do this:
>
> Story.objects.filter(id_site=Site.objects.get_current().id).select_related().order_by(order)
>
> so...how can I do?
You could
Hi,
I resolver my first problem, but now I've another question...
I need to specify in the 'order' field of Widget a list with multiple
fields..
for example the field 'order' is set to: -publish_date,section
I know that in my view I can't do this:
Story.objects.filter(id_site=Site.objects.get_c
On Mon, 2007-10-29 at 09:35 -0700, [EMAIL PROTECTED] wrote:
> 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=T
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)
It might be the problem of a tuple with only one item:
so instead of this:
words.get_list(order_by=('Word'))
use this:
words.get_list(order_by=('Word',))
It's interpreting ('Word') as ('W', 'o', 'r','d') ergo "unknown column
W.."
--~--~-~--~~~---~--~~
You receiv
I dont know what get_list is but this should get you all words in
order:
words = Word.objects.order_by('Word')
http://www.djangoproject.com/documentation/db_api/#order-by-fields
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the G
I have this very simple model for a table
...
class Word(meta.Model):
Word=meta.CharField(maxlength=50)
def __repr__(self):
return self.Word
class META:
admin = meta.Admin()
.
Now when I try:
words.get_list(order_by=('Word'))
I will get the error:
8 matches
Mail list logo