order_with_respect_to bug

2006-10-12 Thread Milton Waddams
All my bug reports get classified as spam, so please accept this via email. There's a bug with the order_with_respect_to in that it uses count(*) to determine the value of _order, this works well until you delete more than one object from the middle of the list... in which case a new item which s

Re: [Fwd: Re: more fun with custom fields]

2006-10-12 Thread Bryan L. Fordham
>This is exactly the sort of change I was thinking of (note that it took >exactly two lines :-) ). Not sure if it covers all cases at the moment, >but you're definitely on the right track. > > heh yeah, I did notice it was two lines. And it probably does not handle all the cases since I'm self

Re: [Fwd: Re: more fun with custom fields]

2006-10-12 Thread Malcolm Tredinnick
Hey Bryan, On Thu, 2006-10-12 at 20:29 -0400, Bryan L. Fordham wrote: > forwarding to dev list from -users, since it fits dev better Yes, probably does now. [...] > > ok, I made this change to the Model.__init__() method. at the very end: > > > > for i, arg in enumerate(args): > > +

Re: Extract HTML code from FormFields to Templates

2006-10-12 Thread Malcolm Tredinnick
On Sat, 2006-10-07 at 15:40 -0700, Pascal Bach wrote: > Hallo. I have noticed that in the django forms classes, for example > django.forms.TextField there is HTML code embedded into the Python > code. I thougt about extracting all this code to Django Templates. > But since I don't know if this is

Re: greater_than and less_than template filters

2006-10-12 Thread Adam Kelly
For the first three, it would be simpler (and I guess faster) to do: (I haven't tested this, but it should work.) from django import template import operator register = template.Library() register.filter( 'mul', operator.mul ) register.filter( 'add', operator.add ) register.filter( 'div',

[Fwd: Re: more fun with custom fields]

2006-10-12 Thread Bryan L. Fordham
forwarding to dev list from -users, since it fits dev better the original thread: http://groups.google.com/group/django-users/browse_thread/thread/fdc940db9fd9d7a0/4a966c68c0036854?lnk=raot --B --~--~-~--~~~---~--~~ You received this message because you are subsc

Re: Find the Cookie owner

2006-10-12 Thread Ned Batchelder
You'll probably find it much easier to use Django to serve those static files, rather than trying to duplicate Django functionality in modpython. --Ned. Mario Gonzalez ( mario__ ) wrote: Hi, I'm writing a code for a media server and I want to serve static files to authenticated users only

Find the Cookie owner

2006-10-12 Thread Mario Gonzalez ( mario__ )
Hi, I'm writing a code for a media server and I want to serve static files to authenticated users only. I check against Django's session table (django_session) and that's ok (IMO) but in session_data there isn't the userid and I need it for security reasons; So I sent you what I'm doing so far and

Re: greater_than and less_than template filters

2006-10-12 Thread Waylan Limberg
On 10/11/06, Le Roux Bodenstein <[EMAIL PROTECTED]> wrote: > > I wrote some filters On 10/12/06, Tim <[EMAIL PROTECTED]> wrote: > > Here are some simple math functions that we found useful for templates > as well: > Both of you should post those in the cookbook [1] on the wiki so they don't get

Re: greater_than and less_than template filters

2006-10-12 Thread Tim
Here are some simple math functions that we found useful for templates as well: from django import template register = template.Library() @register.filter() def mul(value, arg): return value * arg @register.filter() def add(value, arg): return value + arg @register.filter() de

looking for a django partner

2006-10-12 Thread flexdeveloper
Hi, I'm an application developer ( front end, presentation tier stuff ) who has recently learned and fell in love with python. I've been creating software for other ppl for many years and I'd like to start my own company. If you are a like minded python or django developer feel free to contac

Extract HTML code from FormFields to Templates

2006-10-12 Thread Pascal Bach
Hallo. I have noticed that in the django forms classes, for example django.forms.TextField there is HTML code embedded into the Python code. I thougt about extracting all this code to Django Templates. But since I don't know if this is useful I wanted to ask you. I see the following pros/cons. Pr

Adding Polls to admin

2006-10-12 Thread JGP
I am having difficulty getting the Polls or any information to show in the admin while following the tutorial (2) on the django web site. I have re-installed the tables and verified the code. Any thoughts? Thank you, Josh --~--~-~--~~~---~--~~ You received this

Re: attribute__isnull=True vs attribute__exact=None (Ticket 2737)

2006-10-12 Thread Michael Radziej
Russell Keith-Magee: > Sorry - I'm confused; Are you agreeing with the proposed change, or > saying it contradicts your expectations? (I think you are agreeing - I > just want to make sure) My highest preference is to make __exact=None behave like WHERE xxx=NULL, i.e. returning an empty set, aga

Re: Re: attribute__isnull=True vs attribute__exact=None (Ticket 2737)

2006-10-12 Thread Russell Keith-Magee
On 10/12/06, Michael Radziej <[EMAIL PROTECTED]> wrote: > > Russell Keith-Magee schrieb: > > Ticket 2737 requests a feature where __exact=None would be interpreted > > as __isnull=True. This would fix all three problems I have described. > > The proposed patch isn't correct, but I feel the idea is

Re: attribute__isnull=True vs attribute__exact=None (Ticket 2737)

2006-10-12 Thread Michael Radziej
Russell Keith-Magee schrieb: > Ticket 2737 requests a feature where __exact=None would be interpreted > as __isnull=True. This would fix all three problems I have described. > The proposed patch isn't correct, but I feel the idea is valid. My brain has been wired in SQL mode, perhaps for too long