From 6178263065e272aeff1806ecc71fdd1f8256ceec Mon Sep 17 00:00:00 2001 From: Jarmil <jarmil.halamicek@seznam.cz> Date: Wed, 12 Aug 2020 21:19:15 +0200 Subject: [PATCH] DEL: nepotrebne modely kolem vyhledavani --- .../migrations/0008_auto_20200812_2117.py | 15 +++++++++++ program2021/models.py | 25 ------------------- 2 files changed, 15 insertions(+), 25 deletions(-) create mode 100644 program2021/migrations/0008_auto_20200812_2117.py diff --git a/program2021/migrations/0008_auto_20200812_2117.py b/program2021/migrations/0008_auto_20200812_2117.py new file mode 100644 index 00000000..ebbb30e0 --- /dev/null +++ b/program2021/migrations/0008_auto_20200812_2117.py @@ -0,0 +1,15 @@ +# Generated by Django 3.0.8 on 2020-08-12 19:17 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ("program2021", "0007_auto_20200812_1951"), + ] + + operations = [ + migrations.RemoveField(model_name="program2021pointpage", name="search_tags",), + migrations.DeleteModel(name="Program2021PointPageSearchTag",), + ] diff --git a/program2021/models.py b/program2021/models.py index 34a755a4..c13c6991 100644 --- a/program2021/models.py +++ b/program2021/models.py @@ -115,12 +115,6 @@ class Program2021PointPageTag(TaggedItemBase): ) -class Program2021PointPageSearchTag(TaggedItemBase): - content_object = ParentalKey( - "program2021.Program2021PointPage", on_delete=models.CASCADE - ) - - class Program2021PointPage(Page, MetadataPageMixin): RICH_TEXT_FEATURES = ["bold", "italic", "ol", "ul", "link", "document-link"] @@ -252,24 +246,6 @@ class Program2021PointPage(Page, MetadataPageMixin): ) owner_url = models.URLField("odkaz na garanta", blank=True, null=True) tags = ClusterTaggableManager(through=Program2021PointPageTag, blank=True) - search_tags = ClusterTaggableManager( - "Tagy pro vyhledávání", - through=Program2021PointPageSearchTag, - blank=True, - related_name="search_tags", - help_text="""Deleny do skupin se spolecnym prefixem, napr. "gender". Pokud je bod spolecny pro vsechny moznosti dane skupiny, pouzij tag se suffixem "-every". -Priklad: chces-li programovy bod pouze pro muze, zadej tag "gender-male", pokud je to jedno, musis zadat tag "gender-every". -Pro kazdou skupinu musis zadat aspon jeden tag, jinak se bod nedostane nikdy do vysledku vyhledavani. Seznam tagu po skupinach: -(gender-male gender-female gender-every) -(age-30 age-50 age-65 age-99 age-every) -(kids-yes kids-no kids-every) -(occupation-student occupation-employee-public occupation-employee-private occupation-entrepreneur occupation-maternity occupation-retired occupation-every) -(wealth-excelent wealth-good wealth-average wealth-bad wealth-every) -(travel-bike travel-car travel-public travel-every) -(housing-metropolis housing-town housing-village housing-every) -(education-zs education-ss education-maturita education-vs education-every) - """, - ) ### PANELS @@ -279,7 +255,6 @@ Pro kazdou skupinu musis zadat aspon jeden tag, jinak se bod nedostane nikdy do FieldPanel("public_title"), FieldPanel("annotation"), FieldPanel("tags"), - FieldPanel("search_tags"), FieldPanel("problem"), FieldPanel("ideal"), FieldPanel("already_done"), -- GitLab