Re: Problem with order_with_respect_to and self

2007-03-27 Thread Anderson Santos Silva
Hello Malcoml. Here the copy and paste of the error: FieldDoesNotExist at /animallib/ Section has no field named 'self' Request Method: GET Request URL: http://utopia-design.net/animallib/ Exception Type: FieldDoesNotExist Exception Value: Section has no fie

Re: Problem with order_with_respect_to and self

2007-03-26 Thread [EMAIL PROTECTED]
Malcom, Sorry, you are correct. I completely flubbed on that one. -Doug On Mar 26, 8:24 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Mon, 2007-03-26 at 22:51 +, [EMAIL PROTECTED] wrote: > >http://www.djangoproject.com/documentation/model-api/#many-to-one-rel... > > > class

Re: Problem with order_with_respect_to and self

2007-03-26 Thread Malcolm Tredinnick
On Mon, 2007-03-26 at 22:41 -0300, Anderson Santos Silva wrote: > I am working with the trunk, and I never tried the order_with_respect_to > before, so I don't know how it works but it's on the official Django's > documentation. > Since my model is called Section, it's probably something about P

Re: Problem with order_with_respect_to and self

2007-03-26 Thread Anderson Santos Silva
I am working with the trunk, and I never tried the order_with_respect_to before, so I don't know how it works but it's on the official Django's documentation. Since my model is called Section, it's probably something about Python tricks to get a property dinamically. That sounds exciting, my fi

Re: Problem with order_with_respect_to and self

2007-03-26 Thread Malcolm Tredinnick
On Mon, 2007-03-26 at 19:23 -0300, Anderson Santos Silva wrote: > Hello, I am having problem when I use the order_with_respect_to and > a self related foreign key model: > > When I validate this, it raises "'str' object has no attribute > 'get_section_order'" and when I use self or Sect

Re: Problem with order_with_respect_to and self

2007-03-26 Thread Malcolm Tredinnick
On Mon, 2007-03-26 at 22:51 +, [EMAIL PROTECTED] wrote: > http://www.djangoproject.com/documentation/model-api/#many-to-one-relationships > > class Section(models.Model): > parent = models.ForeignKey('self', < BAD > parent = models.ForeignKey('Section', < GOOD I'm sorry, but

Re: Problem with order_with_respect_to and self

2007-03-26 Thread [EMAIL PROTECTED]
http://www.djangoproject.com/documentation/model-api/#many-to-one-relationships class Section(models.Model): parent = models.ForeignKey('self', < BAD parent = models.ForeignKey('Section', < GOOD -Doug On Mar 26, 6:23 pm, Anderson Santos Silva <[EMAIL PROTECTED]> wrote: >

Problem with order_with_respect_to and self

2007-03-26 Thread Anderson Santos Silva
Hello, I am having problem when I use the order_with_respect_to and a self related foreign key model: When I validate this, it raises "'str' object has no attribute 'get_section_order'" and when I use self or Section, it raises the error: "Section has no field named 'self'" class Sect