Hello, advanced Djangoers!

I would like to make sure, whether it is possible to override [URL #1]
an admin template and to write such a template code that would show
the fields of the related object in the editing form of the currently
edited object (not in edit_inline mode).

Let's say, if I have a model UserProfile that is one-to-one related to
auth.User, is it possible to write such a template, that while editing
profile, you would see the name, surname, and email of the  selected
(since the last save) user.

In another words, is it possible to get a related object from a form
field in the templating language.
What I need is something like:
<div>
{{ bound_field.field.rel.username }}
{{ bound_field.field.rel.first_name }}
{{ bound_field.field.rel.last_name }}
</div>

I hope that there are other ways to get the same information, such as
template tags or AJAX requests to custom XML with that data. But I
will only go to that direction if the way, I am asking about, fails.
Any hints?

regards,
Aidas Bendoraitis [aka Archatas]


[URL #1] 
http://code.djangoproject.com/wiki/NewAdminChanges#Adminconvertedtoseparatetemplates

[URL #2] 
http://www.b-list.org/weblog/2006/06/06/django-tips-extending-user-model

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to