Hello,

I have a m2m relationship like this:

class Actor(models.Model):
    name = models.CharField(unique=True)
class Movie(models.Model):
    name = models.CharField(unique=True)
    actors = models.ManyToManyField(Actor)
class Comment(models.Model):
    actor = models.ForeignKey(Actor)
    movie = models.ForeignKey(Movie)
    comment = models.CharField()

Every actor belongs to a number movies, every movie contains a number
of actors.

What I want to achieve is, that in the form I chose a movie from the
movie-dropdown list, then the actor-dropdown displays only actors
acting in that particular movie. This can happen with javascript,
ajax, or any other good stuff.

I don't know wheter to use javascript, or ajax, or whatever. I don't
know if my model is good. Please help me starting with this. It's a
little complex at the moment :)
--~--~---------~--~----~------------~-------~--~----~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to