Re: RequestContext + Auth.middleware 'Accesses the Session' (aka LazyUser ain't that lazy)

2008-10-27 Thread SmileyChris
This is exactly why my patch in the session messages ticket [1] makes the messages lazy. [1] http://code.djangoproject.com/ticket/4604 On Oct 28, 1:59 pm, bo <[EMAIL PROTECTED]> wrote: > Actually i've found that the issue lies with the > TEMPLATE_CONTEXT_PROCESSORS > > django.core.context_proces

Re: Signal Connection Decorators

2008-10-27 Thread zvoase
I just wanted to check if there was a consensus on this; it would be nice to get it into the Django 1.1 featureset. Regards, Zack --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to

Re: RequestContext + Auth.middleware 'Accesses the Session' (aka LazyUser ain't that lazy)

2008-10-27 Thread bo
Actually i've found that the issue lies with the TEMPLATE_CONTEXT_PROCESSORS django.core.context_processors.auth which does the get_and_delete messages bit .. so i guess that is the proper behavior. Sad to say that although my app can work around that issue (by using a different messages mech

RequestContext + Auth.middleware 'Accesses the Session' (aka LazyUser ain't that lazy)

2008-10-27 Thread bo
I'm not sure if this is 'supposed' to be the case or not so i'll ask i think i've seen a similar post like this before, but either a) i'm bad a search for it or b) it was only slightly related --- the issue --- using RequestContext(request, {}) + Auth.middleware always seems to access the sessi

Proposal: Year navigation in admin's date widgets' calendar

2008-10-27 Thread Javier de la Rosa
Hi all, I've opened a ticket on this topic: http://code.djangoproject.com/ticket/9388 Actually, the DateTimeShortcuts JavaScript object in django/contrib/admin/media/js/admin/DateTimeShortcuts.js has already got drawPreviousYear and drawNextYear methods, however admi's date widgets' calendar does

Re: "OperationalError: database is locked" with Python 2.6 multiprocessing and SQLite backend

2008-10-27 Thread oggie rob
On Oct 27, 11:21 am, oggie rob <[EMAIL PROTECTED]> wrote: > Its a bit deeper than that... but I'm waiting for my friend to respond > (he worked on sqlite issues at my last company). Hopefully I'll hear > from him today and be able to add some more details. Okay, so I got the good word :) First o

Re: "OperationalError: database is locked" with Python 2.6 multiprocessing and SQLite backend

2008-10-27 Thread oggie rob
> I agree, and this explanation looks good.  +1 Its a bit deeper than that... but I'm waiting for my friend to respond (he worked on sqlite issues at my last company). Hopefully I'll hear from him today and be able to add some more details. -rob --~--~-~--~~~---~--~-

Re: "OperationalError: database is locked" with Python 2.6 multiprocessing and SQLite backend

2008-10-27 Thread Brian Beck
On Oct 27, 1:46 pm, mrts <[EMAIL PROTECTED]> wrote: > > IMHO this should be documented, so I > > reopenedhttp://code.djangoproject.com/ticket/9409 > > and changed the component to Documentation. > > I've attached the explanation > tohttp://code.djangoproject.com/attachment/ticket/9409/database_i

Re: "OperationalError: database is locked" with Python 2.6 multiprocessing and SQLite backend

2008-10-27 Thread mrts
On Oct 27, 6:57 pm, mrts <[EMAIL PROTECTED]> wrote: > On Oct 27, 5:16 pm, Brian Beck <[EMAIL PROTECTED]> wrote: > > As others have pointed out, this isn't an issue with Django.  The > > easiest solution is to make this error less common with a higher > > timeout.  In settings.py: > > > DATABASE_OP

Re: "OperationalError: database is locked" with Python 2.6 multiprocessing and SQLite backend

2008-10-27 Thread mrts
On Oct 27, 5:16 pm, Brian Beck <[EMAIL PROTECTED]> wrote: > > As others have pointed out, this isn't an issue with Django.  The > easiest solution is to make this error less common with a higher > timeout.  In settings.py: > > DATABASE_OPTIONS = {'timeout': 30} Thanks Brian, increasing the timeou

Re: Implementing a pure RDF backend for Django

2008-10-27 Thread James Richards
>> >> Does anyone have any advice for me before I head off into the >> suburban >> parks of Django for an initial implementation? Any caveats I should >> consider which might make a pure RDF backend unfeasible? > > I used OpenLink Virtuoso Triple Store (via their HTTP SPARQL binding) > with the

Re: "OperationalError: database is locked" with Python 2.6 multiprocessing and SQLite backend

2008-10-27 Thread Brian Beck
On Oct 21, 7:27 am, mrts <[EMAIL PROTECTED]> wrote: > It seems that current DB lock management doesn't play nice with the > new Python 2.6 multiprocessing package and SQLite. See [1]. The same > error also popped up in Google search under mod_python [2]. As others have pointed out, this isn't an

Re: Proposal: Template block for submit buttons in admin's change_form.html

2008-10-27 Thread andybak
I remember seeing a couple of places where some extra template blocks could help with extending the admin (object-tools springs to mind). What are the pro's and con's of adding a sprinkling of new blocks? On Oct 25, 5:14 pm, suuntala <[EMAIL PROTECTED]> wrote: > G'day all, > > After a quick searc

Re: Denormalisation Magic, Round Two

2008-10-27 Thread Andrew Godwin
Russell Keith-Magee wrote: > I do have a slight reservation regarding the API you are proposing. > The fields you have proposed (MirrorField and AggregateField) capture > the obvious use cases, but the syntax don't feel consistent with the > rest of the Django API. In particular, AggregateField se

Re: "OperationalError: database is locked" with Python 2.6 multiprocessing and SQLite backend

2008-10-27 Thread Ned Batchelder
I wouldn't expect SQLite to do well in a multi-process environment. Concurrency is SQLite's weak point, which makes sense given its heritage as an embedded database. --Ned. http://nedbatchelder.com mrts wrote: > It seems that current DB lock management doesn't play nice with the > new Python

Re: Denormalisation Magic, Round Two

2008-10-27 Thread Russell Keith-Magee
On Mon, Oct 27, 2008 at 8:05 AM, Andrew Godwin <[EMAIL PROTECTED]> wrote: > > class User(models.Model): >username = models.CharField(max_length=255) >email = models.TextField() >num_photos = models.AggregateField("Photo", "fk:user", "count") >num_all_photos = models.AggregateField(

Re: Alternate ForeignKey based on choices

2008-10-27 Thread David Cramer
What you're wanting is a GenericForeignKey. Check out the django.contrib.contenttypes documentation. On Oct 26, 9:48 am, "Calvin Spealman" <[EMAIL PROTECTED]> wrote: > You could also have a common parent class for Robot and User, and use that > as your foreign key type. Which type is referenced w