Re: #12012 Logging: request for comments

2010-09-26 Thread mattimust...@gmail.com
On Sep 25, 7:46 pm, Antoni Aloy wrote: > > One last doubt, perhaps offtopic I have read logging module is slow, > good enough for 90% of applications but for the rest. Actually is > enough for me, but I can't see  to deal with log on big systems > Hi, If you are concerned about logging perfor

Proposal: Meta.required_together

2010-09-26 Thread Yo-Yo Ma
You don't require health profiling information, but if they enter any, they must enter it all. Currently, the pattern is something like: def clean(self): if any((self.weight, self.height)) if not all((self.weight, self.height)) raise ValidationError("Uh oh!") My proposal

Re: Application, tempaltetags and namespace

2010-09-26 Thread Russell Keith-Magee
On Mon, Sep 27, 2010 at 1:43 PM, Mathieu Leduc-Hamel wrote: > Hi all, > > I'm curious to know if it's planned in the future to force the use of > the complete name of the applications and the templatestags. I'll > explain myself. > > Imagine you have an application called > > hello.world > > with

Application, tempaltetags and namespace

2010-09-26 Thread Mathieu Leduc-Hamel
Hi all, I'm curious to know if it's planned in the future to force the use of the complete name of the applications and the templatestags. I'll explain myself. Imagine you have an application called hello.world with the following structure: hello.world/ setup.py hello/ world/ ...

Re: #12991 Adding support for unittest2: request for review

2010-09-26 Thread Russell Keith-Magee
On Monday, September 27, 2010, Chuck Harmston wrote: > I just ran it on Python 2.4, 2.5, 2.6, and 2.7 with each of SQLite, MySQL, > and PostgreSQL on Debian with no problems. Awesome! Thanks for that, Chuck. Yours, Russ Magee %-) -- You received this message because you are subscribed to the

Re: Class based models

2010-09-26 Thread subs...@gmail.com
I may be dense but is this the functional equiv of cobtrib.comments get_model()? On Sep 26, 8:28 am, Klaas van Schelven wrote: > Hi all, > > I'm looking for a bit of input for making Django's apps a bit more > extendable, either by modifying Django or (preferably) by coming up > with a common lan

Re: #12991 Adding support for unittest2: request for review

2010-09-26 Thread Chuck Harmston
I just ran it on Python 2.4, 2.5, 2.6, and 2.7 with each of SQLite, MySQL, and PostgreSQL on Debian with no problems. Thanks for the work you put into this, Russell! On Sun, Sep 26, 2010 at 6:24 PM, Karen Tracey wrote: > I've run it on Python 2.4 & 2.5 (Ubuntu, sqlite DB) with no problems. > >

Re: #12991 Adding support for unittest2: request for review

2010-09-26 Thread Russell Keith-Magee
On Monday, September 27, 2010, Patrick Altman wrote: > > On Sep 26, 2010, at 7:44 PM, Russell Keith-Magee wrote: > >> On Mon, Sep 27, 2010 at 6:24 AM, Karen Tracey wrote: >>> I've run it on Python 2.4 & 2.5 (Ubuntu, sqlite DB) with no problems. >>> >>> I do have some feedback on the @skipIfDB add

Re: #12991 Adding support for unittest2: request for review

2010-09-26 Thread Patrick Altman
On Sep 26, 2010, at 7:44 PM, Russell Keith-Magee wrote: > On Mon, Sep 27, 2010 at 6:24 AM, Karen Tracey wrote: >> I've run it on Python 2.4 & 2.5 (Ubuntu, sqlite DB) with no problems. >> >> I do have some feedback on the @skipIfDB addition: I'd really like if this >> could be used to distinguis

Re: #12991 Adding support for unittest2: request for review

2010-09-26 Thread Alex Gaynor
On Sun, Sep 26, 2010 at 8:44 PM, Russell Keith-Magee wrote: > On Mon, Sep 27, 2010 at 6:24 AM, Karen Tracey wrote: >> I've run it on Python 2.4 & 2.5 (Ubuntu, sqlite DB) with no problems. >> >> I do have some feedback on the @skipIfDB addition: I'd really like if this >> could be used to distingu

Re: #12991 Adding support for unittest2: request for review

2010-09-26 Thread Russell Keith-Magee
On Mon, Sep 27, 2010 at 6:24 AM, Karen Tracey wrote: > I've run it on Python 2.4 & 2.5 (Ubuntu, sqlite DB) with no problems. > > I do have some feedback on the @skipIfDB addition: I'd really like if this > could be used to distinguish between the different MySQL storage backends. > From a very bri

Re: #12012 Logging: request for comments

2010-09-26 Thread Russell Keith-Magee
On Mon, Sep 27, 2010 at 4:28 AM, Vinay Sajip wrote: > On Sep 26, 2:16 pm, Florian Apolloner wrote: >> I am aware of those; but let's imagine a 3rd party library which has >> no idea what a request is. In my logs I still want to know the request >> (even if it's just for formatting purposes…); so

Re: #12991 Adding support for unittest2: request for review

2010-09-26 Thread Karen Tracey
I've run it on Python 2.4 & 2.5 (Ubuntu, sqlite DB) with no problems. I do have some feedback on the @skipIfDB addition: I'd really like if this could be used to distinguish between the different MySQL storage backends. >From a very brief look it seems like currently there are a bunch of tests ski

Re: #12012 Logging: request for comments

2010-09-26 Thread Vinay Sajip
On Sep 26, 2:16 pm, Florian Apolloner wrote: > I am aware of those; but let's imagine a 3rd party library which has > no idea what a request is. In my logs I still want to know the request > (even if it's just for formatting purposes…); so I am looking for a > way to attach request specific info t

