Re: proposal: abstract file upload/download handling

2010-07-21 Thread Russell Keith-Magee
On Sun, Jul 18, 2010 at 1:59 AM, Waldemar Kornewald wrote: > Hi Russell, > so, after our chat on IRC I've finally found the time to implement a > real proposal including unit tests. I've attached the patch to this > ticket: > http://code.djangoproject.com/ticket/13960 > > Now there is just one bac

Re: memcached-based-cache - timeout=0 does not work as intended by memcached

2010-07-21 Thread Russell Keith-Magee
On Fri, Jul 16, 2010 at 6:54 PM, Carsten Reimer wrote: > Hello, > > I am not quite sure if this is the right mailinglist but as long as my > remarks are about a core-component of django I hopefully chose the right > list. > > Dealing with cache-stuff in Django I realized that it seems to be imposs

Re: Patch: Indefinite args for simpletags and inclusion tags

2010-07-21 Thread Russell Keith-Magee
On Sat, Jul 17, 2010 at 1:52 AM, Stephen Burrows wrote: > I went ahead and made a ticket with the patch. Thanks! > http://code.djangoproject.com/ticket/13956 Seems like a reasonable suggestion. As noted on the ticket, your patch needs docs and tests before it would be accepted for inclusion in tr

Re: memcached-based-cache - timeout=0 does not work as intended by memcached

2010-07-21 Thread Russell Keith-Magee
On Thu, Jul 22, 2010 at 10:43 AM, Alex Gaynor wrote: > On Wed, Jul 21, 2010 at 9:41 PM, Russell Keith-Magee > wrote: >> On Fri, Jul 16, 2010 at 6:54 PM, Carsten Reimer >> wrote: >>> Hello, >>> >>> I am not quite sure if this is the right mailingl

Re: MySQL index hints

2010-07-21 Thread Russell Keith-Magee
On Fri, Jul 16, 2010 at 10:43 AM, Simon Litchfield wrote: > Russ -- > > Firstly, re namespacing. No worries, let's just keep it RDBMS- > specific, ie -- > > MySQL - with_hints(use={}, force={}, ignore={}) > Oracle - with_hints(index={}, ...) > > That gives plenty of name space to breathe in. True

Re: [GSOC] Query Refactor List Field

2010-07-22 Thread Russell Keith-Magee
On Fri, Jul 23, 2010 at 4:37 AM, Alex Gaynor wrote: > Hey all, > > As I said in my last update, this week I've been working on some > ListField stuff.  So far I have a basic ListField implemented, with a > syntax of models.ListField(models.IntegerField()).  However, there are > a number of questio

Re: Documenting new features: built-in obsolescence of the "versionadded" tag.

2010-07-23 Thread Russell Keith-Magee
On Sat, Jul 24, 2010 at 6:13 AM, Justin Lilly wrote: > While I know it comes with extra work, I think the contents of the > versionadded bits need to be reworked into the body of text. While I > can't remember any specific examples, I remember reading docs a few > times and coming across versionad

Re: The Web framework for perfectionists and innovative with deadlines.

2010-07-29 Thread Russell Keith-Magee
On Fri, Jul 30, 2010 at 7:16 AM, Vito wrote: > > > On 29 jul, 17:39, Jacob Kaplan-Moss wrote: >> Hi Vito -- >> >> Jacob > > > Mr Jacob Kaplan-Moss, I am very happy to receive a response from you. > It is a very valuable information. > > I just like to say something, to you and the rest of Dj

Re: Filebrowser functionality in contrib?

2010-07-29 Thread Russell Keith-Magee
On Fri, Jul 30, 2010 at 11:09 AM, Tobias McNulty wrote: > On Thu, Jul 29, 2010 at 3:32 PM, shacker wrote: >> >> I've been thinking that it seems like solid file management would be a >> good candidate for inclusion in contrib, but wanted to put feeler out >> on this list to see whether others mig

Re: Custom templatetag for latex users

2010-08-04 Thread Russell Keith-Magee
On Wed, Aug 4, 2010 at 3:27 PM, mrkiwi wrote: > Hi, > > I need to take a template ( written in latex ) and fill it with data, > then send it through pdflatex to get the pdf output, and return it to > the user. Django makes this easy, but not quite as smooth as an html > template. > > I use render_

Re: Enhanced URL Resolver Match

2010-08-04 Thread Russell Keith-Magee
ing patch needs > any work, or better docs. > > Thanks! > Nowell > > On Jul 10, 4:35 am, Russell Keith-Magee > wrote: >> On Fri, Jul 9, 2010 at 1:50 PM, Nowell Strite wrote: >> > When Django 1.1 was released URLs gained the ability to be nested with >

Re: Patch and tests for #13182

