diff --git a/config/settings.py b/config/settings.py index e2ff5214..67001dd6 100644 --- a/config/settings.py +++ b/config/settings.py @@ -52,6 +52,7 @@ "django.contrib.messages", "django.contrib.staticfiles", "django.contrib.humanize", + "django.contrib.sitemaps", "django.contrib.sites", "django.forms", # My own apps diff --git a/config/urls.py b/config/urls.py index a2a7d384..357b7658 100644 --- a/config/urls.py +++ b/config/urls.py @@ -11,6 +11,7 @@ from wagtail import urls as wagtail_urls from wagtail.admin import urls as wagtailadmin_urls from wagtail.documents import urls as wagtaildocs_urls +from wagtail.contrib.sitemaps.views import sitemap urlpatterns = [ ##### Django admin @@ -26,7 +27,9 @@ path("stripe/", include("djstripe.urls", namespace="djstripe")), # rosetta path("rosetta/", include("rosetta.urls")), - ##### core app + # sitemap + path("sitemap.xml", sitemap), + # core app path("", include("core.urls")), ] diff --git a/core/models/cvs.py b/core/models/cvs.py index 65246aa8..3fb8f5fb 100644 --- a/core/models/cvs.py +++ b/core/models/cvs.py @@ -109,6 +109,7 @@ def crete_cvs_from_profile_templates(cls): cv = cls.objects.create(profile=profile, tex=tex, auto_created=True) cv.render_files() print(f"✅ {cv} created.") + del cv def __str__(self) -> str: return f"CV ({self.profile.fullname} {self.tex})"