From ed15b2c737bffc83008c694f01ad693ddbdd974a Mon Sep 17 00:00:00 2001 From: Joe Banks Date: Wed, 25 Aug 2021 22:34:14 +0000 Subject: Run collectstatic in the image build process, disable in prod startup --- manage.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'manage.py') diff --git a/manage.py b/manage.py index d21546e1..e4d24002 100755 --- a/manage.py +++ b/manage.py @@ -138,10 +138,12 @@ class SiteManager: print("Applying migrations.") call_command("migrate", verbosity=self.verbosity) - print("Collecting static files.") - call_command("collectstatic", interactive=False, clear=True, verbosity=self.verbosity) if self.debug: + # In Production, collectstatic is ran in the Docker image + print("Collecting static files.") + call_command("collectstatic", interactive=False, clear=True, verbosity=self.verbosity) + self.set_dev_site_name() self.create_superuser() -- cgit v1.2.3 From 100eb41ca49d3739470fa4b6c6915614f2d17619 Mon Sep 17 00:00:00 2001 From: Joe Banks Date: Fri, 27 Aug 2021 21:00:45 +0100 Subject: Decrease verbosity in debug mode collectstatic Co-authored-by: Matteo Bertucci --- manage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manage.py') diff --git a/manage.py b/manage.py index e4d24002..f3256ecf 100755 --- a/manage.py +++ b/manage.py @@ -142,7 +142,7 @@ class SiteManager: if self.debug: # In Production, collectstatic is ran in the Docker image print("Collecting static files.") - call_command("collectstatic", interactive=False, clear=True, verbosity=self.verbosity) + call_command("collectstatic", interactive=False, clear=True, verbosity=self.verbosity - 1) self.set_dev_site_name() self.create_superuser() -- cgit v1.2.3 From fa25dc9e9e266dfee0ea4dbf7d292de465f8d4af Mon Sep 17 00:00:00 2001 From: Joe Banks Date: Fri, 27 Aug 2021 20:04:28 +0000 Subject: Linting compliance --- manage.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'manage.py') diff --git a/manage.py b/manage.py index f3256ecf..8bb5ae0d 100755 --- a/manage.py +++ b/manage.py @@ -142,7 +142,12 @@ class SiteManager: if self.debug: # In Production, collectstatic is ran in the Docker image print("Collecting static files.") - call_command("collectstatic", interactive=False, clear=True, verbosity=self.verbosity - 1) + call_command( + "collectstatic", + interactive=False, + clear=True, + verbosity=self.verbosity - 1 + ) self.set_dev_site_name() self.create_superuser() -- cgit v1.2.3