2010-08-05 Thread Russell Keith-Magee
On Fri, Aug 6, 2010 at 8:31 AM, David P. Novakovic wrote: > http://code.djangoproject.com/ticket/13182 > Let me know if there is anything else I can do on this ticket, it is fairly > simple anyway. Hi David, Thanks for the patch submissions, but you don't need to send a message to django-dev eve

Re: ModelForms regression since Django 1.1.2

2010-08-09 Thread Russell Keith-Magee
Hi Vasili, Thanks for the gentle poke -- I'l try and take a look at this over the next couple of days. Yours, Russ Magee %-) On 8/8/10, 3point2 wrote: > Hi everyone, > > I'm writing to draw attention to a ticket I opened a couple of months > ago that seems to have been overlooked: > http://co

Re: Django 1.3 and Python 2.4

2010-08-10 Thread Russell Keith-Magee
On Tue, Aug 10, 2010 at 3:37 PM, Paul McMillan wrote: > Django 1.2 dropped support for Python 2.3. In the past, there has been > talk of dropping a version of Python per Django release. Python 2.4 is > relatively rare these days, but still supported by RHEL. > > None of us like coding for it, and

Re: Unreviewed ticket #13902

2010-08-10 Thread Russell Keith-Magee
Hi Iván Thanks for the contribution. Apologies that nobody has reviewed your patch; we have a bit of a backlog in this area, so sometimes a gentle prod is required. I've taken a quick look at the patch; it looks pretty good. I've made some quick notes on the ticket. Yours, Russ Magee %-) On 8/1

Re: Django 1.3 and Python 2.4

2010-08-11 Thread Russell Keith-Magee
On Wed, Aug 11, 2010 at 11:29 PM, David Malcolm wrote: > On Wed, 2010-08-11 at 14:48 +0200, Dennis Kaarsemaker wrote: >> On Wed, Aug 11, 2010 at 2:20 AM, Russell Keith-Magee >> wrote: >> >> > Like it or not, RHEL is still a major player in the enterprise market >

Re: Getting #14002 (filesizeformat filter only supports up to GB) committed

2010-08-13 Thread Russell Keith-Magee
On Sat, Aug 14, 2010 at 6:44 AM, Aaron T. Myers wrote: > Hello all, > I was very impressed with the responsiveness to my initial patch for ticket > #14002. However, no one's taken a look at my updated patch addressing the > review comments. Would some one mind taking a look? Thanks a lot. > http:/

Re: #11834: colorized debug page. Assigned to buriy

2010-08-14 Thread Russell Keith-Magee
On Sat, Aug 14, 2010 at 1:39 PM, burc...@gmail.com wrote: > I had few useful thoughts about changing the way Django development > contributions gets accepted and committed -- but all I get from this > mailing list that all attempts to improve any process is just a waste > of time. That's not enti

Re: #11834: colorized debug page. Assigned to buriy

2010-08-15 Thread Russell Keith-Magee
On Sunday, August 15, 2010, burc...@gmail.com wrote: > Hi Russell, > >> However, it does need to have it's UX issues sorted out. The most >> recent substantive comment on the ticket [1] indicates that the patch >> isn't ready for checkin. It also suggests that there are broader >> improvements tha

Re: Trac issues review

2010-08-15 Thread Russell Keith-Magee
On Sun, Aug 15, 2010 at 3:03 PM, burc...@gmail.com wrote: > Hi Russell, > > On Sat, Aug 14, 2010 at 2:03 PM, Russell Keith-Magee > wrote: >> On Sat, Aug 14, 2010 at 1:39 PM, burc...@gmail.com wrote: >>> I had few useful thoughts about changing the way Django develop

