Re: Model validation incompatibility with existing Django idioms

2010-01-08 Thread koenb
On 8 jan, 10:03, James Bennett wrote: > Suppose I have a ModelForm and call save(commit=False) to get the > instance so I can do some more work on it. I'm basically saying to > Django "I don't think this object is ready to be saved yet, but I need > the object so I can do stuff to it". If Djang

Re: Help on solving ticket #2522 and #2470

2006-11-07 Thread koenb
I am also new at django. In my opinion the basic problem of 2522 is that the related object is referenced by the objects name instead of the related name. As a result two foreign keys to the same object get the same name. This reference is spread throughout related.py and other modules (like get_f

Re: django.contrib.formtools: High-level abstractions of common form tasks

2006-12-07 Thread koenb
Isn't it useful to allow two-step validation in general: one by the form and one by the model when saving (both optional of course). This would allow to add constraints to a form that are not needed by the model in general (interesting when using different forms on the same model eg for different

Custom permissions on proxy model no longer created in 1.4

2012-03-15 Thread koenb
Hi all, this could very well be one of those "don't do that" things, but here is my problem. I have been using some specific permissions concerning the auth user model, so I created a proxy model on user like this: class User(auth_models.User): class Meta: proxy = True perm

Re: Custom permissions on proxy model no longer created in 1.4

2012-03-15 Thread koenb
Op donderdag 15 maart 2012 11:52:42 UTC+1 schreef Aymeric Augustin het volgende: > > Le 15 mars 2012 10:27, koenb a écrit : > >> this could very well be one of those "don't do that" things, but here is >> my problem. >> >> I have been using so

Re: prefetch_related - new feature suggestion

2011-09-27 Thread koenb
On 27 sep, 05:18, Luke Plant wrote: > On 27/09/11 03:23, Alex Gaynor wrote: > > Would you like to share your solution? I found it pretty difficult to > come up with anything that: > > 1) could be done on a per-query basis and > 2) didn't require changes to the code that would use the QuerySet >

Re: Proposal: user-friendly API for multi-database support

2008-09-10 Thread koenb
Just to add a little note: back in May I did some work on multidb, some thoughts and some work can be found on http://trac.woe-beti.de/ , which Ben Ford set up for this. I stopped because django was becoming too much of a moving target to keep it in sync (and i did not have the time). I would lik

old sqlite versions

2009-01-24 Thread koenb
In ticket #10113 I signalled two problems. The first was almost immediately fixed by Russel (thanks!). For the second problem I added a specific testcase that was giving me wrong results. It concerns an annotated query with ordering on a foreign key that was not yet included in the query. Russel r

Re: More multi-database plumbing (WAS Re: Changing DatabaseWrapper._cursor() to take a dict instead of settings)

