In the admin change list view, columns that are editable have an id,
ie:
<td>
<select id="id_form-0-owner" name="form-0-owner">
</select>
</td>
I would like to create a column where the value placed in the column
comes from a function, so I have something like this:
list_display = (other stuff ..., 'mySpecialColum')
Then in my object's admin class I define a method that creates the
value for the column:
def mySpecialColumn(self, obj):
return some html here
mySpecialColumn.allow_tags = True
In the html that mySpecialColumn() returns, I need to generate a
unique id for the field. I'd like it to follow the convention used
by the editable fields, ie, something like id="id_form-0-
mySpecialField". Is there any way for me to identify the form number
that my code is being called on behalf of, so that I can generate an
id similar to those in the editable fields?
Margie
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---