Django admin output extra HTML in ModelSite

Posted by VoteyDisciple on Stack Overflow See other posts from Stack Overflow or by VoteyDisciple
Published on 2010-03-14T18:02:35Z Indexed on 2010/03/14 18:05 UTC
Read the original article Hit count: 292

Filed under:
|

Ultimately, I want to add an <iframe> to the display of a particular model on Django's admin page. Django is already rendering the form for this model correctly, but I want to add this <iframe> in addition to Django's form. The src attribute needs to involve the primary key for the currently-displayed record.

I've learned how to properly override the change_form.html template through Django's documentation, and I can add markup to the right block, but I can't figure out how to access the primary key value. (No amount of determined Googling has helped at all.)

Alternatively, is there a direct way to specify that I want to produce extra output in my ModelSite definition?

© Stack Overflow or respective owner

Related posts about django

Related posts about django-admin