Re: Newforms suggestions - pre_clean? magic cleaned_data? - access to errors?

2007-08-13 Thread Malcolm Tredinnick
On Mon, 2007-08-13 at 23:51 -0500, Gary Wilson wrote: > Malcolm Tredinnick wrote: > > On Mon, 2007-08-13 at 18:00 -0700, sime wrote: > >> 1. Magic cleaned_data - So we can get/set values out of order and > >> before the clean() run, having themselves clean implicitly as > >> required. > > > > Can

Re: Newforms suggestions - pre_clean? magic cleaned_data? - access to errors?

2007-08-13 Thread Gary Wilson
Malcolm Tredinnick wrote: > On Mon, 2007-08-13 at 18:00 -0700, sime wrote: >> 1. Magic cleaned_data - So we can get/set values out of order and >> before the clean() run, having themselves clean implicitly as >> required. > > Can you give an example of what you mean here? I can't visualise what's

Re: Proposal: runserver --with-fixture

2007-08-13 Thread Malcolm Tredinnick
On Mon, 2007-08-13 at 21:28 -0700, Brian Harring wrote: > On Mon, Aug 13, 2007 at 04:31:42PM -0500, Adrian Holovaty wrote: > > So I was writing Django view unit tests and setting up fixtures with > > sample data, and it hit me -- wouldn't it be useful we made it easy to > > run the Django developm

Re: Proposal: runserver --with-fixture

2007-08-13 Thread Collin Grady
Brian Harring said the following: > 2) Adding functionality to automatically collect/serialize a stream of > interp. commands I think there might be some misunderstanding here - I believe he's saying to merely dump the fixture out again using the new database with changes - so if you start runse

Re: Proposal: runserver --with-fixture

2007-08-13 Thread Brian Harring
On Mon, Aug 13, 2007 at 04:31:42PM -0500, Adrian Holovaty wrote: > So I was writing Django view unit tests and setting up fixtures with > sample data, and it hit me -- wouldn't it be useful we made it easy to > run the Django development server with fixture data? > > I'm proposing a "--with-fixtur

GSoC Update: [Check Constraints] Datetime,Time,i18n support and PEP-8 Compliant

