From 59f3e0913fe8f964f482e0b7538800347a140ffe Mon Sep 17 00:00:00 2001
From: OndraRehounek <ondra.rehounek@seznam.cz>
Date: Fri, 4 Mar 2022 14:52:15 +0100
Subject: [PATCH] Replace asterisk imports with whole module

---
 district/models.py | 24 ++++++++++++------------
 region/models.py   | 24 ++++++++++++------------
 2 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/district/models.py b/district/models.py
index 3daa8eda..dc1e8aaa 100644
--- a/district/models.py
+++ b/district/models.py
@@ -25,7 +25,7 @@ from calendar_utils.models import CalendarMixin
 from shared.models import ArticleMixin, SubpageMixin
 from uniweb.constants import RICH_TEXT_FEATURES
 
-from .blocks import *
+from . import blocks
 
 
 class DistrictHomePage(MetadataPageMixin, CalendarMixin, Page):
@@ -33,8 +33,8 @@ class DistrictHomePage(MetadataPageMixin, CalendarMixin, Page):
 
     subheader = StreamField(
         [
-            ("header_simple", HomepageSimpleHeaderBlock()),
-            ("header", HomepageHeaderBlock()),
+            ("header_simple", blocks.HomepageSimpleHeaderBlock()),
+            ("header", blocks.HomepageHeaderBlock()),
         ],
         verbose_name="Blok pod headerem",
         blank=True,
@@ -317,7 +317,7 @@ class DistrictContactPage(SubpageMixin, MetadataPageMixin, Page):
     ### FIELDS
 
     contact_people = StreamField(
-        [("item", ContactItemBlock())],
+        [("item", blocks.ContactItemBlock())],
         verbose_name="Kontakty",
         blank=True,
     )
@@ -458,7 +458,7 @@ class DistrictPersonPage(SubpageMixin, MetadataPageMixin, Page):
     youtube_url = models.URLField("Odkaz na Youtube kanál", blank=True, null=True)
     flickr_url = models.URLField("Odkaz na Flickr", blank=True, null=True)
     other_urls = StreamField(
-        [("other_url", PersonUrlBlock())],
+        [("other_url", blocks.PersonUrlBlock())],
         verbose_name="Další odkaz",
         blank=True,
     )
@@ -542,7 +542,7 @@ class DistrictPeoplePage(SubpageMixin, MetadataPageMixin, Page):
     ### FIELDS
 
     content = StreamField(
-        [("people_group", PeopleGroupListBlock())],
+        [("people_group", blocks.PeopleGroupListBlock())],
         verbose_name="Obsah stránky",
         blank=True,
     )
@@ -625,13 +625,13 @@ class DistrictElectionPointPage(DistrictElectionBasePage):
 class DistrictElectionPage(SubpageMixin, MetadataPageMixin, Page):
     ### FIELDS
     header = StreamField(
-        [("election_header_block", ElectionHeaderBlock())],
+        [("election_header_block", blocks.ElectionHeaderBlock())],
         verbose_name="Obsah headeru",
         blank=True,
     )
 
     content = StreamField(
-        [("candidate_list", CandidateListBlock())],
+        [("candidate_list", blocks.CandidateListBlock())],
         verbose_name="Obsah stránky",
         blank=True,
     )
@@ -682,8 +682,8 @@ class DistrictProgramPage(SubpageMixin, MetadataPageMixin, Page):
     perex = models.TextField("Perex", blank=True)
     content = StreamField(
         [
-            ("static_program_block", StaticProgramBlock()),
-            ("redmine_program_block", RedmineProgramBlock()),
+            ("static_program_block", blocks.StaticProgramBlock()),
+            ("redmine_program_block", blocks.RedmineProgramBlock()),
         ],
         verbose_name="obsah stránky",
         blank=True,
@@ -721,7 +721,7 @@ class DistrictCenterPage(CalendarMixin, SubpageMixin, MetadataPageMixin, Page):
     )
     text = RichTextField("Text", null=True)
     sidebar_content = StreamField(
-        [("address", AddressBlock()), ("contact", CenterContactBlock())],
+        [("address", blocks.AddressBlock()), ("contact", blocks.CenterContactBlock())],
         verbose_name="Obsah bočního panelu",
         blank=True,
     )
@@ -767,7 +767,7 @@ class DistrictCrossroadPage(SubpageMixin, MetadataPageMixin, Page):
     ### FIELDS
 
     cards_content = StreamField(
-        [("cards", CardLinkBlock())],
+        [("cards", blocks.CardLinkBlock())],
         verbose_name="Karty rozcestníku",
         blank=True,
     )
diff --git a/region/models.py b/region/models.py
index fe9144bb..d9f9c544 100644
--- a/region/models.py
+++ b/region/models.py
@@ -25,7 +25,7 @@ from calendar_utils.models import CalendarMixin
 from shared.models import ArticleMixin, SubpageMixin
 from uniweb.constants import RICH_TEXT_FEATURES
 
-from .blocks import *
+from . import blocks
 
 
 class RegionHomePage(MetadataPageMixin, CalendarMixin, Page):
@@ -33,8 +33,8 @@ class RegionHomePage(MetadataPageMixin, CalendarMixin, Page):
 
     subheader = StreamField(
         [
-            ("header_simple", HomepageSimpleHeaderBlock()),
-            ("header", HomepageHeaderBlock()),
+            ("header_simple", blocks.HomepageSimpleHeaderBlock()),
+            ("header", blocks.HomepageHeaderBlock()),
         ],
         verbose_name="Blok pod headerem",
         blank=True,
@@ -315,7 +315,7 @@ class RegionContactPage(SubpageMixin, MetadataPageMixin, Page):
     ### FIELDS
 
     contact_people = StreamField(
-        [("item", ContactItemBlock())],
+        [("item", blocks.ContactItemBlock())],
         verbose_name="Kontakty",
         blank=True,
     )
@@ -454,7 +454,7 @@ class RegionPersonPage(SubpageMixin, MetadataPageMixin, Page):
     youtube_url = models.URLField("Odkaz na Youtube kanál", blank=True, null=True)
     flickr_url = models.URLField("Odkaz na Flickr", blank=True, null=True)
     other_urls = StreamField(
-        [("other_url", PersonUrlBlock())],
+        [("other_url", blocks.PersonUrlBlock())],
         verbose_name="Další odkaz",
         blank=True,
     )
@@ -537,7 +537,7 @@ class RegionPeoplePage(SubpageMixin, MetadataPageMixin, Page):
     ### FIELDS
 
     content = StreamField(
-        [("people_group", PeopleGroupListBlock())],
+        [("people_group", blocks.PeopleGroupListBlock())],
         verbose_name="Obsah stránky",
         blank=True,
     )
@@ -618,13 +618,13 @@ class RegionElectionPointPage(RegionElectionBasePage):
 class RegionElectionPage(SubpageMixin, MetadataPageMixin, Page):
     ### FIELDS
     header = StreamField(
-        [("election_header_block", ElectionHeaderBlock())],
+        [("election_header_block", blocks.ElectionHeaderBlock())],
         verbose_name="Obsah headeru",
         blank=True,
     )
 
     content = StreamField(
-        [("candidate_list", CandidateListBlock())],
+        [("candidate_list", blocks.CandidateListBlock())],
         verbose_name="Obsah stránky",
         blank=True,
     )
@@ -675,8 +675,8 @@ class RegionProgramPage(SubpageMixin, MetadataPageMixin, Page):
     perex = models.TextField("Perex", blank=True)
     content = StreamField(
         [
-            ("static_program_block", StaticProgramBlock()),
-            ("redmine_program_block", RedmineProgramBlock()),
+            ("static_program_block", blocks.StaticProgramBlock()),
+            ("redmine_program_block", blocks.RedmineProgramBlock()),
         ],
         verbose_name="obsah stránky",
         blank=True,
@@ -713,7 +713,7 @@ class RegionCenterPage(CalendarMixin, SubpageMixin, MetadataPageMixin, Page):
     )
     text = RichTextField("Text", null=True)
     sidebar_content = StreamField(
-        [("address", AddressBlock()), ("contact", CenterContactBlock())],
+        [("address", blocks.AddressBlock()), ("contact", blocks.CenterContactBlock())],
         verbose_name="Obsah bočního panelu",
         blank=True,
     )
@@ -759,7 +759,7 @@ class RegionCrossroadPage(SubpageMixin, MetadataPageMixin, Page):
     ### FIELDS
 
     cards_content = StreamField(
-        [("cards", CardLinkBlock())],
+        [("cards", blocks.CardLinkBlock())],
         verbose_name="Karty rozcestníku",
         blank=True,
     )
-- 
GitLab