Making PROFILE_DATA_DIR in profiler-hotshot a settings variable

2008-04-06 Thread shabda.raaj
The code profiler-hotshot makes PROFILE_DATA_DIR a hardcoded variable. Should not this be a setting.py variable which can be customized? [1]http://code.djangoproject.com/browser/django/trunk/django/core/ handlers/profiler-hotshot.py --~--~-~--~~~---~--~~ You receiv

Re: django.contrib.sessions problems

2008-04-06 Thread Robert Coup
On Mon, Apr 7, 2008 at 11:28 AM, Malcolm Tredinnick < [EMAIL PROTECTED]> wrote: > Realise that I am in agreement with you that logout (and possibly login, > I haven't worked through the implications there) should be changed to > clear the session by default. There's no strong reason not to do that

Re: django.contrib.sessions problems

2008-04-06 Thread Malcolm Tredinnick
On Sun, 2008-04-06 at 08:21 -0700, mrts wrote: [...] > My personal use case: > - > > User sessions are used apart from django.auth.models.User. The > application logic doesn't fit well with Django auth (auth > features are not needed and create a minor security risk if an >

Re: django.contrib.sessions problems

2008-04-06 Thread mrts
> Session objects is the right place to store all session-related data. > It's a many-to-one relation to each user. If you want something that's > one-to-one with a user, that isn't session data and is easy to implement > via your own model, but I'm not sure it's common enough to have a common > A

Re: Threading improvements

2008-04-06 Thread Ivan Sagalaev
Malcolm Tredinnick wrote: > That's more or less how it is written, since r7289 (March 18). Great! We've been running too long on a snapshot from December then :-) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Dja

Re: Threading improvements

2008-04-06 Thread Malcolm Tredinnick
On Sun, 2008-04-06 at 12:13 +0400, Ivan Sagalaev wrote: > Malcolm Tredinnick wrote: > > If you only want a unique object, make sure that > > the arguments you provide as the defaults argument specify it must be > > unique at the database level. > > BTW, may be get_or_create should be rewritten a

Re: Threading improvements

2008-04-06 Thread Ivan Sagalaev
Malcolm Tredinnick wrote: > If you only want a unique object, make sure that > the arguments you provide as the defaults argument specify it must be > unique at the database level. BTW, may be get_or_create should be rewritten as: get() try: create() except BackendSpecifi

No locking, no preemptive multithreading [Re: Threading improvements]

2008-04-06 Thread Nicola Larosa
Malcolm made great points about the locking problem (I collected them below, for reference). I'd like to add some more context. At the system level, the kernel uses preemption between processes, each with a distinct memory space: that's a safe model (until they interact via the file system, datab