You can create pseudo fields in the admin
class CarAdmin(admin.ModelAdmin)
list_display = ('name','custom_field')
def custom_field(srlf, obj):
return mark_safe('<a href="http://www.google.com">Link</a>')
custom_field.short_description = 'Link to Google'
custom_field.allow_tags = True
I am not sure if this is what you look for, and I am not sure if allow_tags
is needed
On Monday, May 7, 2012 12:41:59 PM UTC+2, Aditya Sriram M wrote:
>
> Hi All,
>
> I could successfully try the Django framework on my Oracle DB. I never
> thought programming would be this easy!!!
> Thanks for the wonderful framework.
>
> Now, I want to have an Admin Site with 'another such admin site in its
> row'. Is it possible?
>
> Example: Take the models Customers, Users and Devices. Customers are
> unique and they can have 'n' Users and/or 'm' Devices.
> I will want to display the rows in Admin Site for the Customer Model and
> initially provide 'Click for Users' and 'Click for Devices' buttons in the
> last two rows.
> On clicking them another admin site for limited (say 10 rows)
> users/devices should be opened in an inner table with its own search box.
>
> Is this possible? Any workarounds will be much appreciated.. Thnx..
>
> Regards,
> Aditya
>
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/django-users/-/B9rRUTFSS3EJ.
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.