Re: Wrong JOIN with nested FKs

2011-10-03 Thread Sebastian Goll
On Mon, 3 Oct 2011 22:07:52 +0800 Russell Keith-Magee wrote: > 1) Build your own experience with the internals of the ORM. As part > of this learning process, document what you learn -- we would very > much like to have better documentation of the internals of Django's > ORM, but writing that do

Re: deprecation vs removal

2011-10-03 Thread Justin Holmes
or PendingRemoval? On Mon, Oct 3, 2011 at 9:56 PM, Tai Lee wrote: > > > On Oct 4, 11:17 am, Russell Keith-Magee > wrote: >> I'm completely agreed that the 'soft' deprecation is useful. I'm just >> complaining about the ambiguity in the language: "We're deprecating >> this feature by marking

Handling admin media paths in the transition from 1.3 to 1.4

2011-10-03 Thread Aramgutang
Initially posted this to django-users, having completely forgotten about the existence of django-dev. Sorry about that. Currently, it is unclear as to how apps that override admin templates should maintain compatibility with both 1.3 and 1.4 when referring to the admin media file URLs in the overr

Re: deprecation vs removal

2011-10-03 Thread Tai Lee
On Oct 4, 11:17 am, Russell Keith-Magee wrote: > I'm completely agreed that the 'soft' deprecation is useful. I'm just > complaining about the ambiguity in the language: "We're deprecating > this feature by marking it PendingDeprecation...". What about just changing "PendingDeprecation..." to "

Re: Patch for using custom managers in a reverse relation. (#3871)

2011-10-03 Thread Tai Lee
Is this really much better than using your own custom manager as the default automatic manager (used for reverse relations) with `use_for_related_fields = True`? Your custom manager could do nothing to filter results by default and so behave the same as the default automatic manager, but provide a

Re: deprecation vs removal

2011-10-03 Thread Russell Keith-Magee
On Tue, Oct 4, 2011 at 9:40 AM, Joe & Anne Tennies wrote: > I know that no one knows who I am, but I'm going to say that this is > becoming a bike shed. There appears to be some confusion here -- nobody is proposing changing *anything* about Django's deprecation policy. All we are doing is attemp

Re: deprecation vs removal

2011-10-03 Thread Joe & Anne Tennies
I know that no one knows who I am, but I'm going to say that this is becoming a bike shed. It sounds like there's generally agreement that people need to be warned that something is going to be removed. It sounds like people that maintain code that is required to be stable and relies on other peop

Re: prefetch_related - new feature suggestion

2011-10-03 Thread Carl Meyer
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Luke, Thanks for the thorough reply! I'm convinced that it wouldn't make sense to merge select_related and prefetch_related; I wish I had a better suggestion for a name for prefetch_related, but I don't. Consider my concern withdrawn. Carl -BE

Re: prefetch_related - new feature suggestion

2011-10-03 Thread Luke Plant
Hi Carl, Thanks for the feedback, sorry for the length of my reply, I tried to be detailed to avoid you having to read the code. On 03/10/11 20:44, Carl Meyer wrote: > My only real concern is one I'm a bit surprised hasn't been raised > already: API and naming sanity. If I'm a new user coming to

Re: deprecation vs removal

2011-10-03 Thread Russell Keith-Magee
On Tue, Oct 4, 2011 at 12:27 AM, ptone wrote: > > > On Oct 1, 9:10 am, Luke Plant wrote: >> Hi all, >> >> The Django deprecation timeline [1] is very inconsistent in its usage of >> the terminology 'deprecated'. For example, the 1.5 section often says >> "is  deprecated" or "has been deprecated",

Re: Wrong JOIN with nested FKs

2011-10-03 Thread Russell Keith-Magee
2011/10/3 Łukasz Langa : > Wiadomość napisana przez Russell Keith-Magee w dniu 3 paź 2011, o godz. > 16:07: > > 1) Build your own experience with the internals of the ORM. As part > of this learning process, document what you learn -- we would very > much like to have better documentation of the in

Re: prefetch_related - new feature suggestion

