X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/e0de41ae1e67c230ad1e67f34f6f4f76e53d7234..06ae2ba67e697b8fa06229fc3117d4b081db1130:/scripts/setmainpage.py diff --git a/scripts/setmainpage.py b/scripts/setmainpage.py deleted file mode 100755 index e83a07f27..000000000 --- a/scripts/setmainpage.py +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. -# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. -# -from django.core.management import setup_environ -from wolnelektury import settings -import sys - -setup_environ(settings) - -from catalogue.models import Tag - - -MAIN_PAGE_THEMES = [ - u'Obywatel', - u'Car', - u'Błoto', - u'Krew', - u'Danse macabre', - u'Obcy', - u'Matka', - u'Gotycyzm', -] - - -for tag in Tag.objects.all(): - if tag.category in ('epoch', 'genre', 'author', 'kind'): - tag.main_page = True - elif tag.category == 'theme' and tag.name in MAIN_PAGE_THEMES: - tag.main_page = True - else: - tag.main_page = False - - tag.save() - sys.stderr.write('.') - -