Re: dev process [was: #11834: colorized debug page]

2010-08-15 Thread Russell Keith-Magee
On Mon, Aug 16, 2010 at 10:03 AM, Mark Bucciarelli wrote: > On Sat, Aug 14, 2010 at 03:03:27PM +0800, Russell Keith-Magee wrote: >> >> If you have suggestions on how we can improve Django's development >> process and address these issues, we're happy to hear

Re: dev process [was: #11834: colorized debug page]

2010-08-15 Thread Russell Keith-Magee
On Mon, Aug 16, 2010 at 11:08 AM, Mark Bucciarelli wrote: > On Mon, Aug 16, 2010 at 10:31:11AM +0800, Russell Keith-Magee wrote: >> On Mon, Aug 16, 2010 at 10:03 AM, Mark Bucciarelli wrote: >> >> > ?- random api lock (people tend towards complacency) >> >> I

Re: dev process [was: #11834: colorized debug page]

2010-08-15 Thread Russell Keith-Magee
On Mon, Aug 16, 2010 at 10:50 AM, Tobias McNulty wrote: > On Sun, Aug 15, 2010 at 10:31 PM, Russell Keith-Magee > wrote: >> >> On Mon, Aug 16, 2010 at 10:03 AM, Mark Bucciarelli >> wrote: >> >  - punish dev's who don't fix their bugs quickly after

Re: Trac issues review

2010-08-15 Thread Russell Keith-Magee
On Mon, Aug 16, 2010 at 12:41 PM, burc...@gmail.com wrote: > Hi Russell, > > Thanks for clarifications of the process, but it seems I explained > some things wrong. > > I see some issues have the following problems: > 1) second core developer review takes a year, > 2) reviewers like me who are not

Re: Checking if my patch would be a useful contribution

2010-08-15 Thread Russell Keith-Magee
On Sat, Aug 14, 2010 at 6:12 PM, Swizec Teller wrote: > Hi all, > > brand new django contributor here, been using it so much I reckon it's > about time I started giving back :) > > Anyhow, I'm using Django primarily to develop RESTful API's for web > services. This of course means a lot of JSON is

Re: Gentle Nudge on #12398

2010-08-16 Thread Russell Keith-Magee
On Mon, Aug 16, 2010 at 6:48 PM, burc...@gmail.com wrote: > Hi Falridge, > > Russell just said in another thread ( > http://http://groups.google.com/group/django-developers/browse_thread/thread/41ef180b93410cd2/cb0510692d8270b5 > ), that you need to put ticket into RFC if you feel the ticket is >

Re: Datetimes with timezones for mysql

2010-08-16 Thread Russell Keith-Magee
On Tue, Aug 17, 2010 at 12:13 AM, Vitaly Babiy wrote: > Hey, > I been doing a lot with timezone aware dates and I noticed that the mysql > store will not allow you to store a datetime aware datetime. I was wondering > if there is a reason why not convert theses dates to whatever is in the > settin

Re: Tests fail without Docutils

2010-08-17 Thread Russell Keith-Magee
2010/8/17 Łukasz Rekucki : > Hi, > > Since revision 13588, tests fail on trunk without Docutils installed. > This was also reported by Paul: > http://code.djangoproject.com/ticket/14123 and currently makes all the > buildbots on Hudson fail, so I would like to bring your attention to > it Thanks f

Re: Unit tests

2010-08-18 Thread Russell Keith-Magee
On Thu, Aug 19, 2010 at 5:24 AM, Tom wrote: > I'm interested in writing a unit test suite that does not require all > the components of Django to be bootstrapped. > Correct me if I'm wrong, there are only integration tests bundled with > Django. > > Would a unit testing suite be valuable to Django

Re: Empty models don't get created (#1972)

2006-06-22 Thread Russell Keith-Magee
On 6/22/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > On Wed, 2006-06-21 at 13:35 -0700, Tyson Tate wrote: > What are the use cases for this sort of construction? > Here's another use case: you want to add fields to your table that don't have a representation in the Django model. For exa

Re: Error when iexact meets integer field.

2006-06-24 Thread Russell Keith-Magee
On 6/25/06, favo <[EMAIL PROTECTED]> wrote: > > iexact use ILIKE as backend. this will cause error when effect on a > integer field. > we just need "!=". > > select id from auth_user where id ILIKE 5; > > select id from auth_user where id != 5; This is as desgined. iexact is for case insensitive

Re: ManyToManyField looks broken

2006-06-25 Thread Russell Keith-Magee
On 6/25/06, Ivan Sagalaev <[EMAIL PROTECTED]> wrote: > > I'd like to draw some attention to ticket > http://code.djangoproject.com/ticket/2232 (mainly russelm's attention as > it appeared after his checkin 3195). Paying attention now :-) > Basically ManyToMany relations don't work when you try

Re: ManyToManyField looks broken

2006-06-25 Thread Russell Keith-Magee
On 6/25/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > Russ: can you see if I've overlooked any problem there, please. It took > a little while to track everything down and my brain may have gotten > twisted in the process. The anti-model-duplication logic makes sense to me from what I und

Re: TEMPLATE_STRING_IF_INVALID bug

2006-06-25 Thread Russell Keith-Magee
On 6/25/06, Vladimir Pouzanov <[EMAIL PROTECTED]> wrote: > > I've found something that looks like a bug. I just tried and got the same thing. I've opened ticket #2237 to follow the problem, and added you to the CC list for that ticket. Thanks for the report, Russ Magee %-) --~--~-~--~--

Re: Single-step object creation?

2006-06-26 Thread Russell Keith-Magee
On 6/27/06, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote: > > Hi folks -- > > Quick proposal: what do y'all think about having ``object.save()`` > return ``object``? It's slightly Java-ish, but it would allow:: > > p = Person(first_name="Jacob", last_name="Kaplan-Moss").save() +0; no path

