Django nested URLs
问题 How do I nest url calls in django? For example, if I have two models defined as class Post(models.Model): title = models.CharField(max_length=50) body = models.TextField() created = models.DateTimeField(auto_now_add=True, editable=False) def __unicode__(self): return self.title @property def comments(self): return self.comment_set.all() class Comment(models.Model): comment = models.TextField() post = models.ForeignKey(Post) created = models.DateTimeField(auto_now_add=True) With the following