I couldn't help notice that #13023 was mentioned in Russ' latest 1.2
status update as a ticket that "will require some significant design
work". Since I've accepted that ticket I'd love to get some feedback
from folks.

The ticket: http://code.djangoproject.com/ticket/13023

The ticket was opened because the new javascript "Add Another"
functionality for admin inlines caused a useful (though possibly
unintended) feature to be removed: when setting extra to 0 you could
display existing inlines without allowing any new ones to be created.
The new javascript made this impossible because the "Add Another"
button was controlled by max_num, and ignored a value of 0.

When I tracked back through the code, I realized there was a more
fundamental problem: the javascript ignored a value of 0 because
max_num has a default value of 0, and all the code using it had taken
to equating max_num = 0 with being "off". So you can't actually have a
maximum of 0. It's not possible.

My patch for the ticket restored the desired behavior for admin
inlines, but I'll admit it was a bit of a hack and didn't address the
larger problem. I wasn't sure the larger problem was appropriate to
fix in the 1.2 timeframe.

So what is the appropriate course here? Should the default value and
behavior of max_num be changed? Does the entire feature need to be re-
evaluated? Are there other issues involved that I'm missing entirely?

I'm happy to work on the ticket (and have a reasonable grasp on that
area of the codebase), but I need some direction.

Thanks so much!

    - Gabriel

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

Reply via email to