Re: Filtering on ManyToManyField with multiple entries ANDed

2006-09-03 Thread kdart
Thank you for the detailed response. Russell Keith-Magee wrote: > > But if I AND them (here is the problem/question), nothing... > > ... > > So, is this a bug? Or am I doing something wrong? > > > It's not a bug - it's a slight misunderstanding on your part on how > filtering works. Yep, I

Re: How to use month/date/year menus for date?

2006-09-03 Thread Sean Schertell
> On 9/3/06, Jakub 'teodor' Krajniak <[EMAIL PROTECTED]> wrote: >> Sean Schertell wrote: >> (...) >>> The question is, how can I get those three menus to create a single >>> date object that plays nice with Django? >> >> I think that writing CustomForm with SelectFields would be good idea. >>

Re: why 'default' filter does't work?

2006-09-03 Thread SmileyChris
I wrote a ticket explaining the problem, and it has been picked up already. I would expect it will be changed back to the old functionality soon. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: Filtering on ManyToManyField with multiple entries ANDed

2006-09-03 Thread Russell Keith-Magee
On 9/3/06, kdart <[EMAIL PROTECTED]> wrote: But if I AND them (here is the problem/question), nothing..So, is this a bug? Or am I doing something wrong?It's not a bug - it's a slight misunderstanding on your part on how filtering works. The problem is that ultimately, Django is doing what it

Re: Admin so nearly does what I want.

2006-09-03 Thread Jay Parlar
On 9/3/06, AndyB <[EMAIL PROTECTED]> wrote: > > Hi, > > I've been trying to find some documentation on extending the admin > interface or reusing parts of it's functionality. I've found some talk > on the django dev list about enhancing support for this but I can't > quite figure out what's

Re: How to use month/date/year menus for date?

2006-09-03 Thread Alan Green
On 9/3/06, Jakub 'teodor' Krajniak <[EMAIL PROTECTED]> wrote: > Sean Schertell wrote: > (...) > > The question is, how can I get those three menus to create a single > > date object that plays nice with Django? > > I think that writing CustomForm with SelectFields would be good idea. > Next in

Re: get_next_by_FIELD and alternate managers

2006-09-03 Thread Nate Straz
On Sun, Sep 03, 2006 at 11:26:22PM +0100, Konstantin Shaposhnikov wrote: > On 9/3/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > My problem is that my older/newer navigation that uses > > entry.get_next_by_pub_date also picks up unpublished entries. Is there > > a way to tell

Showing a count of only approved free comments

2006-09-03 Thread keukaman
I'm using get_free_comment_count to display the number of comments associated with each blog entry. Is there a way to display the count of only the comments that have been approved? Thanks in advance. --~--~-~--~~~---~--~~ You received this message because you

Admin so nearly does what I want.

2006-09-03 Thread AndyB
Hi, I've been trying to find some documentation on extending the admin interface or reusing parts of it's functionality. I've found some talk on the django dev list about enhancing support for this but I can't quite figure out what's already possible. Some people have mentioned a copy the

Re: get_next_by_FIELD and alternate managers

2006-09-03 Thread Konstantin Shaposhnikov
Hi Nate, You can pass additional filter arguments to get_next_by_pub_date method like this: entry.get_next_by_pub_date(is_published = True) Regards, Konstantin On 9/3/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > In my blog I take advantage of get_next_by_FIELD (pub_date in this

subclassing AddManipulator vs. subclassing Manipulator

2006-09-03 Thread Joseph Heck
I learned, forgot about, and got bit again today by an issue that makes me think I don't understand the desired behavior for Manipulators.I was subclassing AddManipulator to do a more complex function across several objects, and ran into a few fields that wouldn't set themselves, even though I'd

Re: Re: foreignKey + manipulator...performance problem

2006-09-03 Thread Joseph Heck
Is there a wiki page that outlines where the current thinking is leading?-joeOn 9/2/06, James Bennett < [EMAIL PROTECTED]> wrote:On 9/2/06, Jorge Gajon < [EMAIL PROTECTED]> wrote:> Or maybe just wait for the impending removal of manipulators :)The class django.forms.Manipulator is going away, as

get_next_by_FIELD and alternate managers

2006-09-03 Thread nate-django
In my blog I take advantage of get_next_by_FIELD (pub_date in this case) for navigation to older and newer stories in my entry detail view. I also have a flag in my entry model that says whether or not a blog entry is published. I defined an alternate manager called "published" to make it

Re: Many to Many Field

2006-09-03 Thread [EMAIL PROTECTED]
For example I have WikiPages with Many2Many with "Categories" in a edit view I have: page_id = Page.objects.get(slug__exact=slug) manipulator = Page.ChangeManipulator(page_id.id) page_data = manipulator.flatten_data() # this is importanta form =

Re: OneToMany Connection quite simple query how to

2006-09-03 Thread limon
1. it should be (student__id=1) not (student_id=1) 2. i think grade should be the foreignkey of student, yours is just opposite --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: Django patch!

2006-09-03 Thread Milton Waddams
> You mean two _reported_ false positives a week? > Or did someone read all the rejected posts to check that? > > I fear that many people will just go away if their bug report or patch > gets rejected like that, especially those that don't really "need" > Django. (I know I have done that at

Re: ReferenceError

2006-09-03 Thread Lorenzo
Andy Dustman wrote: > What versions of MySQL and MySQLdb/MySQL-python are you using? mysql Ver 14.12 Distrib 5.0.22 mysql-python 1.2.1_p2 So it could be caused by mysql/mysql-py, not django? Thanks, Lorenzo --~--~-~--~~~---~--~~ You received this message

Re: How to use month/date/year menus for date?

2006-09-03 Thread Sean Schertell
Thanks for the tips folks. I'm a little surprised that Django makes you work so hard to make such a totally standard form element (a date as three pulldown menus). Is there really no easier method? Sean On Sep 3, 2006, at 1:31 AM, Jakub 'teodor' Krajniak wrote: > > > Sean Schertell

Filtering on ManyToManyField with multiple entries ANDed

2006-09-03 Thread kdart
I have a model with a typical ManyToManyField defined. Now, I can filter on any one value in the list of values it contains, or OR them. But I cannot AND them. Example (I hope this is clear): Filter on one particular entry ID in the target table: Python>