Re: cursor.callproc()

2014-10-22 Thread Carl Meyer
> On Oct 22, 2014, at 5:56 PM, Shai Berger wrote: >> On Wednesday 22 October 2014 19:35:49 Carl Meyer wrote: >>> On 10/21/2014 04:04 PM, Shai Berger wrote: >>> I'd argue that in the common case, the user shouldn't care if the >>> function they are calling is implemented in Python or Procedural SQ

Re: cursor.callproc()

2014-10-22 Thread Michael Manfre
On Wed, Oct 22, 2014 at 12:35 PM, Carl Meyer wrote: > Here is where we differ. I think calling a database stored procedure is > fundamentally a different thing from calling a Python function (even one > that accesses the database), and the difference should be obvious in the > calling code. I don

Re: cursor.callproc()

2014-10-22 Thread Shai Berger
Hi Carl, On Wednesday 22 October 2014 19:35:49 Carl Meyer wrote: > On 10/21/2014 04:04 PM, Shai Berger wrote: > > I'd argue that in the common case, the user shouldn't care if the > > function they are calling is implemented in Python or Procedural SQL > > (assuming it is going to interact with th

Re: django.db.models.field.subclassing issue

2014-10-22 Thread Tim Graham
SubfieldBase is deprecated in Django 1.8, so I don't think there will be interest in fixing any issues with it. On Wednesday, October 22, 2014 7:11:05 AM UTC-4, Bobby Mozumder wrote: > > In the file subclassing.py, should the following: > > > def make_contrib(superclass, func=None): > """ >

[ANNOUNCE] Bugfix releases issued

2014-10-22 Thread James Bennett
The first bugfix release in the 1.7 series is out, along with bugfix releases for the supported 1.4 and 1.6 release series, and what will hopefully be the final release of the 1.5 series, which is now past end-of-life. Full details are available on the Django project weblog: https://www.djangopro

Re: cursor.callproc()

2014-10-22 Thread Carl Meyer
Hi Shai, On 10/21/2014 04:04 PM, Shai Berger wrote: > On Monday 20 October 2014 21:26:50 Carl Meyer wrote: >> Hi Marc, >> >> On 10/19/2014 12:54 AM, Marc Tamlyn wrote: >>> I guess now with migrations we have a nice way of running the SQL >>> against the database to create the stored procedures. >>

Re: cursor.callproc()

2014-10-22 Thread Carl Meyer
Hi Chris, On 10/22/2014 09:05 AM, Chris Foresman wrote: > Good points. I went looking for `callproc()` documentation and couldn't > find anything useful, which if I understand correctly is part of the > reason this thread started. So +1 on documenting it! > > The most complicated part of dealing

Re: cursor.callproc()

2014-10-22 Thread Chris Foresman
Good points. I went looking for `callproc()` documentation and couldn't find anything useful, which if I understand correctly is part of the reason this thread started. So +1 on documenting it! The most complicated part of dealing with store procedures from a high level is getting them in the d

Re: Why doesn't ModelChoiceField.queryset support slicing?

2014-10-22 Thread Thomas
I believe the problem is related to the fact that a sliced queryset cannot be filtered (it currently raises an AssertionError when trying to do so). If you need to produce a "top n results" queryset which can be filtered — which is implicitely required for the queryset you pass to a ModelChoice

Re: Suggestion for @cache_page compatiblity with jQuery JSONP

2014-10-22 Thread Florian Apolloner
Uhm, I don't think you can ignore the callback, isn't the callback what's included in the response? As such for proper function the callback can't be ignored. Cheers, Florian On Wednesday, October 22, 2014 7:16:48 AM UTC+2, Luke Dupin wrote: > > Anyone that has used @cache_page with jquery's JS

django.db.models.field.subclassing issue

2014-10-22 Thread Bobby Mozumder
In the file subclassing.py, should the following: def make_contrib(superclass, func=None): """ Returns a suitable contribute_to_class() method for the Field subclass. If 'func' is passed in, it is the existing contribute_to_class() method on the subclass and it is called before a

Suggestion for @cache_page compatiblity with jQuery JSONP

2014-10-22 Thread Luke Dupin
Anyone that has used @cache_page with jquery's JSONP knows that it does nothing. The URL is different for every call, therefor nothing gets cached. I suggest that a parameter is added to @cache_page which causes certain URL variables to be removed from the URL before the url is cached. I'm pi

Re: Why doesn't ModelChoiceField.queryset support slicing?

2014-10-22 Thread Shai Berger
On Wednesday 22 October 2014 10:50:51 Marc Tamlyn wrote: > > As for a work around, using a ChoiceField directly shouldn't be > particularly difficult in this case. ModelChoiceField has some nice > features but it is limited. > Using a ChoiceField as a substitute for ModelChoiceField isn't hard,

Re: Why doesn't ModelChoiceField.queryset support slicing?

2014-10-22 Thread Marc Tamlyn
Personally I don't feel that it's a particularly common need, but I can see your use case. More common is that a reasonable filter is applicable - say books with a rating over 80. As far as I know we don't have any support for SQL intersects and I don't believe there are any plans to introduce it.