I have a list_editable foreignkey field.  In the admin site change
list it is displayed with a nice search icon. but the link is bad!


it might be something on my end I dont know.... I updated to trunk and
removed all the pyc files, syncdb'd but it didnt help. I did some
digging and found I could get the correct url changing /site_packags/
django/contrib/admin/widgets.py's



class ForeignKeyRawIdWidget(forms.TextInput):
    """
    A Widget for displaying ForeignKeys in the "raw_id" interface
rather than
    in a <select> box.
    """
    def __init__(self, rel, attrs=None, using=None):
        self.rel = rel
        self.db = using
        super(ForeignKeyRawIdWidget, self).__init__(attrs)

    def render(self, name, value, attrs=None):
        if attrs is None:
            attrs = {}
        related_url = '../../../%s/%s/' %
(self.rel.to._meta.app_label, self.rel.to._meta.object_name.lower())
INTO
        related_url = '../../%s/%s/' % (self.rel.to._meta.app_label,
self.rel.to._meta.object_name.lower())

Now, I don't know if this is a bug or that I am doing something wrong.


I have these settings in the admin.py

class DotAttributeAdmin(admin.ModelAdmin):
    #readonly_fields = ('guid',)
    raw_id_fields = ('guid', )
    list_display = ('id','guid', 'key','name','value',)
    list_editable = ('guid', 'key', 'name','value',)
    list_filter = ('key',)


Any hints ?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to