2009-03-13 Thread koenb
> My "nuts and bolts" document ... Hi Alex, about a year ago, I spent a few weeks working on multiple database support myself (building further on the code in ticket #4747). I used a mercurial trac setup by Ben Ford to store the work and some notes. It can be found at http://trac.woe-beti.de. (

Re: More multi-database plumbing (WAS Re: Changing DatabaseWrapper._cursor() to take a dict instead of settings)

2009-03-14 Thread koenb
> Is there any downside to checking this in immediately? It's a simple > enough change that I don't see it introducing any bugs (famous last > words, right?)... Please don't allow using connections from different database backends unless the problems of using the correct database options are reso

Re: Proposal for discussion about Serialization requirements and requesting for Review

2009-03-26 Thread koenb
On 26 mrt, 17:48, "Madhusudan C.S" wrote: > Hi all, > [snipped] I can't seem to find anything on the problem concerning contenttypes in your proposal (see [1] for some recent discussion). It would be nice to see that solved too, since it is one of the inconveniences that has bitten me several ti

Re: Patch vs checkin

2007-07-11 Thread koenb
Is there any news on updating the svn repo for this branch ? k --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To u

db2 backend

2007-07-11 Thread koenb
I am trying to create a django backend for DB2. I am trying to do this using a DB2 Express C and the pydb2 module. It is coming around quite nicely. I have the test suite down to 7 failures and 3 errors, but now I am a bit stuck. My biggest hurdle at this point is that DB2 does not have an easy

Re: Patch vs checkin

2007-07-13 Thread koenb
On 11 jul, 16:12, "Jacob Kaplan-Moss" <[EMAIL PROTECTED]> wrote: > On 7/11/07, Ben Ford <[EMAIL PROTECTED]> wrote: > > > None as yet, I'm really keen to get it back into the svn repo, but I think > > the people concerned are busy with other things at the moment. > > I've said this a couple times

Re: db2 backend

2007-07-13 Thread koenb
> I was, however, turned off by the state of pydb2 -- it looked like the > project hasn't been touched in years. You are right. I used the patch made by Javier Villavicencio (see [1]), which makes things somewhat better. I contacted him, and it seems he has a lot more improvements ready, but need

Re: runtests.py defaults

2007-07-16 Thread koenb
You might also mention the existence of "junction.exe" on windows (see [1]), which gives you more or less an equivalent of symlinks. Also very practical, and maybe not known by too many people. > Could you drop this into a wiki page, please. Give it a descriptive > title and it will show up easil

Re: db2 backend

2007-08-02 Thread koenb
I created a ticket with my efforts (#5052). There are still some issues to be solved though. Feedback is welcome. Koen --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this gro

i18n on Windows

2007-08-02 Thread koenb
[5722] fixed a problem from #4899 concerning make-messages.py. However, the fix caused problems for Windows users (empty po files are generated). Ramiro Morales provided a patch to the ticket that solves the problem (this has been acknowledged by several users in the ticket). Can someone take a

Re: Failing tests for fixtures with MySQL (#5399)

2007-09-13 Thread koenb
I am having a similar problem with a custom db2 backend I am working on too. Maybe it can be linked in the implementation to some backend flag (in the backends DatabaseFeatures) stating that deferred constraint checking is not (entirely) implemented ? This as opposed to hardcoding "mysql" in the t

Re: Failing tests for fixtures with MySQL (#5399)

2007-09-13 Thread koenb
Hey Mike, > To use Koen's example, he has not implement regex lookups yet, and he wishes > to tell the test not to fail as it simply not implemented. In my opinion the > test SHOULD fail because well the test is to see whether or not this feature > is implement, and its not. Now i'm not familiar

#689: using REMOTE_USER

2007-09-16 Thread koenb
I added a new patch to ticket 689. This one does not use settings (thanks Joseph Kocherhans). It combines the use of a middleware and an authentication backend to use the Remote_user information passed down by apache. This is usefull in intranets where you can use apache with mod_ntlm or mod_auth_

Re: On aggregates

2008-05-12 Thread koenb
If I understand it correctly, the aggregate and annotate ideas are result driven, not by the SQL that might be involved (which should indeed be entirely hidden). Aggregate normally gives one result, annotate gives you a bunch of objects, but with extra information PER object (normally from an aggr

Multiple database support

2008-05-20 Thread koenb
For those interested in multiple database support, I have started working on it again, and posted my work-in-progress to ticket #4747. I started from trunk and added things from the multidb branch little by little, since so much has changed in that area since then. There is still a lot more that

Re: Multiple database support

2008-05-20 Thread koenb
Ah, missed that one. Anyway, I only did the easy parts (that is, getting data in and out of existing databases). Thanks for the pointer, I'll try to keep an eye on that. Koen On 20 mei, 16:56, "Nicola Larosa (tekNico)" <[EMAIL PROTECTED]> wrote: > koenb wrote: >

Re: Multiple database support

2008-05-21 Thread koenb
I really like this line of thought: having the persistence layer of a model fixed is a good idea. Relations is a big issue here: unless we can support relations across databases, switching connections is always a big opportunity to shoot yourself in the foot. I would propose a function that can co

Re: Multiple database support

2008-05-23 Thread koenb
You need to be aware that this is quite complicated if your model has foreign keys in it: if you use the ORM to do queries, the ORM would have to be so smart as to when to split up your queries instead of doing joins. eg you have model A which foreign keys to a User model. For a row of A that is i

Re: Multiple database support

2008-05-28 Thread koenb
On 22 mei, 18:28, "Ben Ford" <[EMAIL PROTECTED]> wrote: > Hi all, > > I've now re-applied Daryls patch (which was against qsrf) to a clone of > django trunk in a mercurial repo. It's available > athttp://hg.woe-beti.deandthere's a trac set up for it > athttp://trac.woe-beti.de. Feel free to make