Re: Django-RDF

2008-05-10 Thread vivacarlie
this looks pritty cool! On May 10, 6:19 am, stefan <[EMAIL PROTECTED]> wrote: > Hi there fellow Django enthusiasts, > > My name is Stefan, I'm a tech type like probably all of you, and I'm > based in Iceland for the time being. This is my first post here, > although, I've been lurking on django-d

Re: QuerySet.update improvement.

2008-05-10 Thread [EMAIL PROTECTED]
Tonight I will spend some time and write up a few test cases. On May 10, 10:26 am, Sebastian Noack <[EMAIL PROTECTED]> wrote: > I already implemented it as discussed with Russell. See the ticket. But > thanks for the tip with the __radd__. I didn't knew __radd__, but I > will still implement it.

Re: DatabaseFeatures reflecting version of underying SQL server

2008-05-10 Thread Peter Melvyn
On 10 Kvě, 18:08, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > > Is there a way the DatabaseFeatures would supply different values for > > different versions of configured SQL server? > > This question fits better on the user's list, I believe.   This question is related to ticket #3030, because

Re: Multi-Table Inheritance and fixtures

2008-05-10 Thread AmanKow
Above, I said: > I notice that child instances have an undocumented save_base method, > which I assume is called from the child's save. I wonder if it might > not be useful to have some way (r.save(exclude_parent=True) or some > such thing) in order to save the child record only. But I didn't ex

Re: Multi-Table Inheritance and fixtures

2008-05-10 Thread AmanKow
I've been hooking up child instances with existing parent instances without problem, which seems entirely similar: class Place(models.Model): name = models.CharField(max_length=50) address = models.CharField(max_length=80) class Restaurant(Place): serves_hot_dogs = models.BooleanFiel

Re: DatabaseFeatures reflecting version of underying SQL server

2008-05-10 Thread Karen Tracey
On Sat, May 10, 2008 at 1:33 AM, Peter Melvyn <[EMAIL PROTECTED]> wrote: > Is there a way the DatabaseFeatures would supply different values for > different versions of configured SQL server? > This question fits better on the user's list, I believe. FWIW I don't know the answer and don't have t

Re: UNIQUE in PK declaration of refactored OneToOneField

2008-05-10 Thread Karen Tracey
On Sat, May 10, 2008 at 1:30 AM, Peter Melvyn <[EMAIL PROTECTED]> wrote: > I notices that refactored OneToOneField creates artificial primary key > as UNIQUE, whereas all other primary keys generated by Django omits > such declaration, because it is inherent (at least on MySQL) > > Setting kwargs[

Re: QuerySet.update improvement.

2008-05-10 Thread Sebastian Noack
I already implemented it as discussed with Russell. See the ticket. But thanks for the tip with the __radd__. I didn't knew __radd__, but I will still implement it. Btw, I still have to implement the Expression stuff into Query.add_filter to support filter() and exclude(), as proposed by Russel an

Re: QuerySet.update improvement.

2008-05-10 Thread [EMAIL PROTECTED]
Doh, Sean got there before me, __radd__ (and the other operations) handle the reverse situation: http://dpaste.com/49224/ - example. Looks like very cool stuff. I would recommend writing tests first, based on what should happen(not necessarily what does), and then continue with the code however.

Re: QuerySet.update improvement.

2008-05-10 Thread Sean Legassick
On 10 May 2008, at 14:47, Sebastian Noack wrote: > You can still do model.objects.update(foo=42) with my patch, because > of 42 is casted to a LiteralExpr under the hood. I could even make it > possible to do model.objects.update(foo=CurrentExpr() + 42). But there > is no way to enable model.obje

Re: QuerySet.update improvement.

2008-05-10 Thread Russell Keith-Magee
On Sat, May 10, 2008 at 9:47 PM, Sebastian Noack <[EMAIL PROTECTED]> wrote: > On Sat, 10 May 2008 20:36:14 +0800 > "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: >> * I don't see why LiteralExpr is required. Surely a literal should >> continue to work as is; if a literal is involved in an expres

Re: On aggregates

2008-05-10 Thread Russell Keith-Magee
On Sat, May 10, 2008 at 2:37 PM, Nicolas Lara <[EMAIL PROTECTED]> wrote: > > Hello, > The choice of using Decimal was not mine but that of the modules that > connect to the backends (postgres in this case), and this is one of > the problems I am facing right now. Different backends return the > re

Re: QuerySet.update improvement.

2008-05-10 Thread Sebastian Noack
On Sat, 10 May 2008 20:36:14 +0800 "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > The basic idea that you are proposing has been made before - for > example, several of the discussions about adding aggregations to the > ORM have included a capability similar to the one you propose. > However, t

Re: QuerySet.update improvement.

2008-05-10 Thread Russell Keith-Magee
On Sat, May 10, 2008 at 5:48 PM, Sebastian Noack <[EMAIL PROTECTED]> wrote: > Hi, > > I think QuerySet.update works to inflexible. In SQL you can define > expressions containing the current value or the value of an other > column in the update clause, for Example to incrementing a value in the > r

Django-RDF

2008-05-10 Thread stefan
Hi there fellow Django enthusiasts, My name is Stefan, I'm a tech type like probably all of you, and I'm based in Iceland for the time being. This is my first post here, although, I've been lurking on django-devel for awhile. I started working with Django in fall 2006 and I've been playing with P

QuerySet.update improvement.

2008-05-10 Thread Sebastian Noack
Hi, I think QuerySet.update works to inflexible. In SQL you can define expressions containing the current value or the value of an other column in the update clause, for Example to incrementing a value in the result set. This is not possible by the ORM at the moment. I developed a possible soluti

Re: Automatically add project path to sys.path for all handlers

2008-05-10 Thread Andrei
I know what you are saying about code protection, but in the case of a site hosted on some hosting server you don't have much options. I admit I'm not aware of mod_python internals, I've just use it this as an example to illustrate my idea for an easier deployment. It doesn't have to be in the f

Re: On aggregates

2008-05-10 Thread Nicolas Lara
If I understand correctely you are trying to do something like: "Give me the and the sum of the financial transactions of type 'M' between a given date range for each contract ordered by id and short title)" Is that the kind of aggregate you needed? This could be expressed as: c = Contract.obj