Hi, In attempting to get a better grasp of Django, I'm attempting a fairly simple timecard app. Multiple users of a small chain of retail stores, where occasionally the employees jump between stores(company), and between projects and activities.
The interesting model is something like this: class Timecard(models.Model): employee = models.ForeignKey(Employee) company = models.ForeignKey(Company) project = models.ForeignKey(Project) activity = models.ForeignKey(Activity) start = models.DateTimeField('The start time of the shift') duration = models.DecimalField('The duration of the shift in hours', max_digits=4, decimal_places=2) notes = models.TextField('Special Notes on the shift') I've populated it with some data from a previous system (trying to reproduce with Django), and I'm now trying to display a form which shows a week at a time given a particular start date (which for now is always a Sunday). I'm trying to show employee, company, project on a single line followed by the totals (summing the activity as its always 'default' for now) for Sun to Sat and a total. So something like the following (pipes show columns for this post purpose only): J Smith | BranchA | Admin | 0.0 | 4.5 | 8.0 | 8.0 | 8.0 | 8.0 | 0.0 | 36.5 J Smith | BranchA | Training | 0.0 | 3.5 | 8.0 | 8.0 | 8.0 | 8.0 | 0.0 | 36.5 Being new to Python and Django, I can't seem to get a function written to kick this output out. Any pointers? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---