Re: Session/cookie based messages (#4604)

2009-12-05 Thread David Cramer
I'm with Luke on this for the exact reasons he describes. Sent from my iPhone On Dec 5, 2009, at 7:24 PM, Russell Keith-Magee wrote: > On Sun, Dec 6, 2009 at 10:28 AM, Luke Plant > wrote: >> On Sunday 06 December 2009 00:56:56 Russell Keith-Magee wrote: >> Really? Files definitely seem t

Re: Session/cookie based messages (#4604)

2009-12-05 Thread Russell Keith-Magee
On Sun, Dec 6, 2009 at 10:28 AM, Luke Plant wrote: > On Sunday 06 December 2009 00:56:56 Russell Keith-Magee wrote: > >> > Really?  Files definitely seem to be more on the "storage" side >> > of things: >> > >> > http://code.djangoproject.com/browser/django/trunk/django/core/fi >> >les/storage.py

Re: Session/cookie based messages (#4604)

2009-12-05 Thread Luke Plant
On Sunday 06 December 2009 00:56:56 Russell Keith-Magee wrote: > > Really? Files definitely seem to be more on the "storage" side > > of things: > > > > http://code.djangoproject.com/browser/django/trunk/django/core/fi > >les/storage.py > > The problem we have here is that we have all sorts of >

Re: Tests blocked by AssertionError 200 != 302 in login() calls

2009-12-05 Thread Gordon A
On Dec 5, 7:06 pm, Russell Keith-Magee wrote: > It's unclear if you're in the right place. Django-dev is for > discussing the development of Django itself; django-users is for > general user queries. Generally, if you're unsure, django-users is the > right place to start. Whoops. Sorry. > You

Re: smart if tag

2009-12-05 Thread Luke Plant
On Saturday 05 December 2009 20:09:21 Luke Plant wrote: > I'm not likely to able to look at this before Tuesday. If anyone > wants to look at it, I think the right approach is something like > the following: > http://effbot.org/zone/simple-top-down-parsing.htm > (without the globals, obviously,

Re: Session/cookie based messages (#4604)

2009-12-05 Thread Russell Keith-Magee
On Sun, Dec 6, 2009 at 2:57 AM, Tobias McNulty wrote: > On Sat, Dec 5, 2009 at 8:40 AM, Russell Keith-Magee > wrote: >> * Why have all the tests migrated to the Django system tests? This is >> a contrib app - the tests should be internal to the app. > > They were moved to facilitate inclusion of

Re: Multiple database support: Request for feedback and testing

2009-12-05 Thread Russell Keith-Magee
On Sun, Dec 6, 2009 at 12:35 AM, Simon Willison wrote: > On Dec 5, 4:20 pm, Russell Keith-Magee wrote: >> Trust me - I don't want to do mindless busy work. However, we need to >> have some sort of answer for the admin interface - Django's admin is a >> big selling point for Django for some people

Re: Multiple database support: Request for feedback and testing

2009-12-05 Thread Russell Keith-Magee
On Sun, Dec 6, 2009 at 1:09 AM, Tobias McNulty wrote: > On Sat, Dec 5, 2009 at 10:51 AM, Russell Keith-Magee > wrote: >> >> I don't grant that proposition at all. The admin interface serves as a >> working example demonstrating that you don't need to use settings to >> define the way models are u

Re: Multiple database support: Request for feedback and testing

2009-12-05 Thread Russell Keith-Magee
On Sun, Dec 6, 2009 at 4:16 AM, subs...@gmail.com wrote: > Oh, I see from a later message by Alex that Meta.using was removed. > > -1! There's a very good reason why this was removed. It isn't a model level property. Consider - what if contrib.auth.User had a Meta using='foo' property? If this we

Re: Tests blocked by AssertionError 200 != 302 in login() calls

2009-12-05 Thread Russell Keith-Magee
On Sun, Dec 6, 2009 at 2:41 AM, Gordon A wrote: > Apologies if this isn't the right forum for this question. It's unclear if you're in the right place. Django-dev is for discussing the development of Django itself; django-users is for general user queries. Generally, if you're unsure, django-user

Re: Multiple database support: Request for feedback and testing

2009-12-05 Thread subs...@gmail.com
Oh, I see from a later message by Alex that Meta.using was removed. -1! -S On Dec 5, 3:12 pm, "subs...@gmail.com" wrote: > Isn't 'database' going to be an option in a model's Meta? In this > situation, is admin going to attempt to do something different? > > -S > > On Dec 4, 9:18 am, Nan wrote

Re: Multiple database support: Request for feedback and testing

2009-12-05 Thread subs...@gmail.com
Isn't 'database' going to be an option in a model's Meta? In this situation, is admin going to attempt to do something different? -S On Dec 4, 9:18 am, Nan wrote: > > 1) Ignore the problem. Admin works on the default database, but > > nowhere else. This is certainly less than ideal, but it would

Re: smart if tag

2009-12-05 Thread Luke Plant
First, thanks for your review Russell, I appreciate that you've been doing tons of work on lots of things! On Saturday 05 December 2009 15:39:03 Russell Keith-Magee wrote: > Here's the review I promised. First the minor points: > > * Line 814 of templates/defaulttags.py has a wierd UTF-8 chara

Re: Session/cookie based messages (#4604)

2009-12-05 Thread Tobias McNulty
Outstanding question regarding storage/backend notwithstanding, I uploaded a new patch here: http://code.djangoproject.com/attachment/ticket/4604/django-contrib-messages-6399c12d1773.diff Luke, it includes a note that fail_silently only hides the error when messages is disabled. I'm going to giv

Re: Session/cookie based messages (#4604)

2009-12-05 Thread Tobias McNulty
It looks like I mis-read the original question about storage vs. backend, so thanks for picking this up Luke. I don't have much to add to your argument except to say that it would be non-trivial to move to a more strictly organized/named setup. Cheers, Tobias On Sat, Dec 5, 2009 at 12:51 PM, Luk

Re: Session/cookie based messages (#4604)

2009-12-05 Thread Tobias McNulty
On Sat, Dec 5, 2009 at 8:40 AM, Russell Keith-Magee wrote: > * Why have all the tests migrated to the Django system tests? This is > a contrib app - the tests should be internal to the app. They were moved to facilitate inclusion of a more complete test suite with a test urls.py and views.py that

Tests blocked by AssertionError 200 != 302 in login() calls

2009-12-05 Thread Gordon A
Apologies if this isn't the right forum for this question. When I run "manage.py test", I get many errors of this form: FAIL: test_password_change_fails_with_invalid_old_password File File tests/views.py", line 136, in login AssertionError 200 != 302 The last line is always a call on a logi

Re: Session/cookie based messages (#4604)

2009-12-05 Thread Luke Plant
On Saturday 05 December 2009 13:40:40 Russell Keith-Magee wrote: > * I'd rather the AddMessageFailure have a more generic name (like > MessageFailure). I don't see any need to be task specific in the > exception class name. Another thing here we should think about: at the moment, fail_silently o

Ticket #11984 - mysql and errors like truncated incorrect datetime value: '0000-01-01 00:00:00'

2009-12-05 Thread Sorin Sbârnea
Hi all, I want to bring into discussion the http://code.djangoproject.com/ticket/11984 (patch included) - I spent quite some time in order to discover what is the real problem and to find a solution for it. Shortly when you try to use date_hierarchy with a mysql database where you have datetime f

Re: Multiple database support: Request for feedback and testing

2009-12-05 Thread Tobias McNulty
On Sat, Dec 5, 2009 at 10:51 AM, Russell Keith-Magee wrote: > > I don't grant that proposition at all. The admin interface serves as a > working example demonstrating that you don't need to use settings to > define the way models are used. > Okay. Do you grant the proposition that "we will (not

Re: Multiple database support: Request for feedback and testing

2009-12-05 Thread Simon Willison
On Dec 5, 4:20 pm, Russell Keith-Magee wrote: > Trust me - I don't want to do mindless busy work. However, we need to > have some sort of answer for the admin interface - Django's admin is a > big selling point for Django for some people, so we can't really > introduce a huge new feature, and then

Re: Multiple database support: Request for feedback and testing

2009-12-05 Thread Russell Keith-Magee
On Sat, Dec 5, 2009 at 11:33 PM, Waldemar Kornewald wrote: > Hi Russell, > > On Sat, Dec 5, 2009 at 2:58 PM, Russell Keith-Magee > wrote: >> On Sat, Dec 5, 2009 at 9:05 PM, Waldemar Kornewald >> wrote: >>> On Sat, Dec 5, 2009 at 12:10 PM, Russell Keith-Magee >>> wrote: The idea of using a

Re: Multiple database support: Request for feedback and testing

2009-12-05 Thread Russell Keith-Magee
On Sat, Dec 5, 2009 at 11:15 PM, Tobias McNulty wrote: > On Sat, Dec 5, 2009 at 8:58 AM, Russell Keith-Magee > wrote: >> As best as I can make out, you're addressing the problem that I've >> said we aren't addressing - that of presenting a useful end-user API >> for tasks like master/slave. If I'

Re: smart if tag

2009-12-05 Thread Russell Keith-Magee
On Tue, Dec 1, 2009 at 9:55 AM, Russell Keith-Magee wrote: > On Tue, Dec 1, 2009 at 1:08 AM, Luke Plant wrote: >> Patch >> = >> >> Review would be welcome, especially as I'm ill at the moment. I'm only >> coding because the boredom of doing nothing is killing me... > > I'll try and take a loo

Re: Multiple database support: Request for feedback and testing

2009-12-05 Thread Waldemar Kornewald
Hi Russell, On Sat, Dec 5, 2009 at 2:58 PM, Russell Keith-Magee wrote: > On Sat, Dec 5, 2009 at 9:05 PM, Waldemar Kornewald > wrote: >> On Sat, Dec 5, 2009 at 12:10 PM, Russell Keith-Magee >> wrote: >>> The idea of using a function that returns a single string but does >>> other processing is

Re: Multiple database support: Request for feedback and testing

2009-12-05 Thread Tobias McNulty
On Sat, Dec 5, 2009 at 8:58 AM, Russell Keith-Magee wrote: > As best as I can make out, you're addressing the problem that I've > said we aren't addressing - that of presenting a useful end-user API > for tasks like master/slave. If I'm mistaken, feel free to correct me > - preferably with some sa

Re: Signals for ManyToMany relations question

2009-12-05 Thread Russell Keith-Magee
On Sat, Dec 5, 2009 at 10:56 AM, Russell Keith-Magee wrote: > On Sat, Dec 5, 2009 at 5:35 AM, Ryan K wrote: >> >> I hope I'm not missing something glaringly obvious but the idea would >> be that an option in the Django instance's settings would enable this >> feature (or maybe as a decorator for

Re: Multiple database support: Request for feedback and testing

2009-12-05 Thread Russell Keith-Magee
On Sat, Dec 5, 2009 at 9:05 PM, Waldemar Kornewald wrote: > On Sat, Dec 5, 2009 at 12:10 PM, Russell Keith-Magee > wrote: >> The idea of using a function that returns a single string but does >> other processing is a novel approach, and one that I hadn't >> considered. However, I'm not sure I'm e

Re: Session/cookie based messages (#4604)

2009-12-05 Thread Russell Keith-Magee
On Mon, Nov 30, 2009 at 8:28 PM, Russell Keith-Magee wrote: > I'll take another look at this patch next week to make sure I haven't > missed anything. Assuming I don't find anything new and interesting > (and assuming you're happy with my response on the API issues), this > should be able to land

Re: Multiple database support: Request for feedback and testing

2009-12-05 Thread Waldemar Kornewald
On Sat, Dec 5, 2009 at 12:10 PM, Russell Keith-Magee wrote: > The idea of using a function that returns a single string but does > other processing is a novel approach, and one that I hadn't > considered. However, I'm not sure I'm especially fond of the idea of > requiring imports in a settings fi

Re: Multiple database support: Request for feedback and testing

2009-12-05 Thread Russell Keith-Magee
On Sat, Dec 5, 2009 at 4:07 PM, Johannes Dollinger wrote: > > Am 05.12.2009 um 06:36 schrieb Russell Keith-Magee: >> [...] >>> What if the admin was instead fixed >>> by providing facilities for the more general case outlined above? >>> >>> What would this look like?  I'm picturing another setting

Re: Multiple database support: Request for feedback and testing

2009-12-05 Thread Johannes Dollinger
Am 05.12.2009 um 06:36 schrieb Russell Keith-Magee: > [...] >> What if the admin was instead fixed >> by providing facilities for the more general case outlined above? >> >> What would this look like? I'm picturing another setting (bleh) that >> maps apps and/or models to specific databases. Nam