Hi, I just started studying django and I'm having a problem with its
admin interface. In my model I have two classes, let's say
class ClassA (models.Model):
user = models.ForeignKey(User, help_text=_('ClassA owner'))
...
class ClassB (models.Model):
classa = models.ForeignKey(ClassA)
....
Now I'm trying to give the possibility of editing to each user his
instances of ClassB, even though only the superuser will create ClassA
objects. To achieve this, I had to overwrite queryset in the
modelAdmin of ClassB and it works.
The problem that now I'm having is that if a user modifies a ClassB
object he will see in the admin a select for all possible ClassA
objects, not only those owned by him. I tried to overwrite queryset in
the modelAdmin of ClassA, but is doesn't work.
I think that the admin is calling another function, and I'm not able
to understand which one it is.
Do you have a hint?
--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---