I would like when going in admin to edit an EnglishWord to see what
Greek words are referencing it, and be able to click on each GreekWord
and go to its edit page.
If I use edit_inline, I suppose I'll get a huge select box of all the
GreekWords there, and I don't want that.
Thanks!
The admin page does not operate in the way you want. You will need to do
some deep customisation in order to make that happen. There's been some
discussion on this list recently about how to customise the appearance
of various pages. You will also possibly have to write your own template
tags here, too. Not impossible if you approach with the right mindset,
but it's not "out of the box".
Regards,
Malcolm
### copy the change_form.html to you personal admin-directory
### change the change_form: add something like {% ShowGreekWords
object_id %}
### GreekWords is a templatetag which might look like:
from django.template import Library
register = Library()
def ShowGreekWords(object_id):
from app.words.models import GreekWord
greek_words_list = GreekWord.objects.filter(englishword=object_id)
return {
'greek_words': greek_words_list,
}
register.inclusion_tag('admin/tag_container/list_greekwords.html')
(ShowGreekWords )
### finally, you have to write the template mentioned above (which is
probably a list of greek words linked to its edit page)
patrick