Re: Something.is_live instead of implementation specific is_live settings

2010-09-26 Thread Yo-Yo Ma
Ok, understood. All I wanted was discussion (or dismissal by simple matter of reason as your latest reply and my subsequent new understanding of the dev server's relationship to an application implies) about my original post. The thread started out with Jacob basically saying, "there's your solutio

Re: #12012 Logging: request for comments

2010-09-26 Thread Florian Apolloner
On Sep 26, 4:13 pm, Jannis Leidel wrote: > On 26.09.2010, at 14:45, Florian Apolloner wrote: > Not sure I understand the problem, the app instances are initialized by the > app cache, at the same time as the proposed logging patch would import the > startup modules. Jupp, my mistake -- nevermin

Re: #12012 Logging: request for comments

2010-09-26 Thread Hanne Moa
On 25 September 2010 08:16, Russell Keith-Magee wrote: > At this point, I'm calling for feedback, particularly on the following: > >  * logging config as the last stage of settings loading. Is this the > right place? Can anyone think of a better place? Well naturally you can't log what happens in

Class based models

2010-09-26 Thread Klaas van Schelven
Hi all, I'm looking for a bit of input for making Django's apps a bit more extendable, either by modifying Django or (preferably) by coming up with a common language on top op Django. The main painpoint are extendable models. The idea of 'extendable' is that models from reusable apps can be extend

Re: proposal for lazy foreignkeys

2010-09-26 Thread Klaas van Schelven
Some more cases that would be important (not just ForeignKey): inheriting from the VirtualModel any kind of relationship to it (manytomany) ModelForms On Sep 25, 7:47 pm, Carl Meyer wrote: > Hi all, > > I've seen some level of interest in the idea of a lazy foreign key > (one whose target table

Re: proposal for lazy foreignkeys

2010-09-26 Thread Klaas van Schelven
Hi all, My 2 cents. I think the fact that you cannot have Foreign Keys link to specific models is a specific instance of a larger problem. It's currently not possible to make an app which has models with any kind of extended (subclassed) behavior. Say I create a tagging app. Now I might want to:

#12991 Adding support for unittest2: request for review

2010-09-26 Thread Russell Keith-Magee
Hi all, I've just uploaded a patch for #12991, adding support for unittest2 to Django. This is a very big patch (500kb, 12k lines). For this reason, I've uploaded the patch compressed. Trac won't allow attachments greater than 200k, and given past history, large diffs break Trac anyway. However,

Re: #12012 Logging: request for comments

2010-09-26 Thread Jannis Leidel
On 26.09.2010, at 14:45, Florian Apolloner wrote: > Hi, > > On Sep 25, 1:25 pm, Jannis Leidel wrote: >> Given the fact that the current implementation of the app cache does quite a >> few hoops to make it possible to implicitely import the models modules by >> iterating over INSTALLED_APPS, I'

Re: proposal for lazy foreignkeys

2010-09-26 Thread Hanne Moa
On 25 September 2010 19:47, Carl Meyer wrote: > 1. Reusable apps overuse GenericForeignKey. GFKs are inefficient and > smell bad. I seem to gradually be going away from GenericForeignKey and using "Glue"-models instead. App1, model1, is connected to App2, model2 via App3, Glue-model3, which has f

Re: #12012 Logging: request for comments

2010-09-26 Thread Florian Apolloner
Hi, On Sep 26, 2:55 pm, Russell Keith-Magee wrote: > Yes, there is, and the logging calls I've included in the patch on > #12012 make use of it. All the logging calls take an 'extra' parameter > which can be used to insert relevant context into the logging call, > and can be used in a custom form

Re: #12012 Logging: request for comments

2010-09-26 Thread Russell Keith-Magee
On Sun, Sep 26, 2010 at 8:45 PM, Florian Apolloner wrote: > Hi, > Another question that came into my mind, after reading > http://www.reddit.com/r/Python/comments/ddkal/django_vs_web2py_what_do_you_use_and_why/c0zmxqz > (actually the whole thread, but that's the relevant post): Is there an > easy

Re: #12012 Logging: request for comments

2010-09-26 Thread Florian Apolloner
Hi, On Sep 25, 1:25 pm, Jannis Leidel wrote: > Given the fact that the current implementation of the app cache does quite a > few hoops to make it possible to implicitely import the models modules by > iterating over INSTALLED_APPS, I'd like to propose to rather move the logging > initializati

Re: four NoSQL backends you want? :)

2010-09-26 Thread Russell Keith-Magee
On Sun, Sep 26, 2010 at 6:40 PM, Waldemar Kornewald wrote: > On Sun, Sep 26, 2010 at 6:54 AM, Russell Keith-Magee > wrote: >> Also, you say a "huge" amount of analysis -- at the moment, *any* >> analysis would be a step in the right direction. I haven't seen *any* >> summary of the features that

Re: four NoSQL backends you want? :)

2010-09-26 Thread Waldemar Kornewald
On Sun, Sep 26, 2010 at 6:54 AM, Russell Keith-Magee wrote: > On Sun, Sep 26, 2010 at 1:24 AM, Waldemar Kornewald > wrote: >> On Sep 25, 4:21 pm, Russell Keith-Magee >> wrote: >>> My reason for wanting this is that I'm simply not an expert in any of >>> these backends. I know SQL quite well, but

Re: Something.is_live instead of implementation specific is_live settings

2010-09-26 Thread Russell Keith-Magee
On Sunday, September 26, 2010, Yo-Yo Ma wrote: > I apologize Russell. There's been a gross understanding of what I was > asking. I'm not asking how to do "if settings.debug: x = y". I'm > asking for a way to set settings.debug to true dynamically without > having to rely on deployment specific iss