down votefavorite 
<https://stackoverflow.com/questions/46609072/how-to-add-cms-urls-integrated-in-my-django-application-to-sitemap-xml#>

I have this in my django project : In views.py :

   class MediatorViewSitemap(Sitemap):
changefreq = 'monthly'
priority = 0.8
def items(self):
    return Mediator.objects.exclude(photo='')
def lastmod(self, obj):

    return obj.modified

static_list 
=['home','mediators_list','about','faq','pricing','terms','privacy','contact',
]

    class StaticViewSitemap(Sitemap):
priority = 0.5
changefreq = 'daily'
def items(self):
    return static_list
def location(self, item):
    return reverse(item)

And this in my urls.py

    sitemaps = {'mediators': MediatorViewSitemap,'static': StaticViewSitemap
    }
       url(r'^sitemap\.xml$', sitemap, {'sitemaps': sitemaps},
name='django.contrib.sitemaps.views.sitemap'),

And it generate very well my sitemap.xml

Now i have integrated djangocms to my django project, so i have this url in 
the same urls.py :

    url(r'^blog/', include('cms.urls')),

What i want is to add it to the same sitemap.xml, any suggestion of any 
tutorial or help from anyone ?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/cc7cb923-a23d-49e8-b63b-38e1b4a65ce2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to