Re: Get/filter breaks when getting/filtering by a foreign key field using the related object

2006-06-28 Thread Russell Keith-Magee
On 6/27/06, Mikko Nylén <[EMAIL PROTECTED]> wrote: > > As said in the ticket, the current behavior would probably be quite trivial > to change and would result in more natural way to filter/get objects -- not > to mention, it would allow the get_or_create() to work properly. I've had a look at th

#2217 - Filtering using objects rather than IDs

2006-06-30 Thread Russell Keith-Magee
Hi all, I'm in the process of working on a fix for ticket #2217. The fix involves a slight change to the interpretation of one type of query argument.  To illustrate the change, consider the following three (almost identical) queries: Reporter.objects.filter(article__id__exact=1)Reporter.objects.f

Re: #2217 - Filtering using objects rather than IDs

2006-06-30 Thread Russell Keith-Magee
On 6/30/06, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote: On Jun 30, 2006, at 7:04 AM, Russell Keith-Magee wrote:> However, since this change could effect people in the field, I> thought I'd check for objections before I commit.I'm +1 as long as looking up by ID still work

Re: #2217 - Filtering using objects rather than IDs

2006-06-30 Thread Russell Keith-Magee
Ok - consensus seems to be its a good idea. However, it turns out I was a little premature in my warning. It turns out that in order to catch all the edge cases of OneToOne fields, i've implemented a fix that allows both kinds of object references. So, under the new scheme, if a.id = 1:  Reporter.

#2237 - TEMPLATE_STRING_IF_INVALID and template IF statements

2006-07-03 Thread Russell Keith-Magee
Hi all,I've been tracking bug #2237, which has revealed a few weird cases in the way the TEMPLATE_STRING_IF_INVALID setting gets used. These cases are easy to find - put TEMPLATE_STRING_IF_INVALID='invalid' in your settings file, load the admin page, and watch the breakage that ensues. The breakage

Re: #2237 - TEMPLATE_STRING_IF_INVALID and template IF statements

2006-07-03 Thread Russell Keith-Magee
On 7/4/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: On Mon, 2006-07-03 at 22:49 +0800, Russell Keith-Magee wrote:This is ticket #1338, by the way.Good lord - there's a whole cluster of tickets around this one... how did I miss these when I submitted originally? Thanks for the po

Re: Manual settings and the user's environment

2006-07-05 Thread Russell Keith-Magee
On 7/6/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: Anybody have thoughts about this?Thinking about it further, I am more and more inclined to go with option#2: don't mess with the environment when running Django componentsembedded in another application. But I may be insane (the phrase has ce

Re: Manual settings and the user's environment

2006-07-05 Thread Russell Keith-Magee
On 7/6/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: Wealready spend enough time helping with people with basic Apacheconfiguration; many of us would get it right, but they aren't the oneswho will be posting to the mailing lists. Do we need the extrainconvenience? True. This is a very compellin

Re: #2217 - Filtering using objects rather than IDs

2006-07-09 Thread Russell Keith-Magee
On 7/8/06, Gary Wilson <[EMAIL PROTECTED]> wrote: Gary Wilson wrote:> This really should be added to the model api documentation too.db api rather. I've just committed some db-api changes (r3302). Let me know if you think they need any clarification. Russ Magee %-)  --~--~-~--~~--

Test framework for end-user applications

2006-07-12 Thread Russell Keith-Magee
Hi all, I've got a project at work that requires a formal test harness, so I thought I would kill two birds with one stone and spend some time adding a formal test framework for all Django applications. This came up a few weeks ago [1], and although I didn't comment at the time, it struck me as a

Re: Test framework for end-user applications

2006-07-12 Thread Russell Keith-Magee
On 7/12/06, Michael Radziej <[EMAIL PROTECTED]> wrote: For my own project, I put together a testing middleware for viewsand manipulators, which saves the context given to a template andallows tests that are solely context based. The middleware canalso write out test cases while you use the browser.

Re: Test framework for end-user applications

2006-07-12 Thread Russell Keith-Magee
On 7/12/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: I'll write up what I was thinking about in another mail; I started topost it in response to this, but it adds no value to your proposal.Baited breath, and all that :-) We are going to see more and more cases of a models/ sub-directory, notj

Re: Test framework for end-user applications

2006-07-12 Thread Russell Keith-Magee
On 7/12/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Just as an additional data point, or point of discussion or whatever,...In summary, it's py.test without the magic, plus support for pluginsthat can be used to change test selection, running and reporting.Unless you can make a particularly c

Re: Test framework for end-user applications

2006-07-13 Thread Russell Keith-Magee
On 7/13/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: Yes, please post the patch before committing -- this is definitely a big thing.Ok; i've just attached a first pass set of patches to ticket #2333. The objectives of these patches:- Add a 'test' target to django-admin that will start the test su

