Re: Adding a hook for pre-runtime setup (ticket #5685)

2007-10-08 Thread Mike Scott
Ah, Sorry all. Knew I missed it. Thanks Ben. I might go about documenting all this sometime then. We really need to improve those docs :) On 10/9/07, Benjamin Slavin <[EMAIL PROTECTED]> wrote: > > > On 10/8/07, Mike Scott <[EMAIL PROTECTED]> wrote: > > Can I throw a hat in the ring and suggest a

Re: Adding a hook for pre-runtime setup (ticket #5685)

2007-10-08 Thread Benjamin Slavin
On 10/8/07, Mike Scott <[EMAIL PROTECTED]> wrote: > Can I throw a hat in the ring and suggest a post-send-request hook? Perhaps you mean `request_finished`? [0,1,2] - Ben [0] http://code.djangoproject.com/browser/django/trunk/django/core/signals.py#L2 [1] http://code.djangoproject.com/browser

Re: Adding a hook for pre-runtime setup (ticket #5685)

2007-10-08 Thread Mike Scott
Can I throw a hat in the ring and suggest a post-send-request hook? I have an existing script in PHP which used shutdown_functions() and was looking for ways to do this in python. Certain use cases for this arise. (Though could be easily solved by sending to a queue server like django-queue). If

Re: Adding a hook for pre-runtime setup (ticket #5685)

2007-10-08 Thread Benjamin Slavin
On 10/8/07, Paul Davis <[EMAIL PROTECTED]> wrote: > Something to think about though is providing a way to add > callbacks to this hook that is independant of settings.py. Having to modify settings.py doesn't both me here. It's done for middleware and context processors, so it seems to fit with t

Re: Adding a hook for pre-runtime setup (ticket #5685)

2007-10-08 Thread Paul Davis
> Fortunately, a pre-runtime hook gives anybody who wants it the ability > to add this signal for their own use anyway, so the initial problem > solution solves everything. > Good point. You win this round... --~--~-~--~~~---~--~~ You received this message because

Re: Session auto initialization?

2007-10-08 Thread Jacob Kaplan-Moss
Hey Roman -- Please direct questions of this nature to django-users; django-dev is used to discuss the development of Django itself, not to answer usage questions. Thanks! Jacob --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Go

Re: Metting congress workshop ...anything...

2007-10-08 Thread Jacob Kaplan-Moss
On 10/8/07, Greg_IAP <[EMAIL PROTECTED]> wrote: > I want to know if another congress, worshop or meeting about django is > scheduled for the future? In the future, please direct questions of this nature to django-users; django-dev is used to discuss the development of Django itself, not to deal w

Metting congress workshop ...anything...

2007-10-08 Thread Greg_IAP
Hi everybody, I want to know if another congress, worshop or meeting about django is scheduled for the future? Greg Astrophysic Institute of Paris 98bis Boulevard Arago 75014 Paris --~--~-~--~~~---~--~~ You received this message because you are subscribed to t

Re: Adding a hook for pre-runtime setup (ticket #5685)

2007-10-08 Thread Malcolm Tredinnick
On Mon, 2007-10-08 at 11:45 -0400, Paul Davis wrote: > Two things. > > The preruntime hook is a pretty good idea. Something to think about > though is providing a way to add callbacks to this hook that is > independant of settings.py. Otherwise 3rd party apps that want the > functionality would r

Re: Decoration and aliasing

2007-10-08 Thread Jeremy Dunck
On 10/8/07, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote: > > On 10/7/07, Jeremy Dunck <[EMAIL PROTECTED]> wrote: > > http://code.djangoproject.com/ticket/5701 > > Oh yeah, and one other thing: > > IANAL, but I think the Python Software License is not compatible with > the BSD, so we'll need permis

Re: Decoration and aliasing

2007-10-08 Thread Jeremy Dunck
On 10/8/07, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote: > > On 10/7/07, Jeremy Dunck <[EMAIL PROTECTED]> wrote: > > I note that this is a (perhaps subtle-enough) backwards-incompatible change. > > Can you say a bit more about how this is backwards-incompatible? I'm > having a dense morning, and c

Re: Decoration and aliasing

2007-10-08 Thread Forest Bond
Hi, On Mon, Oct 08, 2007 at 10:49:14AM -0500, Jacob Kaplan-Moss wrote: > On 10/7/07, Jeremy Dunck <[EMAIL PROTECTED]> wrote: > > I note that this is a (perhaps subtle-enough) backwards-incompatible change. > > Can you say a bit more about how this is backwards-incompatible? I'm > having a dense m

Re: Decoration and aliasing

2007-10-08 Thread Jacob Kaplan-Moss
On 10/7/07, Jeremy Dunck <[EMAIL PROTECTED]> wrote: > http://code.djangoproject.com/ticket/5701 Oh yeah, and one other thing: IANAL, but I think the Python Software License is not compatible with the BSD, so we'll need permission from the PSF to distribute code copied from functools.py, and we'l

Re: Decoration and aliasing

2007-10-08 Thread Jacob Kaplan-Moss
On 10/7/07, Jeremy Dunck <[EMAIL PROTECTED]> wrote: > I note that this is a (perhaps subtle-enough) backwards-incompatible change. Can you say a bit more about how this is backwards-incompatible? I'm having a dense morning, and can't seem to see any breakage here (which is a good thing!) Jacob

Re: Adding a hook for pre-runtime setup (ticket #5685)

2007-10-08 Thread Paul Davis
Two things. The preruntime hook is a pretty good idea. Something to think about though is providing a way to add callbacks to this hook that is independant of settings.py. Otherwise 3rd party apps that want the functionality would require changes to the settings.py beyond the INSTALLED_APPS tuple

Re: Adding a hook for pre-runtime setup (ticket #5685)

2007-10-08 Thread Andrew Durdin
On 10/8/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > On Mon, 2007-10-08 at 09:15 -0400, Benjamin Slavin wrote: > > > > My immediate thought is that we could allow pre-model instantiation > > (as proposed in the ticket) and post-model instantiation hooks > > I don't think we want to do thi

Re: Adding a hook for pre-runtime setup (ticket #5685)

2007-10-08 Thread Malcolm Tredinnick
On Mon, 2007-10-08 at 09:15 -0400, Benjamin Slavin wrote: > On 10/8/07, Andrew Durdin <[EMAIL PROTECTED]> wrote: > > Well, that looks like it'll be great for registering listeners (except > > perhaps for pre/post_save/delete). > > I had overlooked the handling of these signals. They could arguab

Re: Adding a hook for pre-runtime setup (ticket #5685)

2007-10-08 Thread Benjamin Slavin
On 10/8/07, Andrew Durdin <[EMAIL PROTECTED]> wrote: > Well, that looks like it'll be great for registering listeners (except > perhaps for pre/post_save/delete). I had overlooked the handling of these signals. They could arguably live in models.py if they are for the same application, but acros

Re: Adding a hook for pre-runtime setup (ticket #5685)

2007-10-08 Thread Andrew Durdin
On 10/4/07, Benjamin Slavin <[EMAIL PROTECTED]> wrote: > > I wanted to get a feel for people's opinions on using this approach to > guarantee that certain code is executed before a request is processed > (or the interactive shell is loaded). > > This is necessary (arguably) to setup a listener to

Re: Changes to request_response have broken django-rest-interface

2007-10-08 Thread Peter Nixon
On Sat 06 Oct 2007, David Larlet wrote: > 2007/10/5, Malcolm Tredinnick <[EMAIL PROTECTED]>: > > On Fri, 2007-10-05 at 16:17 +0300, Peter Nixon wrote: > > > On Thu 04 Oct 2007, Malcolm Tredinnick wrote: > > > > On Thu, 2007-10-04 at 18:10 +0300, Peter Nixon wrote: > > > > > I tried to open the fol

Session auto initialization?

2007-10-08 Thread Roman Tolkachyov
Hi! I want to auto initialize session (it means that cookie['sessionid'] available at first request). I done it by this middleware: class SessionInitMiddleware: def process_request(self, request): if not request.session.get('test_sess', False): request.session['test_sess'

Re: Changes to request_response have broken django-rest-interface

2007-10-08 Thread David Larlet
2007/10/7, Malcolm Tredinnick <[EMAIL PROTECTED]>: > > On Sun, 2007-10-07 at 02:39 +0200, David Larlet wrote: > > The > > option (3) seems more natural to me to make the difference between > > what you post and the POST verb, it's more explicit. What about > > self.PUT in this scenario? > > That'