On Wed, 2007-09-26 at 23:56 -0500, Joseph Kocherhans wrote:
> On 9/26/07, Mark Green <[EMAIL PROTECTED]> wrote:
> >
> > I say thanks for the pointer, too.
> > A quick question (since you seem to be involved with this), is there any
> > reason to have django not prefix the form fields by default with, say,
> > the model-name (so prefix='' or prefix='somethingelse' can still be
> > used if someone doesn't want it that way).
> >
> > I would definately vote for making it default unless someone can come
> > up with potential problems it may cause. There'd be just one thing less
> > to worry about if it was that way...
> >
> > And if there are worries about backwards compatibility I'd propose a
> > toggle-option in settings.py defaulting to False.
> 
> A couple of reasons not to do it. 1. It adds more complexity to
> Django, and to it's documentation, to save a few characters. 

Hmm. I'm not sure I buy into that, isn't most of the code complexity
already there (give or take a few lines to change the default 
behaviour)?

Wrt docs, I'd volunteer to write a paragraph explaining the issue,
although I believe a few lines of comments in settings.py should suffice
(if there was to be a boolean to toggle the functionality).

> 2.
> Auto-prefixing wouldn't work if you were trying to change 2 or more
> instances of the same model on the same page; they'd all have the same
> prefix.

While that is definately true the auto-prefix would at least remove the
problem for distinct models on the same form and imho more closely meet
developer-expectations (principle of least surprise). In the database
each table has it's own namespace, why should django merge them all
into one by default?

> If you're serious about it though, you could bring up a discussion on
> django-dev. Submitting a ticket with a patch and tests would by far be
> your best bet.

I fear I lack the code insight to submit a good patch but if you really
think that this is not a no-brainer I believe it should be worth a small
discussion on django-dev.

Ofcourse there sure are more important django issues floating around
but why-oh-why stop so short of doing it right? :\


-mark



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to