Opened 14 years ago
Last modified 7 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)
Change History (23)
comment:1 Changed 14 years ago by
Status: | new → assigned |
---|
Changed 14 years ago by
Attachment: | generic-foreign-key-widget.diff added |
---|
comment:2 Changed 14 years ago by
Triage Stage: | Unreviewed → Accepted |
---|
comment:3 Changed 13 years ago by
Keywords: | design_ux added |
---|
comment:4 Changed 13 years ago by
Cc: | andy@… added |
---|
comment:5 Changed 13 years ago by
Cc: | Mikhail Korobov added |
---|
comment:6 Changed 13 years ago by
Cc: | Elijah Rutschman added |
---|
comment:7 Changed 13 years ago by
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
comment:8 Changed 12 years ago by
Severity: | → Normal |
---|---|
Type: | → New feature |
Changed 12 years ago by
Attachment: | 9976.generic-foreign-key-widget.diff added |
---|
Updated patch to current trunk
comment:9 Changed 12 years ago by
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.
comment:10 Changed 11 years ago by
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 Changed 11 years ago by
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 Changed 11 years ago by
Cc: | carlos.palol@… added |
---|
comment:13 Changed 11 years ago by
Cc: | unknownlighter@… added |
---|
comment:15 Changed 11 years ago by
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 Changed 11 years ago by
Cc: | hoddez added |
---|
comment:17 Changed 10 years ago by
Cc: | 4glitch@… added |
---|
comment:18 Changed 9 years ago by
Keywords: | raw_id_fields added |
---|
comment:19 Changed 8 years ago by
Owner: | changed from Alex Gaynor to Asif Saifuddin Auvi |
---|---|
Version: | 1.0 → master |
comment:20 Changed 7 years ago by
Owner: | Asif Saifuddin Auvi deleted |
---|---|
Status: | assigned → new |
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).