Re: cache.get_or_set()

2007-01-31 Thread James Bennett
On 1/31/07, Joseph Perla <[EMAIL PROTECTED]> wrote: > Along the lines of get_or_create(), does it make sense to implement a > get_or_set() function for quick caches? I'm not sure I see the use case here; it only works when the code to calculate the expensive value can be fit into a single

Re: Django ORM bug when your app has a model named "ContentType"?

2007-01-31 Thread Brian Beck
Rob Hudson wrote: >> Django has a builtin type called "ContentType", >> http://code.djangoproject.com/browser/django/trunk/django/contrib/con... >> >> I'd just rename yours to something else and be done with it. > > As a workaround, sure. I've already worked around the issue. > > But I don't

Re: Django ORM bug when your app has a model named "ContentType"?

2007-01-31 Thread Jay Parlar
On 1/31/07, Rob Hudson <[EMAIL PROTECTED]> wrote: > > > Django has a builtin type called "ContentType", > > http://code.djangoproject.com/browser/django/trunk/django/contrib/con... > > > > I'd just rename yours to something else and be done with it. > > As a workaround, sure. I've already worked

Re: Django ORM bug when your app has a model named "ContentType"?

2007-01-31 Thread Rob Hudson
> Django has a builtin type called "ContentType", > http://code.djangoproject.com/browser/django/trunk/django/contrib/con... > > I'd just rename yours to something else and be done with it. As a workaround, sure. I've already worked around the issue. But I don't think Django would want this

looking for a django contractor (Chicago area)

2007-01-31 Thread Kumar McMillan
Dear Djangoists, the company I work for is looking for a new contractor to work on a "phase 2" of a django app now in production. You are the captain of the ship but will be working alongside a team of pythonists and rubyists, a handful of whom will be available to conduct code reviews. _

Re: Django ORM bug when your app has a model named "ContentType"?

2007-01-31 Thread Jay Parlar
On 1/30/07, Rob Hudson <[EMAIL PROTECTED]> wrote: > > I'm getting a weird bug here and this is what I've deduced... > > I've got a "Page" model and a "Content" model. Content has a FK to > Page. I also have a "ContentType" model and Content has a FK to > ContentType. This is where I tell it if

Re: A question related to URLConf, Reverse URL, etc...

2007-01-31 Thread [EMAIL PROTECTED]
Ah, ok.. I understand a little better now what you are trying to do. I definitely agree that a solution to this would be a useful addition; I would only advocate for considering the "request.stem" method instead. As with your patch, it is completely backwards-compatible and works with nested

Re: A question related to URLConf, Reverse URL, etc...

2007-01-31 Thread medhat
Well, Matt and Adrian closed the ticket with some similar argument. But I respectfuly disagree :-) In muramas example above, (r'^news/', 'myproject.apps.news.urls', {'stem':'news'}) this does not solve my problem, because in my case (assuming that this pattern is in an included urls.py) the

Re: unicode issues in multiple tickets (#952, #1356, #3370) and thread about Euro sign in django-users

2007-01-31 Thread Michael Radziej
Hi, A few days ago, I wrote: > I see three ways to fix the problem in #3370: > > a) newforms stops passing unicode strings to the Database API and uses > bytestrings. > > b) the database wrapper in Django sets connection.charset (but needs to > translate the charset name since the databases

Re: A question related to URLConf, Reverse URL, etc...

2007-01-31 Thread [EMAIL PROTECTED]
I actually wrote a patch yesterday to solve the same problem, but for different reasons (and using a different method). From my perspective, the larger problem that access to the URL 'stem' can solve is to decouple apps from projects, making it much easier to write relocatable, "drop-in"

Re: Django Builbot (was: dbsync for mysql lacks...)

2007-01-31 Thread Marc Fargas Esteve
Hi, inline On 1/31/07, Matthew Flanagan <[EMAIL PROTECTED]> wrote: > The Django buildbot slave is currently running inside a Solaris 10 > zone so it is virtualized...kind of. > > Let me clarify that testing python 2.3 and 2.4 would require a > separate buildbot master than pybots unless you can

Re: Dynamic choices for newforms?

2007-01-31 Thread Honza Král
Hi, see ticket http://code.djangoproject.com/ticket/3257 it conatins a ModelChoiceField, that does a bit more - it also returns a valid object, not just the ID the ticket has been accepted I am only waiting for decision on whether to prepend an empty choice ("", "--") or any suggestion on