2011-10-03 Thread Anssi Kääriäinen
On Oct 3, 10:44 pm, Carl Meyer wrote: > Hi Luke, > > On Oct 3, 9:04 am, Luke Plant wrote: > > > The patch for this is now ready, as far as I'm concerned, but I'd like > > to bring it up here again before committing, mainly because Alex Gaynor > > expressed some doubts. > > > The latest patch is o

Re: find_management_module() question

2011-10-03 Thread Carl Meyer
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/03/2011 08:05 AM, luk...@langa.pl wrote: > `django.core.management.find_management_module()` has this description > in the docstring that says it determines the path "without actually > importing the application or the management module". Current

Re: prefetch_related - new feature suggestion

2011-10-03 Thread Anssi Kääriäinen
On Oct 3, 6:04 pm, Luke Plant wrote: > Hi all, > > The patch for this is now ready, as far as I'm concerned, but I'd like > to bring it up here again before committing, mainly because Alex Gaynor > expressed some doubts. I have done a review of the patch, and I think it is commit ready. There has

Re: prefetch_related - new feature suggestion

2011-10-03 Thread Carl Meyer
Hi Luke, On Oct 3, 9:04 am, Luke Plant wrote: > The patch for this is now ready, as far as I'm concerned, but I'd like > to bring it up here again before committing, mainly because Alex Gaynor > expressed some doubts. > > The latest patch is on the ticket: > > https://code.djangoproject.com/ticke

Re: Curious (bug?) with db filter __in

2011-10-03 Thread Cal Leeming [Simplicity Media Ltd]
Nice - didn't know about that, will check that out too. Thanks for the feedback on this everyone! Cal On Mon, Oct 3, 2011 at 8:15 PM, Ian Kelly wrote: > Have a look at the DatabaseOperations.max_in_list_size method, but it > sounds like it's not going to be a simple constant for MySQL. > On Oc

Re: Curious (bug?) with db filter __in

2011-10-03 Thread Cal Leeming
Nice - didn't know about that, will check that out too. Thanks for the feedback on this everyone! Cal On Mon, Oct 3, 2011 at 8:15 PM, Ian Kelly wrote: > Have a look at the DatabaseOperations.max_in_list_size method, but it > sounds like it's not going to be a simple constant for MySQL. > On Oc

Re: Curious (bug?) with db filter __in

2011-10-03 Thread Ian Kelly
Have a look at the DatabaseOperations.max_in_list_size method, but it sounds like it's not going to be a simple constant for MySQL. On Oct 3, 2011 1:01 PM, "Cal Leeming [Simplicity Media Ltd]" < cal.leem...@simplicitymedialtd.co.uk> wrote: > Ahh - max_allowed_packet pops up its ugly head again - it

Re: Curious (bug?) with db filter __in

2011-10-03 Thread Cal Leeming [Simplicity Media Ltd]
Ahh - max_allowed_packet pops up its ugly head again - it wouldn't surprise me if this was the case. Thank you for testing this against Postgre - I will post the test results against MySQL tonight/tomorrow. Cal On Mon, Oct 3, 2011 at 7:58 PM, Jacob Kaplan-Moss wrote: > On Mon, Oct 3, 2011 at 1:

Re: Curious (bug?) with db filter __in

2011-10-03 Thread Jacob Kaplan-Moss
On Mon, Oct 3, 2011 at 1:31 PM, Cal Leeming [Simplicity Media Ltd] wrote: > So, came up against a strange thing today. > Database backend is MySQL 5.5 (Percona variant) > > If I attempt to do an __in query with a list containing 50 thousand entries, > the query wouldn't fail, but would instead ret

Re: Curious (bug?) with db filter __in

2011-10-03 Thread Cal Leeming [Simplicity Media Ltd]
Ja - that was going to be my next step - bit stretched for time at the moment - so was just a quick email to see if anyone had any thoughts. I think even if it was a problem with MySQL - an error should have been raised somewhere. Either way - I'll build a test for it and let you know the results

Re: Curious (bug?) with db filter __in

2011-10-03 Thread Christophe Pettus
On Oct 3, 2011, at 11:31 AM, Cal Leeming [Simplicity Media Ltd] wrote: > I can provide exact further info, but this was just a preliminary email to > see if this was expected behavior - or actually a bug?? You might try capturing the generated SQL and running it on a command line against the D

