Opened 16 years ago
Last modified 8 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 by , 16 years ago
Status: | new → assigned |
---|
by , 16 years ago
Attachment: | generic-foreign-key-widget.diff added |
---|
comment:2 by , 16 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:3 by , 15 years ago
Keywords: | design_ux added |
---|
comment:4 by , 15 years ago
Cc: | added |
---|
comment:5 by , 14 years ago
Cc: | added |
---|
comment:6 by , 14 years ago
Cc: | added |
---|
comment:7 by , 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
comment:8 by , 14 years ago
Severity: | → Normal |
---|---|
Type: | → New feature |
by , 13 years ago
Attachment: | 9976.generic-foreign-key-widget.diff added |
---|
Updated patch to current trunk
comment:9 by , 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.
comment:10 by , 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 , 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 , 12 years ago
Cc: | added |
---|
comment:13 by , 12 years ago
Cc: | added |
---|
comment:15 by , 12 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 , 12 years ago
Cc: | added |
---|
comment:17 by , 12 years ago
Cc: | added |
---|
comment:18 by , 10 years ago
Keywords: | raw_id_fields added |
---|
comment:19 by , 9 years ago
Owner: | changed from | to
---|---|
Version: | 1.0 → master |
comment:20 by , 8 years ago
Owner: | removed |
---|---|
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).