Hi, I am writing a timekeeping app with Django, and have some design questions. Stripped down, I have a model somewhat like this:
class Customer(models.Model): Name = models.CharField(max_length=200) class ProjectCode(models.Model): Customer = models.ForeignKey('Customer') Code = models.CharField(max_length=30) class Hours(models.Model): Customer = models.ForeignKey('Customer') ProjectCode = models.ForeignKey('ProjectCode', blank=True) Date = models.DateField() Hours = models.FloatField() That is, the time registration class (Hours) has both a customer, and (optionally) a project code. I am currently using the standard admin interface to enter/edit objects, and it works to my expectations. However, there is one obvious problem here: when editing an Hours instance, the ProjectCode dropdown lists *all* project codes, not just those related to the selected customer. Obviously, I am going to need either a wizard-like interface or an Ajax solution to fix this. My preference here would be Ajax (to populate the ProjectCode dropdown based on the selected Customer). My question is twofold: - Does the standard admin application have provisions for something like this? - Alternatively, is there a change in my design I can make so the admin interface *can* cope with this? I'd really prefer to keep using the standard admin for now, focussing on adding functionality rather than getting the user interface the way I want it. Regards, Gertjan. -- Gertjan Klein <[EMAIL PROTECTED]> --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---