Curious (bug?) with db filter __in

2011-10-03 Thread Cal Leeming [Simplicity Media Ltd]
So, came up against a strange thing today. Database backend is MySQL 5.5 (Percona variant) If I attempt to do an __in query with a list containing 50 thousand entries, the query wouldn't fail, but would instead return no results. If I split it up into chunks (say 100) - it would work fine. For e

Re: Feature proposal: Q.push(...) and QuerySet.filter(relfield=Q(...))

2011-10-03 Thread Javier Guerra Giraldez
On Fri, Sep 30, 2011 at 4:37 PM, Johannes Dollinger wrote: > The aim of this proposal is to reuse Q objects for models that are related > through FK or M2M fields. i really want to have this feature! so i went and did a quick implementation and created ticket #16979[1] [1]:https://code.djangop

Re: deprecation vs removal

2011-10-03 Thread ptone
On Oct 1, 9:10 am, Luke Plant wrote: > Hi all, > > The Django deprecation timeline [1] is very inconsistent in its usage of > the terminology 'deprecated'. For example, the 1.5 section often says > "is  deprecated" or "has been deprecated", when what they mean is "will > be removed", which is wh

Re: Type casting template filter proposal

2011-10-03 Thread Florian Apolloner
Hi, personally I am -1 on that, for the following reasons: - This can be done in an external library - You can't support every possibility, you want a string/int filter, I want a blableblub/younameit type conversion - playing with request.GET.* in templates is probably something you

Re: prefetch_related - new feature suggestion

2011-10-03 Thread Luke Plant
Hi all, The patch for this is now ready, as far as I'm concerned, but I'd like to bring it up here again before committing, mainly because Alex Gaynor expressed some doubts. The latest patch is on the ticket: https://code.djangoproject.com/ticket/16937 It is much longer than before, but mainly

Type casting template filter proposal

2011-10-03 Thread h3
There's numerous time where I found myself wishing for type casting filters in templates.. For example, the following won't work because one is a string and the other is an integer: {% if request.GET.year == object.date.year %} ... {% endif %} So when I need to compare a string with an int with

Re: Wrong JOIN with nested FKs

2011-10-03 Thread Łukasz Langa
Wiadomość napisana przez Russell Keith-Magee w dniu 3 paź 2011, o godz. 16:07: > 1) Build your own experience with the internals of the ORM. As part > of this learning process, document what you learn -- we would very > much like to have better documentation of the internals of Django's > ORM, but

find_management_module() question

2011-10-03 Thread luk...@langa.pl
Hey there. `django.core.management.find_management_module()` has this description in the docstring that says it determines the path "without actually importing the application or the management module". Currently it doesn't support namespace packages and there's a long open ticket about it [1]. M

Re: Wrong JOIN with nested FKs

2011-10-03 Thread Russell Keith-Magee
On Mon, Oct 3, 2011 at 2:40 AM, Sebastian Goll wrote: > Hello, > > I'm afraid I'll have to reply to my own message because nobody else did. ;) > Please read on. Also, please note that the original report is now over five > weeks old, with no real solution yet in sight. > > > On Thu, 29 Sep 2011

Re: deprecation vs removal

2011-10-03 Thread Russell Keith-Magee
On Sun, Oct 2, 2011 at 12:10 AM, Luke Plant wrote: > Hi all, > > The Django deprecation timeline [1] is very inconsistent in its usage of > the terminology 'deprecated'. For example, the 1.5 section often says > "is  deprecated" or "has been deprecated", when what they mean is "will > be removed",

Re: Removing pickle from cookie-based session storage

2011-10-03 Thread Anssi Kääriäinen
On 10/03/2011 01:05 AM, Paul McMillan wrote: Isn't there also the possibility that the attacker can somehow get arbitrary data signed into the session cookie without knowing SECRET_KEY? That's not a viable attack route. It's much less likely than a developer exposing their SECRET_KEY. Now that

Re: deprecation vs removal

2011-10-03 Thread Stephen Burrows
As a native speaker, I've never had a problem with the words or phrases being discussed here. Sure, it's jargon. It might be more accessible if we used other language. I don't really care one way or the other. But it's jargon. The fact that Miriam-Webster doesn't know what the word actually means d