diff --git a/elections2021/constants.py b/elections2021/constants.py index 4660232477d65c0045347e33e6f639d4ab330d9b..ef3609dd8f61f5fbc8b475f48e46e58fb4f37b14 100644 --- a/elections2021/constants.py +++ b/elections2021/constants.py @@ -210,16 +210,16 @@ MINISTRY_ENVIRONMENT = "zivotni-prostredi" MINISTRY_CHOICES = ( (MINISTRY_TRANSPORT, "Doprava"), + (MINISTRY_FOREIGN, "EU, zahraničí a obrana"), (MINISTRY_FINANCES, "Finance"), (MINISTRY_CULTURE, "Kultura"), - (MINISTRY_DEFENSE, "Obrana"), + # (MINISTRY_DEFENSE, "Obrana"), (MINISTRY_SOCIAL, "Práce a sociální věci"), (MINISTRY_COUNTRYSIDE, "Místní rozvoj"), (MINISTRY_BUSINESS, "Průmysl a obchod"), (MINISTRY_JUSTICE, "Spravedlnost"), (MINISTRY_SCHOOLS, "Školství, mládež a tělovýchova"), (MINISTRY_INTERIOR, "Vnitro"), - (MINISTRY_FOREIGN, "Zahraniční věci"), (MINISTRY_HEALTH, "Zdravotnictví"), (MINISTRY_AGRICULTURE, "Zemědělství"), (MINISTRY_ENVIRONMENT, "Životní prostředí"), diff --git a/elections2021/models.py b/elections2021/models.py index 1bcd1116feeb8b876bc692c3e7436770d2aaf7c9..f97311750dba942e833d2d75468b94d6e1061586 100644 --- a/elections2021/models.py +++ b/elections2021/models.py @@ -1101,7 +1101,7 @@ class Elections2021ProgramPage( ImageChooserPanel("ministry_transport_photo"), ImageChooserPanel("ministry_finances_photo"), ImageChooserPanel("ministry_culture_photo"), - ImageChooserPanel("ministry_defense_photo"), + # ImageChooserPanel("ministry_defense_photo"), ImageChooserPanel("ministry_social_photo"), ImageChooserPanel("ministry_countryside_photo"), ImageChooserPanel("ministry_business_photo"), @@ -1222,6 +1222,13 @@ class Elections2021ProgramPage( @route(r"^resort/([a-z-]+)/$") def ministry_detail(self, request, param=None): + # obrana zrušená, přesměrovává se na zahraničí + if param == MINISTRY_DEFENSE: + url = self.url + self.reverse_subpage( + "ministry_detail", args=(MINISTRY_FOREIGN,) + ) + return HttpResponseRedirect(url) + ministry = param if param in MINISTRY_OPTIONS else None if not ministry: return HttpResponseRedirect(self.url) @@ -1639,7 +1646,7 @@ class Elections2021ProgramPointPage(SubpageMixin, MetadataPageMixin, Page): FieldPanel("weight_ministry_transport"), FieldPanel("weight_ministry_finances"), FieldPanel("weight_ministry_culture"), - FieldPanel("weight_ministry_defense"), + # FieldPanel("weight_ministry_defense"), FieldPanel("weight_ministry_social"), FieldPanel("weight_ministry_countryside"), FieldPanel("weight_ministry_business"),