Hi, As a pretty new user, I have been through the tutorials and experienced a bit, playing with magic-removal branch before the merge. (Note to the impatient: my question is at the end of the mail) I'd like to build a light ticket management system for my work team, and came up with the following model pattern (fields missing):
class Application(models.Model): """ The system manages a few applications. """ name = models.CharField(...) class Milestone(models.Model): """ Each application has milestones. """ name = models.CharField(...) application = models.ForeignKey(Application) class Ticket(models.Model): """ Tickets are created on an application and may be attached to a milestone (optional). """ name = models.CharField(...) application = models.ForeignKey(Application) milestone = models.ForeignKey(milestone, blank=True, null=True) Problems start when I use the admin interface, or when I play with generic views: Tickets may be created on application A, but attached to a milestone linked to application B!! I need to make sure tickets are attached to milestones belonging to the application they are created on. How may I do this? As I said, I have not yet been deeply in the Django code, but documentation does not enlighten me: - Shall I hack the Ticket AddManipulator in my creation view? (I find this ugly). - May I create a custom Manipulator ? (How?) - Is there something to do with the Manager? (Again, how?) - Something to tweak in my models definition of ForeignKey fields? - Or am I having it all wrong from the start :-) ? Thanks for the support, Vincent. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---