Re: Odd problem with queryset

2011-04-04 Thread Adam Tonks
On Monday, April 4, 2011 4:34:10 PM UTC+1, bruno desthuilliers wrote: > > If you really did test on the very same data set, same forum, *same > thread* (IOW ; same value for "self.pk") etc, you would'nt get an > IndexError, so there's obviously something different. > I was literally just adding

Re: Odd problem with queryset

2011-04-03 Thread Adam Tonks
At the suggestion of someone on IRC, I tried accessing the first result from within my template, using {{ thread.original_author.0 }} (where original_author is the name of the function with the return statement), and that works fine. It's a workaround, but not ideal, as I'll be using it in vari

Odd problem with queryset

2011-04-03 Thread Adam Tonks
I have a function in a model to return the first post in a forum thread. At the moment, it looks like this: return Post.objects.filter(thread = self.pk).order_by('created') When I run it in my test forum, the code returns two posts: [, ] I then add a [0] to the end of the statement, to just r

Re: Problems with permissions in the admin panel.

2011-02-24 Thread Adam Tonks
;m not sure why it didn't just override, but at least it's working now. Thanks On Feb 23, 11:50 pm, Mike Ramirez wrote: > On Wednesday, February 23, 2011 02:56:52 pm Adam Tonks wrote: > > > > > > > > > > > Hello, > > > I'm havi

Problems with permissions in the admin panel.

2011-02-23 Thread Adam Tonks
Hello, I'm having some fustrating problems with setting permissions for a user within the django administration panel. I create a new user, set it as staff, and assign it permissions. The problem is, when I login as them, I get the "You don't have permission to edit anything." error. I have als