2007-08-13 Thread Thejaswi Puthraya
Hello Django Developers, Over the past week and half I have been working on adding support for the datetime and time fields and also adding support for i18n and making the code PEP-8 compliant. Now 'in' check condition is supported better Earlier if I used Check(tax_payment_date__in = (date(2

Re: Newforms suggestions - pre_clean? magic cleaned_data? - access to errors?

2007-08-13 Thread Collin Grady
Malcolm Tredinnick said the following: > On Mon, 2007-08-13 at 18:18 -0700, sime wrote: >> 6. Maybe allow clean_method=x in field parameters, rather than have to >> create a custom field or repeat similar clean functions. > > You can do that one in this fashion... > > class MyForm(Form)

Re: Maybe we need more triagers? Or something else?

2007-08-13 Thread Adrian Holovaty
On 8/13/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > I'm going to start another thread about this, because there are some > broader lessons, but at one point on the weekend I started keeping track > of what changes I had to make to "ready to commit" tickets. Somewhere > between 1 in 5 and 1

Re: Does SELECT 1 FROM... Work on SQL Server and Oracle?

2007-08-13 Thread Adrian Holovaty
On 8/13/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > That won't work, we have to back it out. > > > > The patch re-introduces "LIMIT 1". LIMIT is non-standard SQL and doesn't > > exist on Oracle (which was the reason for removing it in the first > > place). We can't do this. > > Looking m

Re: Maybe we need more triagers? Or something else?

2007-08-13 Thread Simon Greenhill
On Aug 14, 2:22 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > [...] > I'm going to start another thread about this, because there are some > broader lessons, but at one point on the weekend I started keeping track > of what changes I had to make to "ready to commit" tickets. Somewhere >

Re: Maybe we need more triagers? Or something else?

2007-08-13 Thread Malcolm Tredinnick
On Tue, 2007-08-14 at 02:03 +, SmileyChris wrote: > On Aug 14, 10:24 am, Gary Wilson <[EMAIL PROTECTED]> wrote: > > Oh, I forgot to mention something about possibly introducing a bug day. > > +1 > > Perhaps with an IRC channel for discussion? You definitely want a separate IRC channel. And

Re: Maybe we need more triagers? Or something else?

2007-08-13 Thread Malcolm Tredinnick
On Mon, 2007-08-13 at 17:03 -0500, Gary Wilson wrote: [...] > I stumbled upon bazaar's Bundle Buggy [1] the other day while reading > the Bazaar Core Developer Handbook [2]. Essentially, the way things > work is that patches are submitted via email (by sending to a mailing > list with special tex

Re: Proposal: runserver --with-fixture

2007-08-13 Thread Malcolm Tredinnick
On Mon, 2007-08-13 at 18:36 -0400, Todd O'Bryan wrote: > On Mon, 2007-08-13 at 16:31 -0500, Adrian Holovaty wrote: > > I'm proposing a "--with-fixture" flag to django-admin.py, so that you > > could do something like this: > > > > django-admin.py runserver --with-fixture=mydata.json > > > >

Re: Generic archive_month view and inclusive ranges

2007-08-13 Thread Malcolm Tredinnick
On Mon, 2007-08-13 at 17:59 -0500, James Bennett wrote: > On 8/13/07, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > Proposal #1 seems simpler, but this is not a strong opinion. :-) > > The only thing that's keeping me from posting a patch for this right > now with option 1 is a lingering doubt a

Re: Maybe we need more triagers? Or something else?

2007-08-13 Thread SmileyChris
On Aug 14, 10:24 am, Gary Wilson <[EMAIL PROTECTED]> wrote: > Oh, I forgot to mention something about possibly introducing a bug day. +1 Perhaps with an IRC channel for discussion? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: Newforms suggestions - pre_clean? magic cleaned_data? - access to errors?

2007-08-13 Thread Malcolm Tredinnick
On Mon, 2007-08-13 at 18:18 -0700, sime wrote: > Another one -- > > 6. Maybe allow clean_method=x in field parameters, rather than have to > create a custom field or repeat similar clean functions. You can do that one in this fashion... class MyForm(Form) field1 = ...

Re: Newforms suggestions - pre_clean? magic cleaned_data? - access to errors?

2007-08-13 Thread Malcolm Tredinnick
Hi Simon, On Mon, 2007-08-13 at 18:00 -0700, sime wrote: > Hello all, I have some suggestions for newforms, which I've condensed > into point form, excuse me if they seem a little blunt they are just > meant to be concise -- > > 1. Magic cleaned_data - So we can get/set values out of order and

Re: Newforms suggestions - pre_clean? magic cleaned_data? - access to errors?

2007-08-13 Thread sime
Another one -- 6. Maybe allow clean_method=x in field parameters, rather than have to create a custom field or repeat similar clean functions. > 5. (Somewhat pedantic) Rename data[] to raw_data[] and cleaned_data[] > to data[] - Has anyone seen how unnecessarily ugly this can get? Sorry I take

Re: Does SELECT 1 FROM... Work on SQL Server and Oracle?

2007-08-13 Thread Malcolm Tredinnick
On Tue, 2007-08-14 at 10:26 +1000, Malcolm Tredinnick wrote: > On Mon, 2007-08-13 at 16:45 -0500, Adrian Holovaty wrote: > > On 8/12/07, Simon Greenhill <[EMAIL PROTECTED]> wrote: > > > I'm trying to work out if Ticket #5030 is good to go or not. > > > Basically, when save() is called on a model,

Newforms suggestions - pre_clean? magic cleaned_data? - access to errors?

2007-08-13 Thread sime
Hello all, I have some suggestions for newforms, which I've condensed into point form, excuse me if they seem a little blunt they are just meant to be concise -- 1. Magic cleaned_data - So we can get/set values out of order and before the clean() run, having themselves clean implicitly as requir

Re: Does SELECT 1 FROM... Work on SQL Server and Oracle?

2007-08-13 Thread Malcolm Tredinnick
On Mon, 2007-08-13 at 16:45 -0500, Adrian Holovaty wrote: > On 8/12/07, Simon Greenhill <[EMAIL PROTECTED]> wrote: > > I'm trying to work out if Ticket #5030 is good to go or not. > > Basically, when save() is called on a model, django does a SELECT > > COUNT(*)... query to check that the primary

Re: Generic archive_month view and inclusive ranges

2007-08-13 Thread James Bennett
On 8/13/07, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > Proposal #1 seems simpler, but this is not a strong opinion. :-) The only thing that's keeping me from posting a patch for this right now with option 1 is a lingering doubt about whether one of the queries would be preferable; in the spirit

Re: db backend refactoring

2007-08-13 Thread Gary Wilson
Brian Harring wrote: > So... thoughts? The second round of refactoring posted on 5106 > currently lacks some of the new features mentioned above (need to port > them over mainly), but v3l address that, and add in at least a > SteadyDB persistant connection (pooling would be based off that). T

Re: Proposal: runserver --with-fixture

2007-08-13 Thread Todd O'Bryan
On Mon, 2007-08-13 at 16:31 -0500, Adrian Holovaty wrote: > I'm proposing a "--with-fixture" flag to django-admin.py, so that you > could do something like this: > > django-admin.py runserver --with-fixture=mydata.json > > With this command, Django would: > > * Delete the test database when

Re: Maybe we need more triagers? Or something else?

2007-08-13 Thread Gary Wilson
Gary Wilson wrote: > I agree with all the points you make here, Brian. We revamped the > ticket process a few months ago and I think any further changes is going > to give us diminishing returns. Oh, I forgot to mention something about possibly introducing a bug day. It's always more fun and mo

Re: Maybe we need more triagers? Or something else?

2007-08-13 Thread Gary Wilson
Brian Harring wrote: > While reordering the bug flow is a good thing, I'm not really sure > about the gain of it. Basically, better tools/flow doesn't mean > faster resolution/commits- just means it's organized better. A weekly > email *would* be nice, but view it as a stopgap approach to try

Re: Does SELECT 1 FROM... Work on SQL Server and Oracle?

2007-08-13 Thread Adrian Holovaty
On 8/12/07, Simon Greenhill <[EMAIL PROTECTED]> wrote: > I'm trying to work out if Ticket #5030 is good to go or not. > Basically, when save() is called on a model, django does a SELECT > COUNT(*)... query to check that the primary key is good. I've checked in that patch in http://code.djangoproj

Re: Proposal: runserver --with-fixture

2007-08-13 Thread Jacob Kaplan-Moss
On 8/13/07, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > django-admin.py runserver --with-fixture=mydata.json > I think you're reading my mind -- I was thinking about this just the other day. It would really, really help... and the "writeback" idea (serializing the data back into a fixture

Re: Generic archive_month view and inclusive ranges

2007-08-13 Thread Adrian Holovaty
On 8/13/07, James Bennett <[EMAIL PROTECTED]> wrote: > 1. Change the lookup type, to do a 'gte' on the first day of the month > and an 'lt' on the first day of the next month. > > 2. Keep the lookup type, but switch the internals of the view to using > datetime.datetime objects instead of datetime

Proposal: runserver --with-fixture

2007-08-13 Thread Adrian Holovaty
So I was writing Django view unit tests and setting up fixtures with sample data, and it hit me -- wouldn't it be useful we made it easy to run the Django development server with fixture data? I'm proposing a "--with-fixture" flag to django-admin.py, so that you could do something like this:

Re: Feedback on alternate comments app

2007-08-13 Thread jfroehlich
On Aug 13, 2:02 pm, "Kai Kuehne" <[EMAIL PROTECTED]> wrote: > what about features? Do you have more than > django comments + django-comment-uils? At the moment it is of course not as powerful as django-comments and django-comment-utils together. This is because it is still a draft. I was waiting

Generic archive_month view and inclusive ranges

2007-08-13 Thread James Bennett
The generic archive_month view has had some problems in the past with "off-by-one"-style errors; see, for example, #992, nostalgic for me because it was the first patch of mine ever accepted into Django. Unfortunately, the view now includes too *much* instead of too little, as mentioned in #3031,

Re: Adding hooks to methods that generate SQL in django/core/management.py

2007-08-13 Thread Russell Keith-Magee
On 8/13/07, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > Brian Ferring seems to be on top of this one. There's a separate Bother. That should be Brian Harring. Apologies Brian. Russ %-) --~--~-~--~~~---~--~~ You received this message because you are subscribe

Re: Adding hooks to methods that generate SQL in django/core/management.py

2007-08-13 Thread George Vilches
Russell Keith-Magee wrote: > On 8/12/07, George Vilches <[EMAIL PROTECTED]> wrote: >> How about the patch below? When you create the cursor, if you want >> access to "don't run this SQL, just have playback available", just use >> connection.cursor(playback_only=True), and if you want to roll the

Re: Feedback on alternate comments app

2007-08-13 Thread Kai Kuehne
Hi Johannes, what about features? Do you have more than django comments + django-comment-uils? If not, I don't know why one should use this. Kai --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" g

Re: Adding hooks to methods that generate SQL in django/core/management.py

2007-08-13 Thread Russell Keith-Magee
On 8/12/07, George Vilches <[EMAIL PROTECTED]> wrote: > > How about the patch below? When you create the cursor, if you want > access to "don't run this SQL, just have playback available", just use > connection.cursor(playback_only=True), and if you want to roll the This is a simple approach tha

db backend refactoring

2007-08-13 Thread Brian Harring
As hinted at earlier on the ml, have started doing some work on refactoring the actual db backend; ticket 5106 holds the current version (http://code.djangoproject.com/ticket/5106). Best to start with perceived cons of current design of the backends- 1) redundancy of code; each backend implemen

Re: Does SELECT 1 FROM... Work on SQL Server and Oracle?

2007-08-13 Thread Michael Radziej
On Mon, Aug 13, Mike Axiak wrote: > > If you're interested in performance, would it not also be wise to > issue a LIMIT 1 at the end of the query if possible? I believe SELECT > 1 will just return N 1s and the RDBMS will not stop searching simply > because it found it. There are also some ticket

Re: Feedback on alternate comments app

2007-08-13 Thread jfroehlich
On Aug 13, 3:12 am, Collin Grady <[EMAIL PROTECTED]> wrote: > This post may be better suited for the django-users list. > > This list is for the discussion of the development of django itself, > not apps that use django. Well there was this thread [1] about a contrib comments rewrite and Jacob re

GSoC 2007 Status Update VII: Django REST interface

2007-08-13 Thread Andreas Stuhlmüller
This is the seventh status update for my Summer of Code project, the Django REST interface [1]. Last week, I extracted code from the ModelResource class that is not directly related to models but useful for resources in general, moved it to Resource and made ModelResource inherit from Resource. I