From 8a6edd2768b175dafa8d80f1cb86839f7f554efa Mon Sep 17 00:00:00 2001 From: Fabre Florian Date: Thu, 2 Jul 2020 12:23:20 +0200 Subject: [PATCH] Refs #41 Add django_extensions in dev requirements. Add settings info & shell targets in Makefile --- .circleci/circleci_settings.py | 6 +++++- .circleci/config.yml | 1 + Makefile | 12 ++++++++++++ creme/requirements-dev.txt | 2 ++ 4 files changed, 20 insertions(+), 1 deletion(-) diff --git a/.circleci/circleci_settings.py b/.circleci/circleci_settings.py index 9af4998258..9be346a38c 100644 --- a/.circleci/circleci_settings.py +++ b/.circleci/circleci_settings.py @@ -1,7 +1,11 @@ -from .settings import INSTALLED_CREME_APPS +from .settings import INSTALLED_CREME_APPS, INSTALLED_DJANGO_APPS SECRET_KEY = "CircleCi-Secret-Key" +INSTALLED_DJANGO_APPS.extend([ + 'django_extensions', +]) + INSTALLED_CREME_APPS.extend([ # 'creme.sms', # Work In Progress 'creme.cti', diff --git a/.circleci/config.yml b/.circleci/config.yml index 1298252d70..a56be7d4ac 100755 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -196,6 +196,7 @@ jobs: - checkout - install-creme-system-packages - install-py-dev-env + - run: cp ~/project/.circleci/circleci_settings.py creme/project_settings.py - run: python manage.py generatemedia - install-node-env - run: diff --git a/Makefile b/Makefile index e4c7db272e..dcd67d9ef1 100644 --- a/Makefile +++ b/Makefile @@ -63,6 +63,12 @@ serve: media python manage.py runserver +## Run shell +.PHONY: shell +shell: + python manage.py shell_plus + + ## Run the Javascript linters .PHONY: eslint eslint: @@ -98,6 +104,12 @@ flake8: lint: isort-check flake8 +## Print some Django settings +.PHONY: settings +settings: + @python manage.py print_settings INSTALLED_APPS MIDDLEWARE DATABASES LOGGING --format pprint + + ## Collect the messages to translate for the entire projet or the given app directories .PHONY: gettext-collect gettext-collect: diff --git a/creme/requirements-dev.txt b/creme/requirements-dev.txt index 11859e297b..301e126fdd 100644 --- a/creme/requirements-dev.txt +++ b/creme/requirements-dev.txt @@ -5,3 +5,5 @@ flake8 >=3.8.2,<3.8.1024 isort >=4.3.21,<4.3.1024 parameterized >=0.7.1,<0.7.1024 tblib >=1.6.0,<1.6.1024 + +django-extensions >=2.2.9,<2.2.1024