Re: Ticket #5025 - truncate filter, why hasn't it been accepted?

2009-12-30 Thread Bas van Oostveen
flo...@gmail.com wrote: > I have a custom filter that does just this that I use in virtually > every single Django project I use. It's such a common pattern that it > seems almost silly not to have it included in core. It's also small > enough that it won't add much in the way of maintenance.

Re: compressed fixture support

2008-09-19 Thread Bas van Oostveen
I agree with Russ Magee's feeling. For compression you should just use pipes, you already pipe the output to a file, you should also pipe it through a compress app. An -c,--compress option does not make any sense without an accompanying -o,--output-file option as well. Though i'm +1 on having

Re: Proposal: `create_or_update` method on query sets, managers, and related managers.

2008-09-12 Thread Bas van Oostveen
Most of the times i have some extra condition in there. if not created and modified>instance.modified: for key, value in defaults_dict.items(): setattr(instance, key, value) instance.save() Now this extra clause can be fairly arbitrary. A generic piece of code could check if there's

css includes in class Admin like js = ()

2007-02-27 Thread Bas van Oostveen
Hi Guys, In semi-response to wonderfull things like Upcoming changes to the Django admin :) How about having something similar as the js tuple for css styles ? A usecase could be the admin fields for a model, there u can declare something like: fields = ( (None, {