Re: Test framework for end-user applications

2006-07-13 Thread Russell Keith-Magee
On 7/13/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > It makes coverage reports? And they work with Django? Whow!Sure. Now - that's what I call a convincing reason to switch.I'm still hesitant to make the _default_ testing scheme dependent on an external package, simply because Django doesn't

Re: Test framework for end-user applications

2006-07-14 Thread Russell Keith-Magee
On 7/14/06, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote: Now, what's the license of nose? Perhaps we could bundle it withDjango (as we've done with PyDispatcher and Simplejson)?  In my(limited) messing with Django & nose I've been pretty happy so far(but I've not played with Russell's patch for com

Re: Test framework for end-user applications

2006-07-16 Thread Russell Keith-Magee
On 7/13/06, Simon Willison <[EMAIL PROTECTED]> wrote: The best way of running tests against a Django application, to mymind, is to run a "fake" web server (i.e. one that doesn't actuallybind to a port) around the application.Agreed; although I'm not sure that you actually need to run a server in th

Re: Test framework for end-user applications

2006-07-16 Thread Russell Keith-Magee
On 7/13/06, Malcolm Tredinnick < [EMAIL PROTECTED]> wrote:I know  Malcolm said he was going to step away from this discussion, so this is mostly for the benefit of everyone else. Initially, I think it will be hard to have the views entirely divorcedfrom the model framework. To do that (separate the

Re: Test framework for end-user applications

2006-07-16 Thread Russell Keith-Magee
On 7/17/06, Jyrki Pulliainen <[EMAIL PROTECTED]> wrote: Anyway, Twill's been an ideal tool for web testing, because you cangive follow links, fill forms etc.Much like the unittest vs py.test vs nose discussion earlier, I think we should be avoiding discussions about what to bless as the 'official

Ticket #2333 - request for some love

2006-07-19 Thread Russell Keith-Magee
Hi all,I've just submitted the second piece of the testing system puzzle; a mechanism for testing the context and templates that are produced in response to a URL. A patch and a more detailed commentary are attached to the ticket. The cliff notes version is that: ---b = Browser()response  = b.get('

Re: Model inheritance API

2006-07-23 Thread Russell Keith-Magee
First off: +1 and then some from me - this is some great stuff, Malcolm. On 7/24/06, Malcolm Tredinnick < [EMAIL PROTECTED]> wrote:On Sun, 2006-07-23 at 11:31 -0500, Jacob Kaplan-Moss wrote: > On Jul 22, 2006, at 9:37 PM, Malcolm Tredinnick wrote:[...]>> > (1) What notation to use to declare a clas

Re: Model inheritance API

2006-07-23 Thread Russell Keith-Magee
On 7/24/06, Bryan <[EMAIL PROTECTED]> wrote: Russell Keith-Magee wrote:> 2) A decorator:When did python support class decorators?You know... one of these days, I'm going to learn to have coffee before I touch a keyboard :-) You are correct - the @ syntax doesn't work for cla

Re: Ticket 2445 - limit_choices_to - allow callable(value).

2006-07-28 Thread Russell Keith-Magee
On 7/29/06, Michael Hamilton <[EMAIL PROTECTED]> wrote: I've raised Ticket 2445 and attached a small patch - it sounds similar toTicket 2193, but 2193 might be intended to be even more general (not justvalues).Looks like a duplicate to me - I've marked #2193 as such (patch trumps empty ticket). Th

Re: Idea for ManyTomManyField extention

2006-07-29 Thread Russell Keith-Magee
On 7/29/06, Neilen Marais <[EMAIL PROTECTED] > wrote: I'm just testing the waters to see what people think about an extendedManyToManyField type that allows the addition of extra info to a linkwithouth having to use an intermediary table/model like here: http://www.djangoproject.com/documentation/m

Re: Idea for ManyTomManyField extention

2006-07-30 Thread Russell Keith-Magee
On 7/30/06, Neilen Marais <[EMAIL PROTECTED] > wrote: This should be completely compatible with ordinary use of m2mrelations. It would be problematic if either Tag or Image had anyfields in common with ImageTagInfo, but that would presumably bechecked at model creation type. One could object that t

Bump - Django Testing (#2333)

2006-08-02 Thread Russell Keith-Magee
Hi All,Don't mean to bug you all, but is anyone planning to look (or are already looking) at the initial testing framework patches (Ticket #2333)? I'd like to start work on the next phase (fixtures), but there is some crossover with the patches that I have submitted but not yet applied. Thanks,Russ

Re: Bump - Django Testing (#2333)

2006-08-02 Thread Russell Keith-Magee
On 8/3/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: Are all those patches (the crossover potentials) in #2333?The patches so far are independent. However, the next phase will require some crossover. Hmm... there seems to be a lot of reading there. I won't have timetoday, but I'll put this on t

Re: Model inheritance redux

2006-08-03 Thread Russell Keith-Magee
On 8/3/06, Malcolm Tredinnick <[EMAIL PROTECTED] > wrote:Sorry to see duck typing go, but I can see that the problems you mentioned could open up a real nest of vipers (especially debugging the spider-web of queries). Oh well... it was nice while it lasted :-) So, new, improved inheritance API (ac

Re: dajngo and unittest

2006-08-03 Thread Russell Keith-Magee
On 8/4/06, Bill de hÓra <[EMAIL PROTECTED]> wrote: Hi,is there any particular reason unittest isn't used in Django?Specifically if I was writing tests for contribution/patches, wouldwriting them in unittest be a problem, or is there a preferred approach? I might be wrong on this, but I think the re

Re: Model inheritance redux

2006-08-03 Thread Russell Keith-Magee
On 8/4/06, Malcolm Tredinnick <[EMAIL PROTECTED] > wrote: > Obviously, I'd still prefer an _actual_ duck, but this seems a> reasonable alternative in an duckless world.I could subclass everything from Duck if you like. Poor man's ducktyping. :-) Hey! Great idea! +1 :-) I haven't worked out the API

Re: Model inheritance redux

2006-08-04 Thread Russell Keith-Magee
On 8/4/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: On Fri, 2006-08-04 at 13:36 +0800, Russell Keith-Magee wrote:> Place.objects.filter(restaurant__chef_name='Bork')>> Any comments?I hate it (sorry).Apologies - I wasn't actually suggesting it or requesting

Re: Model inheritance redux

2006-08-07 Thread Russell Keith-Magee
On 8/8/06, Alan Green <[EMAIL PROTECTED]> wrote: Hi Bjørn,Sure. In this case you would need a discriminator attribute on Place.I'm thinking of code along the lines of:class Place(models.Model):...discriminator = models.CharField(maxlength=50) def save(self):self.discriminator =

Bump again - #2333/Django testing framework

2006-08-25 Thread Russell Keith-Magee
Hi all,Sorry to be the squeaky hinge here, but is anyone looking at the testing framework patches associated with #2333?At last count, I believe Malcolm was happy with the patches as they stand; however, I'm still looking other comments, plus a blessing from a higher power before I commit anything

Re: db_index not creating indexes with syncdb

2006-08-25 Thread Russell Keith-Magee
On 8/24/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: It looks like syncdb has a bug in that it doesn't create the indexes --at least on MySQL. You are correct (and it's not just with MySQL). This is a bug born of the way that syncdb installs applications. For some reason, it doesn't defer to in

