Changes between Initial Version and Version 1 of Ticket #11163


Ignore:
Timestamp:
May 20, 2009, 4:17:16 PM (15 years ago)
Author:
Ramiro Morales
Comment:

(reformatted description)

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #11163 – Description

    initial v1  
    11When the user specifies in their admin.py that a field is both editable and a raw_id, like this:
    22
     3{{{
    34    list_editable = ('owner',)
    45    raw_id_fields = ('owner',)
     6}}}
    57
    68the ForeignKeyRawIdWidget is used in the change list view for that field.  However, the code in the ForeignKeyRawIdWidget's render() method is hardcoded to be called from the edit form, with the following code:
    79
     10{{{
    811        related_url = '../../../%s/%s/' % (self.rel.to._meta.app_label, self.rel.to._meta.object_name.lower())
     12}}}
    913
    1014When called from the change list, the url has one less entry than when called from the edit form.  As a result, the link is wrong when called from the change list.  For example, the url for the changelist is something like this:
Back to Top