123456789101112131415161718192021222324252627 |
- from landing.models import LandingPage
- def create_pages_clean():
- if not LandingPage.objects.filter(slug='order'):
- LandingPage.objects.create(title="Главная", slug="main", content="")
- LandingPage.objects.create(title="Заказ онлайн", slug="order", content="")
- LandingPage.objects.create(title="FAQ", slug="faq", content="")
- LandingPage.objects.create(title="Цены", slug="price", content="")
- LandingPage.objects.create(title="Контакты", slug="contact", content="")
- if not LandingPage.objects.filter(slug__startswith="clean"):
- LandingPage.objects.create(title="Уборка автосалонов", slug="clean-car", content="")
- LandingPage.objects.create(title="Уборка фитнес клубов", slug="clean-fit", content="")
- LandingPage.objects.create(title="Уборка офисов, ТЦ и БЦ", slug="clean-office", content="")
- LandingPage.objects.create(title="Уборка ТСЖ", slug="clean-tcj", content="")
- LandingPage.objects.create(title="Уборка прилегающей территории", slug="clean-area", content="")
- LandingPage.objects.create(title="Мойка фасадов и остекления", slug="clean-facades", content="")
- LandingPage.objects.create(title="Комплексная уборка квартир", slug="clean-apartments", content="")
- LandingPage.objects.create(title="Комплексная уборка коттеджей", slug="clean-cottages", content="")
- LandingPage.objects.create(title="Генеральная уборка", slug="clean-out", content="")
- LandingPage.objects.create(title="Уборка после ремонта", slug="clean-renovation", content="")
- def create_pages_clean_admin(modeladmin, request, queryset):
- create_pages_clean()
- create_pages_clean_admin.short_description = "Созадть страницы по умолчанию"
|