Re: Bump again - #2333/Django testing framework

2006-08-26 Thread Russell Keith-Magee
On 8/26/06, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote:  My only critique would be that there's no documentation of how to useyour stuff to test Django apps.  Even a quick howto would be super-useful.  I'm sure I'll get around to writing one sooner or later, butif you've got the time that would ro

Django Test framework commits (r3658-r3661)

2006-08-27 Thread Russell Keith-Magee
Hi all,Revisions 3658-3661 are the commits of the first two phases of the Django Testing Framework. These changes should have no impact on any existing project. However, should you wish to unit test your Django application, there is now a framework (controlled by ./manage.py test) that will allow y

Re: Django Test framework commits (r3658-r3661)

2006-08-27 Thread Russell Keith-Magee
Hi again, Following some concerns from Adrian, part of the testing patches have been rolled back (as of r3666). The testing framework itself will continue to work; however, the 'pseudo client' will be unable to inspect template specific details. Apologies for any inconvenience. Yours, Russ Mag

Test framework and dispatching benchmarks

2006-08-29 Thread Russell Keith-Magee
Hi all,As a result of some performance concerns, Adrian has reverted the template rendering signals that were part of the recent test framework changesets. I was under the impression that the overhead of an dispatching a signal with no handlers would be negligible, so, to validate (or invalidate) A

Re: Ticket 1400

2006-08-29 Thread Russell Keith-Magee
On 8/30/06, Luke Plant <[EMAIL PROTECTED]> wrote: Hi all,There has been no response on http://code.djangoproject.com/ticket/1400after mine and Simon's comments.  I'd like to go ahead and revert that one thing, but can the original committer (Russell) comment?I'm sure it seemed like a good idea at t

Re: Template variable evaluation for True/False ?

