Re: Start of week in Admin's calendar

2006-03-12 Thread Adrian Holovaty
On 3/9/06, Ivan Sagalaev <[EMAIL PROTECTED]> wrote: > I was porting javascript calendar from Admin into my application and > enhanced it a bit with new boolean pref switching start of week to > Monday. To submit this to Django I want to hook this pref somehow to > i18n settings but have no idea wh

Re: Another bug in delete

2006-03-12 Thread Adrian Holovaty
On 3/4/06, Luke Plant <[EMAIL PROTECTED]> wrote: > Would Adrian or Jacob or someone like to comment on the original usage > of __import__ and whether this patch is OK? An alternative way to do > the imports is this: > __import__(app_name, '', '', ['models']).models > and that also seems to w

Re: Magic Removal: overriding the save function/setting a site-id automatically

2006-03-12 Thread Adrian Holovaty
On 3/5/06, Ian Holsman <[EMAIL PROTECTED]> wrote: > One of the things I have in my model is the 'site' which is a foreign > key to the Site model. > > now I'd like this field to be invisible to the rest of the > application. I've got the retrieval function going via the manager > model.. which wor

Validation-aware models: First stab

2006-03-12 Thread Adrian Holovaty
Just got back from a week-long Hawaii vacation, so I'm getting back into the Django groove. Earlier today I committed the first stab at validation-aware models on the magic-removal branch: http://code.djangoproject.com/changeset/2518 Here's how it works: * Model instances have a validate() meth

Re: Dynamic DB API Lookups

2006-03-12 Thread Russell Keith-Magee
On 3/13/06, tomass <[EMAIL PROTECTED]> wrote: Which is clunky but works okay, but what about if I have three other ifstatements for other variables? Do I nest those in, or is there someway to create a list or dictionary that holds all my lookup variables (let's call it lookup_variables) and then I

Dynamic DB API Lookups

2006-03-12 Thread tomass
Hi Folks, Is it possible to have dynamic db api lookups? In other words, I want to be able to generate a get_list statement conditionally based on some user options. For example: Here's what I'm currently doing: if status: object_list = logs.get_list( timestamp__year = d.yea

Re: Unbundling the ORM

2006-03-12 Thread David Pratt
Hi Armin. I have worked with Django's ORM without the rest of Django. There is no reason you cannot use it this way, particularly with magic removal without the need to bundle as a separate product. I had also once thought of a simple repackaging prior magic removal. Fact is, you can just impo

Unbundling the ORM

2006-03-12 Thread Armin Ronacher
The django ORM is the best out there. The only problem is that it's only working from inside django. There is a ticket for that: http://code.djangoproject.com/ticket/1321 and a discussion here: http://groups.google.com/group/django-developers/browse_thread/thread/5b590b5487e500c1/c0f0d30cec89b107

Re: Automatically generate input type="password" for security-sensitive fields?

2006-03-12 Thread gabor
James Bennett wrote: > Someone in the IRC channel tonight was asking why the built-in User > model, when rendered by formfields, doesn't render the password field > as an input of type "password", and it struck me that this is a good > question, because there are plenty of use cases where you'd wa