First commit
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
Sitemap XML pour les biens immobiliers actifs.
|
||||
"""
|
||||
from django.contrib.sitemaps import Sitemap
|
||||
from .models import Property
|
||||
|
||||
|
||||
class PropertySitemap(Sitemap):
|
||||
changefreq = 'weekly'
|
||||
priority = 0.8
|
||||
|
||||
def items(self):
|
||||
return Property.objects.filter(is_active=True).order_by('-updated_at')
|
||||
|
||||
def lastmod(self, obj):
|
||||
return obj.updated_at
|
||||
Reference in New Issue
Block a user