Ordering a QuerySet based on a latest child models field

2013-03-01 Thread Sven Grunewaldt
Lets assume I want to show a list of runners ordered by their latest sprint time. class Runner(models.Model): name = models.CharField(max_length=255) class Sprint(models.Model): runner = models.ForeignKey(Runner) time = models.PositiveIntegerField() created = models.DateTimeFie

How to run a django app in a subdirectory alias

2012-06-29 Thread Sven Grunewaldt
Hi, I want to run a simple test project in a subdirectory alias on our development server. The basic setup is an nginx with a location that passes everything in a subdirectory to the wsgi application. Django obviously does not understand that it runs in an subdirectory alias, which completely