Re: Ticket #7539 (ON DELETE support) in Django 1.2?

2009-08-13 Thread Russell Keith-Magee
On Fri, Aug 14, 2009 at 9:16 AM, Michael Glassford wrote: > > Russell Keith-Magee wrote: Secondly: I'm sensitive to the extent that 'on delete cascade' et al are phrased in SQL specific terms. I fully acknowledge the use case - what happens to a FK when the object it points to is de

Re: Ticket #7539 (ON DELETE support) in Django 1.2?

2009-08-13 Thread Michael Glassford
Russell Keith-Magee wrote: > On Fri, Aug 14, 2009 at 12:06 AM, Michael Glassford > wrote: >> Russell Keith-Magee wrote: >>> On Thu, Aug 13, 2009 at 12:04 AM, Michael Glassford >>> wrote: http://code.djangoproject.com/ticket/7539 suggests a way to add On Delete and On Update support to

Re: Why does Django make it hard to debug tags?

2009-08-13 Thread Éric St-Jean
i had blogged about a similar problem with reverse, used in the 'url' template tag: http://wwd.ca/blog/2008/12/04/django-templates-and-proper-decorators/ swallowing exceptions is almost always a bad idea, but i always start out with the usually fair assessment that the django guys are smarter tha

Re: Ticket #7539 (ON DELETE support) in Django 1.2?

2009-08-13 Thread Russell Keith-Magee
On Fri, Aug 14, 2009 at 12:06 AM, Michael Glassford wrote: > > Russell Keith-Magee wrote: >> On Thu, Aug 13, 2009 at 12:04 AM, Michael Glassford >> wrote: >>> http://code.djangoproject.com/ticket/7539 suggests a way to add On >>> Delete and On Update support to Django foreign key fields, and incl

Re: Admin interface not preventing simultaneous editing of the same record

2009-08-13 Thread Will Hardy
A quick note on your approach: What if the user isn't supposed to have access to certain fields in a customised form? You probably want to take a checksum as Russell suggested earlier and put that in the hidden field. Of course, dealing with conflicts will be harder if you can't show the user whi

Re: Logging instead of connection.queries

2009-08-13 Thread Ivan Sagalaev
Hello! I'd like to revive the discussion about handling debug SQL log since I don't feel we've come to any conclusion. To summarize: - Ticket [5415] deals with implementing signals upon SQL queries. Nobody had any objections to it and it helps in solving my original problem of logging. - Mal

Re: Shouldn't custom fields in ModelForms pick up model Field options by default?

2009-08-13 Thread Ivan Sagalaev
Malcolm Tredinnick wrote: > If all you want to do is change the widget, you can do that in the > form's __init__ method by updating self.fields["name"].widget, for > example. There's also a ticket waiting for check-in implementing this common usecase: http://code.djangoproject.com/ticket/9223 P

Re: Shouldn't custom fields in ModelForms pick up model Field options by default?

2009-08-13 Thread dc
If you want inherit default attributes from model just use name = Author._meta.get_field('name').formfield() --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, sen

Re: Shouldn't custom fields in ModelForms pick up model Field options by default?

2009-08-13 Thread Brian Rosner
On Aug 13, 2009, at 1:59 PM, Kevin Henry wrote: > >> Well, surprise is in the eye of the participant. As noted above, it >> would be surprising to a lot of us if it did pick up the attributes >> because it removes control from the user. The current behaviour isn't >> illogical. > > Oh, I wasn't

Re: Shouldn't custom fields in ModelForms pick up model Field options by default?

2009-08-13 Thread Kevin Henry
> Well, surprise is in the eye of the participant. As noted above, it > would be surprising to a lot of us if it did pick up the attributes > because it removes control from the user. The current behaviour isn't > illogical. Oh, I wasn't suggesting that the user shouldn't be able to override thos

Re: Admin interface not preventing simultaneous editing of the same record

2009-08-13 Thread David
On Aug 12, 12:20 am, Alex Gaynor wrote: > Personally I think including > a JSON dump of the model with the page is the easiest solution, but I > could be convinced otherwise. I have something that works now: http://pastebin.com/f1bd4c7a3 There's a big comment in the clean() method that expla

Re: Ticket #7539 (ON DELETE support) in Django 1.2?

2009-08-13 Thread Michael Glassford
Russell Keith-Magee wrote: > On Thu, Aug 13, 2009 at 12:04 AM, Michael Glassford > wrote: >> http://code.djangoproject.com/ticket/7539 suggests a way to add On >> Delete and On Update support to Django foreign key fields, and includes >> a patch that implements the suggestions. At the time I subm

Re: Change list default sort modification proposal

2009-08-13 Thread Rock
My suggestion for handling the UI for multi-column sorts is to allow the definition of named sorts in a manner similar to the way that the default sorting is defined. With this in place, additional multi column orders can be accomplished simply by using this name as a sort selection and applying t

Re: Ticket #7539 (ON DELETE support) in Django 1.2?

2009-08-13 Thread Russell Keith-Magee
On Thu, Aug 13, 2009 at 12:04 AM, Michael Glassford wrote: > > http://code.djangoproject.com/ticket/7539 suggests a way to add On > Delete and On Update support to Django foreign key fields, and includes > a patch that implements the suggestions. At the time I submitted it, > getting Django 1.1 ou

Re: 1.2 Proposal: django debug toolbar in contrib

2009-08-13 Thread Russell Keith-Magee
On Thu, Aug 13, 2009 at 5:00 AM, Rob Hudson wrote: > > I'm not sure if this is the place but here are some other issues or > questions I have if this were to happen... This is as good a place as any. > * The jQuery question is a big one.  I've taken strides to make the > debug toolbar interopera

Re: 1.2 Proposal: django debug toolbar in contrib

2009-08-13 Thread David Cramer
Oh, and thats most likely my branch you're referring to Martin. I implemented a lot of the panels, and went so far as adding crazy monkey patching in some of them to catch some information I wanted. http://github.com/dcramer/django-debug-toolbar/tree/master On Aug 11, 11:38 am, Martin Maney wro

Re: 1.2 Proposal: django debug toolbar in contrib

2009-08-13 Thread David Cramer
I think it's mostly only my fork (and it's forks) that vary much from trunk. I never got around to changing the framework to come in line with the master branch I think because it didn't support everything that was needed. Not sure if it does now however. On Aug 12, 4:00 pm, Rob Hudson wrote: >