Hello Django experts,
I'm trying to hack admin/change_form.html (do I need to hack the
corresponding view too?) to make Save options (submit_row tag in
admin/change_form.html) disappear if one of the user related to the
object being saved is different than the logged in user.
The problem is that I don't know how to access the list of related user
objects from this template (or corresponding admin/views/main.py).
Excerpt form my models:
class Contact(models.Model):
name = models.CharField(_('name'), maxlength=200,
unique=True, core=True)
user = models.ForeignKey(User, edit_inline=True,
num_in_admin=1, max_num_in_admin=1, unique=True)
class Application(models.Model):
name = models.CharField(_('application
name'),maxlength=200,unique=True)
admin = models.ManyToManyField(Contact,
verbose_name=_('administrator'), filter_interface=models.HORIZONTAL,
blank=True, null=True)
The object being saved is of class Application.
I'm sitting on MR branch.
Any idea please ?
Olivier.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---