From f7c129340a2b03033183bcfe0d1243d38eb87952 Mon Sep 17 00:00:00 2001 From: wh1te909 Date: Mon, 6 Jul 2020 04:07:02 +0000 Subject: [PATCH] update reqs, add django-extensions for easier debugging --- api/tacticalrmm/requirements-dev.txt | 11 +++-------- api/tacticalrmm/requirements.txt | 10 +++++----- api/tacticalrmm/tacticalrmm/settings.py | 13 ++++++++----- docker/api/dockerfile | 2 +- install.sh | 2 +- update.sh | 2 +- 6 files changed, 19 insertions(+), 21 deletions(-) diff --git a/api/tacticalrmm/requirements-dev.txt b/api/tacticalrmm/requirements-dev.txt index df513b1b..5e22c3c2 100644 --- a/api/tacticalrmm/requirements-dev.txt +++ b/api/tacticalrmm/requirements-dev.txt @@ -1,8 +1,3 @@ -appdirs==1.4.4 -attrs==19.3.0 -black==19.10b0 -Click==7.1.2 -pathspec==0.8.0 -regex==2020.6.8 -toml==0.10.1 -typed-ast==1.4.1 +black +Werkzeug +django-extensions diff --git a/api/tacticalrmm/requirements.txt b/api/tacticalrmm/requirements.txt index 656d13e4..c3d72595 100644 --- a/api/tacticalrmm/requirements.txt +++ b/api/tacticalrmm/requirements.txt @@ -1,20 +1,20 @@ amqp==2.6.0 asgiref==3.2.10 billiard==3.6.3.0 -celery==4.4.5 +celery==4.4.6 certifi==2020.6.20 cffi==1.14.0 chardet==3.0.4 cryptography==2.9.2 decorator==4.4.2 -Django==3.0.7 +Django==3.0.8 django-cors-headers==3.4.0 django-rest-knox==4.1.0 djangorestframework==3.11.0 future==0.18.2 -idna==2.9 -importlib-metadata==1.6.1 -kombu==4.6.10 +idna==2.10 +importlib-metadata==1.7.0 +kombu==4.6.11 loguru==0.5.1 more-itertools==8.4.0 packaging==20.4 diff --git a/api/tacticalrmm/tacticalrmm/settings.py b/api/tacticalrmm/tacticalrmm/settings.py index 9afba4a1..b4440a35 100644 --- a/api/tacticalrmm/tacticalrmm/settings.py +++ b/api/tacticalrmm/tacticalrmm/settings.py @@ -13,6 +13,11 @@ AUTH_USER_MODEL = "accounts.User" # to alert user they need to manually refresh their browser APP_VER = "0.0.7" +try: + from .local_settings import * +except ImportError: + pass + INSTALLED_APPS = [ "django.contrib.admin", "django.contrib.auth", @@ -39,6 +44,9 @@ INSTALLED_APPS = [ "scripts", ] +if DEBUG and not "TRAVIS" in os.environ and not "AZPIPELINE" in os.environ: + INSTALLED_APPS += ("django_extensions",) + MIDDLEWARE = [ "django.middleware.security.SecurityMiddleware", "django.contrib.sessions.middleware.SessionMiddleware", @@ -109,11 +117,6 @@ LOG_CONFIG = { "handlers": [{"sink": os.path.join(LOG_DIR, "debug.log"), "serialize": False}] } -try: - from .local_settings import * -except ImportError: - pass - if "TRAVIS" in os.environ: DATABASES = { "default": { diff --git a/docker/api/dockerfile b/docker/api/dockerfile index 1fff8994..2df5af7f 100644 --- a/docker/api/dockerfile +++ b/docker/api/dockerfile @@ -23,7 +23,7 @@ EXPOSE 80 RUN apt-get update && apt-get install -y gettext-base COPY ./api/tacticalrmm/requirements.txt . RUN pip install --upgrade pip -RUN pip install --no-cache-dir --upgrade setuptools wheel +RUN pip install --no-cache-dir setuptools==47.3.2 wheel==0.34.2 RUN pip install --no-cache-dir -r requirements.txt COPY ./api/tacticalrmm/ . COPY ./docker/api/prestart.sh . diff --git a/install.sh b/install.sh index e35e5a44..688c551a 100755 --- a/install.sh +++ b/install.sh @@ -240,7 +240,7 @@ python3 -m venv env source /rmm/api/env/bin/activate cd /rmm/api/tacticalrmm pip install --no-cache-dir --upgrade pip -pip install --no-cache-dir --upgrade setuptools wheel +pip install --no-cache-dir setuptools==47.3.2 wheel==0.34.2 pip install --no-cache-dir -r /rmm/api/tacticalrmm/requirements.txt python manage.py migrate python manage.py collectstatic diff --git a/update.sh b/update.sh index eefbd342..a25e85af 100644 --- a/update.sh +++ b/update.sh @@ -17,7 +17,7 @@ python3 -m venv env source /rmm/api/env/bin/activate cd /rmm/api/tacticalrmm pip install --no-cache-dir --upgrade pip -pip install --no-cache-dir --upgrade setuptools wheel +pip install --no-cache-dir setuptools==47.3.2 wheel==0.34.2 pip install --no-cache-dir -r requirements.txt python manage.py migrate python manage.py delete_tokens