Django

Code

Ticket #29 (new)

Opened 3 years ago

Last modified 2 months ago

Fix usability issue with limit_choices_to and "Add another" in admin

Reported by: adrian Assigned to: nobody
Milestone: post-1.0 Component: django.contrib.admin
Version: SVN Keywords:
Cc: jamespic@gmail.com Triage Stage: Someday/Maybe
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

django34: We have the ability to put a customized limit/filter on which related objects get displayed in select boxes. For instance, the "photographer" field on the "Add photo" form only displays the "Staff members" that have shoots_photos=True.

django34: This results in some usability problems, though, because if a producer doesn't see a person's name in the list, he might click "Add another..." instead of checking to make sure the person isn't in "Staff members" and doesn't have "shoots_photos" checked.

django34: Does this make sense?

wilson: kind of

wilson: what page would that case appear on

django34: Here's an example...

django34: The "Photographer" select box includes *only* the staff members that have shoots_photos=True.

django34: So if a producer doesn't see a photographer in there, he might click "Add another...", which would create an entirely new staff member. But it might be the case that the staff member DOES exist, just doesn't have shoots_photos=True checked.

wilson: if the staff member did exist, would it let them add them again?

django34: Yes, as long as the slug was different.

django34: The only way I can think of to fix this would be to have some sort of "Showing only photographers [Show all staff members]" link. Or to eliminate the filtering altogether.

wilson: i was going to suggest a "show all staff" link

wilson: yes, that is my suggestion

wilson: "show all staff" link next to the select

wilson: then "show photographers only" when the filter is off

django34: All right.

Attachments

Change History

07/14/05 13:45:25 changed by adrian

  • owner changed from adrian to wilson.

02/28/06 15:10:05 changed by Wilson

Let enough time go by and you will always disagree with yourself. I don't think my original suggestion is going to work here. "Show all staff" defeats the purpose of the limit in the first place.

The simplest solution is to just display a natural language description of the limit_choices requirements. But "Showing 53 staff members with takes photos set to true." isn't very user-friendly. Maybe this is just something that should be added to the help text for the field as a best practice?

Another problem is the fact that you can use "add another", create a new staff member that doesn't meet the limits and it won't show up. You could prefill the fields required to meet the limit in the add another popup (in this example, "takes photos" would be checked). That's not very transparent to the user, and it isn't clear that changing the prefilled fields will make your new object unavailable to the original relationship field.

01/24/07 21:20:58 changed by Gary Wilson <gary.wilson@gmail.com>

  • stage changed from Unreviewed to Design decision needed.

This is an interesting problem.

07/06/07 03:30:13 changed by mtredinnick

  • stage changed from Ready for checkin to Design decision needed.

Seems to have been a victim of the recent spam attack or something. Not "ready for checkin".

12/02/07 11:58:35 changed by jacob

  • version set to SVN.
  • stage changed from Design decision needed to Someday/Maybe.

06/16/08 12:15:00 changed by mrts

  • milestone set to post-1.0.

Non-essential for 1.0.

10/10/08 09:57:42 changed by anonymous

  • cc set to jamespic@gmail.com.

Add/Change #29 (Fix usability issue with limit_choices_to and "Add another" in admin)




Change Properties
Action