Proposal: Allow LOGIN_URL to be a callable

2009-10-14 Thread Ulrich Petri
Hi, in some projects I've had to interface with external authentication sources that did expect the return-to URL in other formats than "% (LOGIN_URL)s?%(redirect_field_name)s=%(url)s" (In one specific case it was, e.g. required that the return URL had to be base64 encoded). AFAIK there are curr

Re: lazy auth context processor

2009-10-14 Thread Luke Plant
On Wednesday 14 October 2009 15:54:25 Russell Keith-Magee wrote: > > * the output of {{ user }} in a template will be different. I > > think this is acceptable, because only things like {{ > > user.username }} are actually useful, apart from when debugging. > > I disagree. User.__unicode__() r

Re: Patch: adding a msg parameter to assertContains and similar methods in the test client

2009-10-14 Thread Russell Keith-Magee
On Wed, Oct 14, 2009 at 11:00 PM, Christian Oudard wrote: > > I'm a bit green on doing documentation, but I'll give it a try. I'll > probably have to post a documentation patch and get some feedback a > few times before it's correct. Should I mark it as changed in version > 1.2 like this? > > ..

Re: Patch: adding a msg parameter to assertContains and similar methods in the test client

2009-10-14 Thread Christian Oudard
I'm a bit green on doing documentation, but I'll give it a try. I'll probably have to post a documentation patch and get some feedback a few times before it's correct. Should I mark it as changed in version 1.2 like this? .. versionchanged:: 1.2 On Oct 12, 7:36 pm, Russell Keith-Magee wrote:

Re: lazy auth context processor

2009-10-14 Thread Russell Keith-Magee
On Wed, Oct 14, 2009 at 8:24 PM, Luke Plant wrote: > > I want to fix #6552 (also #12031), and I've attached a patch that > makes the auth context processor lazy. > > I'm pretty sure this is the right thing to do, but I'd like to check > for any gotchas people might be aware of. I can't see any o

Re: lazy auth context processor

2009-10-14 Thread Paul McLanahan
On Wed, Oct 14, 2009 at 10:34 AM, Jacob Kaplan-Moss wrote: > Eh, I don't think it's a big deal. I just grepped through a *lot* of > Django code and can't find that use anywhere. So now I know I'm an edge case :) I do use that, but only because I'm using a proxy model for User and I've overridden

Re: lazy auth context processor

2009-10-14 Thread Luke Plant
On Wednesday 14 October 2009 15:32:11 Jacob Kaplan-Moss wrote: > On Wed, Oct 14, 2009 at 7:24 AM, Luke Plant wrote: > > I want to fix #6552 (also #12031), and I've attached a patch that > > makes the auth context processor lazy. > > The patch looks good to me. The approach is a bit hard to foll

Re: lazy auth context processor

2009-10-14 Thread Jacob Kaplan-Moss
On Wed, Oct 14, 2009 at 7:30 AM, Alex Gaynor wrote: > I think changing the result of {{ user }} in the template is a bad > idea. Eh, I don't think it's a big deal. I just grepped through a *lot* of Django code and can't find that use anywhere. > Luckily it can easily be solved by adding an __un

Re: lazy auth context processor

2009-10-14 Thread Jacob Kaplan-Moss
On Wed, Oct 14, 2009 at 7:24 AM, Luke Plant wrote: > I want to fix #6552 (also #12031), and I've attached a patch that > makes the auth context processor lazy. The patch looks good to me. The approach is a bit hard to follow what with the multiple types of lazyness involved, but it makes enough

Re: Session/cookie based messages (#4604)

2009-10-14 Thread Jacob Kaplan-Moss
On Tue, Oct 13, 2009 at 11:13 PM, Paul McLanahan wrote: > I took what Jacob said to be the opposite. It sounded to me like he > was suggesting that we keep the existing user messaging api, but > change the internals of it to use the new notifications framework for > storage. In my head it goes so

Re: lazy auth context processor

2009-10-14 Thread Alex Gaynor
On Wed, Oct 14, 2009 at 8:24 AM, Luke Plant wrote: > > I want to fix #6552 (also #12031), and I've attached a patch that > makes the auth context processor lazy. > > I'm pretty sure this is the right thing to do, but I'd like to check > for any gotchas people might be aware of. > > Some behaviour

Re: #7539 Add ON DELETE and ON UPDATE support

2009-10-14 Thread Jani Tiainen
Well we put that piece of code in test quite soon and see does it help or not. And if some problems arises in big deletes. Usually it's just something like that you can't delete row from type table if it's in use. Michael Glassford kirjoitti: > > > Jani Tiainen wrote: >> Michael Glassford ki

lazy auth context processor

2009-10-14 Thread Luke Plant
I want to fix #6552 (also #12031), and I've attached a patch that makes the auth context processor lazy. I'm pretty sure this is the right thing to do, but I'd like to check for any gotchas people might be aware of. Some behavioural changes: * user.get_and_delete_messages() will not be run

Re: #7539 Add ON DELETE and ON UPDATE support

2009-10-14 Thread Michael Glassford
Jani Tiainen wrote: > Michael Glassford kirjoitti: >> >> Alex Gaynor wrote: >> >>> Can you upload it with a .diff extension so we can get proper code >>> highlighting on trac. >>> >>> Alex >>> >> Sorry. Done. > > I did a quick look and what I understand now it only supports client > side on_de