Hi!
I have following models relation:
class Section(models.Model):
section = models.CharField(max_length=200, unique=True)
name = models.CharField(max_length=200, blank = True)
class Article (models.Model):
url = models.CharField(max_length = 30, unique=True)
is_published = models.BooleanField()
section = models.ForeignKey(Section)
I need to create a sitemap for articles, which contains sitemap files for sections. I was reading django documentation about it here http://docs.djangoproject.com/en/dev/ref/contrib/sitemaps/
But didn't manage to find answer how can I:
- Define sitemap class in this case
- How can I pass section parameters into url file (as it's explained in the docs)
- From where can I get {'sitemaps': sitemaps} if I defined sitemap as a python class in another file in the application