Re: db backend refactoring

2007-08-14 Thread Brian Harring
On Wed, Aug 15, 2007 at 09:46:43AM +0700, Ben Ford wrote: >Hi Brian, >Just a quick question from me regarding your comment about supporting >multiple databases... I've had a quick look through your patch and it >seems to cover a lot of the ground that the multi-db has already >c

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

2007-08-14 Thread Vsevolod Solovyov
On 8/15/07, sime <[EMAIL PROTECTED]> wrote: > > > class MyForm(Form) > >field1 = ... > >field2 = ... > > > >def generic_clean(self): > > # ... > > > >clean_field1 = generic_clean > >clean_field2 = generic_clean > > T

testing broken

2007-08-14 Thread SmileyChris
Recent checkin http://code.djangoproject.com/changeset/5887 broke running an individual test: ...>runtests.py select_related Error: Couldn't install apps, because there were errors in one or more models: flatpages.flatpage: 'sites' has m2m relation with model Site, which has not been installed re

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

2007-08-14 Thread sime
> class MyForm(Form) >field1 = ... >field2 = ... > >def generic_clean(self): > # ... > >clean_field1 = generic_clean >clean_field2 = generic_clean The problem here is generic_clean doesn't know which field it is, an

Re: Regroup tag with intervals

2007-08-14 Thread sime
> I've accomplished the same thing with a template filter called "bunch" > -- it converts a list into a list of tuples that have been bunched. > I'd rather add a "bunch" filter than make this change to the regroup > tag, because this would completely change the meaning of the regroup > tag. Sound

Re: BlobField before .97

2007-08-14 Thread Malcolm Tredinnick
On Tue, 2007-08-14 at 16:29 -0700, Simon Greenhill wrote: > The last time we discussed this [1] I think everyone sort of concluded > that a binary field was a sensible idea as long as it's PRIMARILY for > storing small chunks of binary info, and not an easy-I-want-to-store- > binaries-in-my-databa

Re: db backend refactoring

2007-08-14 Thread Ben Ford
Hi Brian, Just a quick question from me regarding your comment about supporting multiple databases... I've had a quick look through your patch and it seems to cover a lot of the ground that the multi-db has already changed. - I was wondering if you're familiar at all with mulitple-db branch

Re: Changing the options in manage.py, adding more signals (was Re: Adding hooks to methods that generate SQL in django/core/management.py)

2007-08-14 Thread Russell Keith-Magee
On 8/14/07, George Vilches <[EMAIL PROTECTED]> wrote: > > George Vilches wrote: > Unfortunately, since there's only a syncdb signal, I can't even do > things like a reset on it, and there's definitely no way currently to > get the SQL generated from my syncdb signal. Being able to get the > CREAT

Re: BlobField before .97

2007-08-14 Thread Marty Alchin
I don't really have much invested in this topic, but I really think one of the other topics floating around has a decent approach to this problem. If FileField and its subclasses had a way to swap out storage mechanisms, a BLOB could be used internally to store the file data for a FileField. This

Re: BlobField before .97

2007-08-14 Thread Simon Greenhill
The last time we discussed this [1] I think everyone sort of concluded that a binary field was a sensible idea as long as it's PRIMARILY for storing small chunks of binary info, and not an easy-I-want-to-store- binaries-in-my-database type of thing. >From memory, most of the issues in that discus

Re: db backend refactoring

2007-08-14 Thread Brian Harring
On Tue, Aug 14, 2007 at 04:36:22PM -0500, Adrian Holovaty wrote: > After a cursory read-through the patch, my only major complaint is the > unnecessary cleverness of some of the code. Alt example besides BackendOps/BackendCapabilities would be appreciated (your phrasing implies there is more); t

Re: BlobField before .97

2007-08-14 Thread Adrian Holovaty
On 7/30/07, David Cramer <[EMAIL PROTECTED]> wrote: > In my opinion BlobField's need some kind of support inside of Django > before the coming of 0.97 release. > > They have never been officially supported, but they were at least > usable (as say a TextField) before Unicode. Now they're unusable a

Re: Regroup tag with intervals

2007-08-14 Thread Adrian Holovaty
On 7/31/07, sime <[EMAIL PROTECTED]> wrote: > Hi all I have a patch to the regroup tag which allows -- > > Regroup into any number of groups, of set size -- > {% regroup list every 4 as grouped %} > > Regroup into set number of groups, at any size -- > {% regroup list into 4 as grouped %} > > I've

Re: db backend refactoring

2007-08-14 Thread Adrian Holovaty
On 8/13/07, Brian Harring <[EMAIL PROTECTED]> wrote: > 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). Hey Brian, These look like solid improvements to me. A

Re: Proposal: runserver --with-fixture

2007-08-14 Thread Adrian Holovaty
On 8/14/07, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > I would suggest that rather than trying to make the --with-fixture > flag handle all this, it would be better to do this as a top level > command, i.e.: > > django-admin.py testserver mydata.json accounts.json categories.json > > This wo

Re: Changing the options in manage.py, adding more signals