2006-08-30 Thread Russell Keith-Magee
On 8/31/06, James Bennett <[EMAIL PROTECTED] > wrote: On 8/30/06, [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote:> The committer russelm said: Template variable evalution should follow Python norms. As I understand it, the distinction is between the string 'False' andthe boolean False.This is correct

Re: Integrating Django and SQLAlchemy

2006-08-30 Thread Russell Keith-Magee
On 8/30/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: Hi all,Spawned by the recent discussion of the big picture of Python Webframeworks, we've decided to start a new branch of Django developmentthat uses SQLAlchemy (http://www.sqlalchemy.org/ ) as the underlyingdatabase library.What impact will t

Re: name of test database

2006-09-01 Thread Russell Keith-Magee
On 9/1/06, Michael Radziej <[EMAIL PROTECTED]> wrote: I can work around this, sure, but I'd propose to allow tooverwrite the default test database name for the test suite somehow, preferably on the command line of runtests.py.Thanks for the feedback. These are reasonable concerns. I have just commi

Re: Filters no longer parsed for unresolved variables

2006-09-01 Thread Russell Keith-Magee
On 9/1/06, SmileyChris <[EMAIL PROTECTED]> wrote: I believe the last line of that patch should have been:+obj = settings.TEMPLATE_STRING_IF_INVALIDbut I just wanted to check that the functionality change isn't intendedfirst. This was intentional; the original problem was that {% if

Re: name of test database

2006-09-01 Thread Russell Keith-Magee
On 9/1/06, Adrian Holovaty <[EMAIL PROTECTED] > wrote: Any particular reason you used a setting instead of a simplecommand-line parameter? In my view, we should only be adding settingsif absolutely necessary.I agree that a command line argument would probably be viable if the problem was restricted

contrib.admin vs contrib.auth login schemes

2006-09-02 Thread Russell Keith-Magee
Hi all,In messing around with the test Client recently, it occurred to me that there is some duplication in login schemes between contrib.admin and contrib.auth.Is there any particular reason that contrib.admin doesn't use the login views and decorators provided by contrib.auth? Both admin and au

Re: name of test database

2006-09-03 Thread Russell Keith-Magee
On 9/4/06, Ned Batchelder <[EMAIL PROTECTED]> wrote: Partly on this topic:  I would very much like to use sqlite in-memory databases for testing, even though I use MySQL for deployment.  The speed difference is 10x.  One way to do this is to have a TEST_DATABASE_ENGINE setting, and add logi

Re: Filters no longer parsed for unresolved variables

2006-09-04 Thread Russell Keith-Magee
On 9/4/06, SmileyChris <[EMAIL PROTECTED]> wrote: I can't see that you've missed anything (but then again, I didn'tmanage to get it right on my attempt so don't trust me) ;)I've just committed the fix (along with some extra unit tests to make sure it stays fixed) as r3714. Thanks for the help in na

Re: Re: name of test database

2006-09-04 Thread Russell Keith-Magee
On 9/4/06, Matthew Flanagan <[EMAIL PROTECTED]> wrote: and use ./manage.py --settings=myapp.testsettings.I briefly considered this approach when the TEST_DATABASE_NAME suggestion came up. However, I was concered about the possibility for accidentally nuking your production database. If you ever for

Re: Initial data hooks: management.install vs. management.syncdb

2006-09-04 Thread Russell Keith-Magee
On 9/4/06, Ned Batchelder <[EMAIL PROTECTED] > wrote: I've been experimenting with the new test frameworks, and am veryexcited about their potential.I've hit a snag, and am wondering if it reveals a flaw in the currentmanagement.py, or if there is something I don't understand yet (most likely the l

Re: Initial data hooks: management.install vs. management.syncdb

2006-09-05 Thread Russell Keith-Magee
On 9/5/06, JP <[EMAIL PROTECTED]> wrote: Now that syncdb can be run non-interactively, I can switch the pluginover to calling that instead. It will take some time, however, becauseI need to figure out how to do that and use the new create/drop test db functions from djagnoo.test.utils when they are

Re: Custom default managers interfere with delete operations

2006-09-08 Thread Russell Keith-Magee
On 9/8/06, Ned Batchelder <[EMAIL PROTECTED]> wrote: The docs for custom managers say: "it's generally a good idea for thefirst Manager to be relatively unfiltered".  But it seems that anyfiltering in the default manager will interfere with cascading deletes. Having a filtered manager will cause s

Re: Custom default managers interfere with delete operations

2006-09-08 Thread Russell Keith-Magee
On 9/9/06, Ned Batchelder <[EMAIL PROTECTED] > wrote: I'm not familiar with the internals of this code, but here's a naive conception: since the default objects manager is made automatically by the ORM, couldn't it still be available internally for use in this case?  Whatever filtering

Re: manytomany and multiple selects

2006-09-08 Thread Russell Keith-Magee
On 9/8/06, LizzyLiz <[EMAIL PROTECTED] > wrote: I would like to show which of these accounts are already linked to theuser but I'm not sure how to do it - something like: account.id }}"  {% if account.id inuser.accounts %}selected="True"{% endif %}>{{ account.name}}You won't be able to use

