Opened 16 years ago

Last modified 9 years ago

#9976 new New feature

Generic Foreign Keys should have a nice widget(ala raw_id)

Reported by: Alex Gaynor Owned by:
Component: contrib.admin Version: dev
Severity: Normal Keywords: design_ux raw_id_fields
Cc: andy@…, Mikhail Korobov, Elijah Rutschman, carlos.palol@…, unknownlighter@…, hoddez, 4glitch@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: yes

Description

It would be nice if generic foreign keys could have a nice widget for the admin, right now they aren't very usable.

Attachments (3)

generic-foreign-key-widget.diff (11.2 KB ) - added by Alex Gaynor 16 years ago.
9976.generic-foreign-key-widget.diff (11.2 KB ) - added by Julien Phalip 13 years ago.
Updated patch to current trunk
9976.r17313.diff (10.9 KB ) - added by Preston Timmons 13 years ago.
Updated patch to r17313

Download all attachments as: .zip

Change History (23)

comment:1 by Alex Gaynor, 16 years ago

Status: newassigned

Work on this can be found here:

http://github.com/alex/django/commits/generic-foreign-key-widget

(sorry not at a machine where I can produce a proper diff right now).

by Alex Gaynor, 16 years ago

comment:2 by Jacob, 16 years ago

Triage Stage: UnreviewedAccepted

comment:3 by Russell Keith-Magee, 15 years ago

Keywords: design_ux added

comment:4 by Andy Baker, 15 years ago

Cc: andy@… added

comment:5 by Mikhail Korobov, 14 years ago

Cc: Mikhail Korobov added

comment:6 by anonymous, 14 years ago

Cc: Elijah Rutschman added

comment:7 by Gabe Jackson, 14 years ago

Thanks for this! In case somebody is trying to get this to work on 1.2. you would have to add:

def label_for_value(self, value):

return

to the GenericForeignKeyRawIdWidget class. otherwise it'll fail.

Greetings

Gabe

Version 0, edited 14 years ago by Gabe Jackson (next)

comment:8 by Chris Beaven, 14 years ago

Severity: Normal
Type: New feature

by Julien Phalip, 13 years ago

Updated patch to current trunk

comment:9 by Julien Phalip, 13 years ago

Easy pickings: unset
Has patch: set
UI/UX: set

I've updated the patch to current trunk and fixed the tests. I haven't examined the UI in detail yet though. Feedback and patches welcome.

by Preston Timmons, 13 years ago

Attachment: 9976.r17313.diff added

Updated patch to r17313

comment:10 by Preston Timmons, 13 years ago

I updated the patch to current trunk. I also fixed a typo in one of the raised exceptions and changed the Image model to use a CharField rather than an ImageField. I didn't see a good reason to require PIL to run the tests. I didn't examine the UI.

comment:11 by Julien Phalip, 13 years ago

Patch needs improvement: set

Thanks for updating the patch. Now that we've got Selenium support, it'd be also quite useful to write some Selenium tests for the Javascript part.

comment:12 by carlos.palol@…, 13 years ago

Cc: carlos.palol@… added

comment:13 by LighteR, 13 years ago

Cc: unknownlighter@… added

comment:14 by anonymous, 13 years ago

where can i find showGenericRelatedObjectLookupPopup()?

comment:15 by James Pic, 13 years ago

Hi all, i thought you'd like to know about a criticism of these patch and approach: https://github.com/yourlabs/django-autocomplete-light/issues/5#issuecomment-5809277

comment:16 by hoddez, 12 years ago

Cc: hoddez added

comment:17 by Dmitri Bogomolov <4glitch@…>, 12 years ago

Cc: 4glitch@… added

comment:18 by Collin Anderson, 10 years ago

Keywords: raw_id_fields added

comment:19 by Asif Saifuddin Auvi, 9 years ago

Owner: changed from Alex Gaynor to Asif Saifuddin Auvi
Version: 1.0master

comment:20 by Asif Saifuddin Auvi, 9 years ago

Owner: Asif Saifuddin Auvi removed
Status: assignednew
Note: See TracTickets for help on using tickets.
Back to Top