2007-08-14 Thread George Vilches
Marty Alchin wrote: > Okay, I'll post one last time on this subject, then leave you guys to > do what you're supposed to be doing. I'm only posting here in case who > heard me ranting find it interesting. I did manage to come up with a > solution like I mentioned, and I'll be posting it soon. It'd

Re: Changing the options in manage.py, adding more signals

2007-08-14 Thread Marty Alchin
Okay, I'll post one last time on this subject, then leave you guys to do what you're supposed to be doing. I'm only posting here in case who heard me ranting find it interesting. I did manage to come up with a solution like I mentioned, and I'll be posting it soon. It'd be up already, but it seems

Re: Changing the options in manage.py, adding more signals

2007-08-14 Thread Marty Alchin
On 8/14/07, George Vilches <[EMAIL PROTECTED]> wrote: > Thoughts? Absolutely! Though I think this thread would get too far off-topic if I rattle them all off right now. I'll do a little work on the subject and see what I can come up with. Your approach looks very close to what I was thinking, but

Re: Accessing request.FILES in chunks

2007-08-14 Thread Mike Axiak
Hello, I'm not entirely sure how Amazon S3 affects your situation, but #2070 is the only option I know of to chunk your files (i.e. to avoid loading the entire contents into memory). If you're using #2070, then the files that were successfully streamed will have a ['tmpfile'] attribute, which is

Re: Changing the options in manage.py, adding more signals

2007-08-14 Thread George Vilches
Marty Alchin wrote: > This sounds like a far more complicated example than I had considered > when I was doing my work with dynamic models[1], but I did have > success getting syncdb to install dynamic models, provided a few > things are in order. I probably didn't document them well enough on > t

Re: Changing the options in manage.py, adding more signals (was Re: Adding hooks to methods that generate SQL in django/core/management.py)

2007-08-14 Thread Marty Alchin
This sounds like a far more complicated example than I had considered when I was doing my work with dynamic models[1], but I did have success getting syncdb to install dynamic models, provided a few things are in order. I probably didn't document them well enough on the wiki, but I could do so if

Re: Accessing request.FILES in chunks

2007-08-14 Thread Etienne Robillard
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi there, Not sure what you're trying to achieve with FileWrapper, however here's how I'd do it with Django prior to revision 5818: ... if request.method == 'POST': # Fetch some new data.. new_data = request.POST.copy() new_data.update(re

Accessing request.FILES in chunks

2007-08-14 Thread [EMAIL PROTECTED]
Hi there! I'm using Amazon S3 for file storage, so I have to access the FILES- object directly in my view. So #2070 won't have any effect, as far as I can see. I've been thinking about the FileWrapper-object. If I access it like this: the_file = FileWrapper(file(StringIO(request.FILES['file']['c

Re: Changing the options in manage.py, adding more signals (was Re: Adding hooks to methods that generate SQL in django/core/management.py)

2007-08-14 Thread George Vilches
George Vilches wrote: > Russell Keith-Magee wrote: >> On 8/12/07, George Vilches <[EMAIL PROTECTED]> wrote: >>> 1) Add a signal to every option? >> If we were going to go down this path, this would be the preferred >> option. However, I'm not sure I'm convinced of the need. Which >> commands exact

Re: Changing the options in manage.py, adding more signals (was Re: Adding hooks to methods that generate SQL in django/core/management.py)

2007-08-14 Thread George Vilches
Russell Keith-Magee wrote: > On 8/12/07, George Vilches <[EMAIL PROTECTED]> wrote: >> 1) Add a signal to every option? > > If we were going to go down this path, this would be the preferred > option. However, I'm not sure I'm convinced of the need. Which > commands exactly do you think require si

Re: Changing the options in manage.py, adding more signals (was Re: Adding hooks to methods that generate SQL in django/core/management.py)

2007-08-14 Thread Russell Keith-Magee
On 8/12/07, George Vilches <[EMAIL PROTECTED]> wrote: > > 1) Add a signal to every option? If we were going to go down this path, this would be the preferred option. However, I'm not sure I'm convinced of the need. Which commands exactly do you think require signals? Yours, Russ Magee %-) --~--

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

2007-08-14 Thread Russell Keith-Magee
On 8/13/07, George Vilches <[EMAIL PROTECTED]> wrote: > > Russell Keith-Magee wrote: > > The configuration option will need to be a little more generic - i.e., > > putting the entire backend into a record mode - not just a single > > cursor call. > > Second, we could add a class level variable to

Re: Proposal: runserver --with-fixture

2007-08-14 Thread Russell Keith-Magee
On 8/14/07, Adrian Holovaty <[EMAIL PROTECTED]> 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 +1 to the general idea. However, this syntax (--with-fixture) doesn't real

Re: Proposal: runserver --with-fixture

2007-08-14 Thread Tai Lee
if re-serializing the data when closing the dev server, wouldn't it be easier to just leave it in the db and not trash/recreate the db all the time, and manually dump/load the serialized data when necessary? --~--~-~--~~~---~--~~ You received this message because