Re: Reverse URL lookup implementation

2006-04-06 Thread Eugene Lazutkin
limodou wrote: >> >> As soon as it matures let's create a repository for reusable Django apps. > > Wow, another amazing idea. This is actually how it all started. Many people in Django community implemented really good applications (hugo, sune, limodou, ...) but in order to reuse them we have

Re: Reverse URL lookup implementation

2006-04-06 Thread limodou
On 4/7/06, Eugene Lazutkin <[EMAIL PROTECTED]> wrote: > > Finally! :-) > > Adrian Holovaty wrote: > > On the plane from London to Chicago yesterday, I implemented something > > that's been discussed on this list lately -- "reverse" URL creation. > > On conceptual level it looks similar to what I s

Re: Reverse URL lookup implementation

2006-04-06 Thread Eugene Lazutkin
Finally! :-) Adrian Holovaty wrote: > On the plane from London to Chicago yesterday, I implemented something > that's been discussed on this list lately -- "reverse" URL creation. On conceptual level it looks similar to what I started to implement for my site with a small insignificant differen

Re: Reverse URL lookup implementation

2006-04-06 Thread Adrian Holovaty
On 4/6/06, limodou <[EMAIL PROTECTED]> wrote: > Great! But whether the syntax can be more easier when we used it in > views or other source code? I think the tag used in template is simple > enough. Maybe be there should be an easy helper function like `link` > to do that. Just like: > > >>> from

Re: Reverse URL lookup implementation

2006-04-06 Thread limodou
On 4/7/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > On the plane from London to Chicago yesterday, I implemented something > that's been discussed on this list lately -- "reverse" URL creation. > > I've attached a new urlresolvers.py to this e-mail. It's intended to > replace the one in django

Re: Reverse URL lookup implementation

2006-04-06 Thread Max Battcher
On 4/6/06, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote: > That way if you set up your URLconfs in a logical manner -- I'd bet > 90% of my urlconfs already work this way -- the shortcut version > would Just Work™. Unfortunately the Generic Views don't fit this too well... 'object_id' is not 'id'.

Re: Reverse URL lookup implementation

2006-04-06 Thread Jacob Kaplan-Moss
I just had another thought on this: On Apr 6, 2006, at 3:24 PM, Adrian Holovaty wrote: > Ideally there'd be a template-tag interface to this. Something like: > > {% link 'path.to.month_view' 2005 'apr' %} > {% link 'path.to.person_view' state='il' name='adrian' %} One thing we could do -

Re: Reverse URL lookup implementation

2006-04-06 Thread Jacob Kaplan-Moss
On Apr 6, 2006, at 3:24 PM, Adrian Holovaty wrote: > On the plane from London to Chicago yesterday, I implemented something > that's been discussed on this list lately -- "reverse" URL creation. Wow. This is frickin' amazing, Adrian; it's exactly what I kept trying to come up with and couldn't

Re: Reverse URL lookup implementation

2006-04-06 Thread Ivan Sagalaev
Adrian Holovaty wrote: >Ideally there'd be a template-tag interface to this. Something like: > >{% link 'path.to.month_view' 2005 'apr' %} >{% link 'path.to.person_view' state='il' name='adrian' %} > > It's unbelievable :-). I was thinking about it just 15 minutes ago but only with 'ur

Reverse URL lookup implementation

2006-04-06 Thread Adrian Holovaty
On the plane from London to Chicago yesterday, I implemented something that's been discussed on this list lately -- "reverse" URL creation. I've attached a new urlresolvers.py to this e-mail. It's intended to replace the one in django/core, and it works with magic-removal only. (To use it with tru

Re: Connection pooling

2006-04-06 Thread Ivan Sagalaev
JP Farias wrote: >Hmmm... Some question come to my mind now... > >1. Does django uses only one connection for the whole process? > >2. Does it open and close a connection once for every request? > > The second is true. >3. Can django handle many requests at once (multi-threaded or something >e

Re: ReverseSingleRelatedObjectDescriptor and limit_choices_to

2006-04-06 Thread Luke Plant
On Thursday 06 April 2006 17:38, Michael Radziej wrote: > Hi, > > About magic-removal--I have defined a ForeignKey? with > limit_choices_to for, say, "somefield". Now, when I do: > > someobject.somefield > > the resulting query to the related object does not use this > limitation. Shouldn't it do

ReverseSingleRelatedObjectDescriptor and limit_choices_to

2006-04-06 Thread Michael Radziej
Hi, About magic-removal--I have defined a ForeignKey? with limit_choices_to for, say, "somefield". Now, when I do: someobject.somefield the resulting query to the related object does not use this limitation. Shouldn't it do this? Hmm, this is a "how is it supposed to work" question, so I'd li

Re: Connection pooling

2006-04-06 Thread JP Farias
Hmmm... Some question come to my mind now... 1. Does django uses only one connection for the whole process? 2. Does it open and close a connection once for every request? 3. Can django handle many requests at once (multi-threaded or something else)? -- JP --~--~-~--~~---

Re: Connections not being closed in m-r

2006-04-06 Thread Seth Falcon
"Istvan Albert" <[EMAIL PROTECTED]> writes: >> I don't understand how the traceback module ends up being None > >> Adding a check for None will make the warning message go away > > fixing up code to make a mysterious error message go away is vey very > suboptimal (ok ... so I've done I it myself a