Re: Development freeze on django.db.models

2006-09-11 Thread Russell Keith-Magee
On 7/8/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > To all Django committers -- > > Please don't change any code within django.db.models over the next few > days. Stimulated by ticket #2306, I took a look in there (particularly > the file query.py) and was a bit taken aback by how monstrous

Re: Custom default managers interfere with delete operations

2006-09-11 Thread Russell Keith-Magee
On 9/10/06, Ned Batchelder <[EMAIL PROTECTED]> wrote: > No filtering allowed. Hrm. I think you might be right. Taking a closer look, it seems that the deletion algorithm is fairly conservative; I can't see a way of constructing a non-default related manager that would exclude an object from delet

Re: Ticket #648 -- {# comment goes here #} style comments

2006-09-12 Thread Russell Keith-Magee
On 9/13/06, Hawkeye <[EMAIL PROTECTED]> wrote: > > > Some tests for > > your patch wouldn't go amiss, though I realise it's a pain writing > > tests for code when you don't know if it's going to be used. > > Unfortunately, I don't think I'll be able to find the time to write > tests. Side note, a

Re: Proposal: Forms and BoundForms

2006-09-13 Thread Russell Keith-Magee
Hi Adrian On the whole, this looks like pretty good stuff to me. A few comments along the way; some of these ideas need not be in the v1 implementation, but I mention them anyway so that we don't roll out a system that can't accomodate them in the future: On 9/13/06, Adrian Holovaty <[EMAIL PROT

Re: Patches, Tests and All the Rest (was: Ticket #648 -- {# comment goes here #} style comments)

2006-09-13 Thread Russell Keith-Magee
On 9/14/06, SmileyChris <[EMAIL PROTECTED]> wrote: > > Michael Radziej wrote: > > I'd appreciate if we could find a > > way to state what kind of patches are interesting for the > > committers and what not *before* the patch is created fully. This > > is of course more important for large patches

Re: Patches, Tests and All the Rest (was: Ticket #648 -- {# comment goes here #} style comments)

2006-09-13 Thread Russell Keith-Magee
On 9/13/06, Michael Radziej <[EMAIL PROTECTED]> wrote: > > Russell Keith-Magee wrote: > > Submitting a patch without tests is almost _exactly_ the _worst_ thing > > you can do if you want your patch to be committed. > > When I submit a patch, I'd really like

Re: Proposal: Forms and BoundForms

2006-09-13 Thread Russell Keith-Magee
On 9/14/06, Matthew Flanagan <[EMAIL PROTECTED]> wrote: > > On 14/09/06, Brantley Harris <[EMAIL PROTECTED]> wrote: > > For instance, using the given example: > >message = TextField(label='Your message', > > attributes={'class':'vRichTextField'}) > > > > +1 on this for me. I'd love to be able

Re: Re: Development freeze on django.db.models

2006-09-15 Thread Russell Keith-Magee
On 9/16/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > And anybody who wants to introduce a method called _init() in addition > to Python's existing __init__() is clearly a wanna-be Perl programmer > and should be viewed with caution in any case. :-) :-) Truth be told, I'm not particularly

Re: Re: Re: initial SQL thinks it's a format string

2006-09-15 Thread Russell Keith-Magee
On 9/16/06, James Bennett <[EMAIL PROTECTED]> wrote: > > On 9/15/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > In general, initial SQL data is a real pain to manage and if anybody has > > a good idea on a better approach. I would like to avoid building a full > > SQL parser in Python for o

Re: ManyToManyField, symmetrical & related_name

2006-09-30 Thread Russell Keith-Magee
On 9/30/06, mdornseif <[EMAIL PROTECTED]> wrote: > > I now spent to long debugging my model - I had missed the > ManyToManyField documentation regarding the symmetrical parameter and > relying on the related_name parameter. > > To me it seems that when symmetrical=True, related_name is ignored.

Re: Using test.client.Client.post with body?

2006-10-03 Thread Russell Keith-Magee
On 10/4/06, Mikeal Rogers <[EMAIL PROTECTED]> wrote: > > I'm a little confused as to how to really use the test client for a > json-rpc request. > > I need to send a serialized object in the body, but the method seems > to be designed to simulate form post and may not contain this option. This is

Re: Test framework in memory database

2006-10-05 Thread Russell Keith-Magee
On 10/6/06, JP <[EMAIL PROTECTED]> wrote: > > I'd bet this is related to some issues I've seen in trying to get the > multi-db branch tests passing post r3661. The trouble is (or seems to > me to be) that anything that uses the test client causes the > request_finished signal to fire, which causes

<    3   4   5   6   7   8   9   10   11   12   >