diff --git a/Dockerfile b/Dockerfile index 2c840829ae86929bace6c9c68396c7bd808a5679..a2f45b0058c0cb4dad27d946b7c1f146b21104fa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,10 @@ RUN apt update && \ rm -rf /var/lib/apt/lists/* COPY requirements.txt /code/ -RUN pip install -r requirements.txt +RUN pip install -r requirements/base.txt +RUN pip install -r requirements/api.txt +RUN pip install -r requirements/cas.txt +RUN pip install -r requirements/production.txt COPY . /code/ diff --git a/README.md b/README.md index 5ae8a3967704fa1d128b6375f5990d51a3a943d4..123f09b867b4dcb427e2f8467fc59db5d66c909e 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ On supposera pour la suite que vous utiliser debian/ubuntu sur un serveur tout n $ python3 -m venv env $ source env/bin/activate - (env)$ pip3 install -r requirements.txt + (env)$ pip3 install -r requirements/base.txt (env)$ deactivate 4. uwsgi et Nginx diff --git a/note_kfet/settings/base.py b/note_kfet/settings/base.py index 103e368d5c04be9ced71e269a8fcde7c296268e7..fead0e4459f17c12374d270992c666f7d3c7b05e 100644 --- a/note_kfet/settings/base.py +++ b/note_kfet/settings/base.py @@ -37,7 +37,6 @@ INSTALLED_APPS = [ # External apps 'polymorphic', - 'reversion', 'crispy_forms', 'django_tables2', # Django contrib diff --git a/requirements/api.txt b/requirements/api.txt new file mode 100644 index 0000000000000000000000000000000000000000..8dd9f5f2e0a50d42949b2647a6184f9bd77598a8 --- /dev/null +++ b/requirements/api.txt @@ -0,0 +1,3 @@ +djangorestframework==3.9.0 +django-rest-polymorphic==0.1.8 + diff --git a/requirements.txt b/requirements/base.txt similarity index 72% rename from requirements.txt rename to requirements/base.txt index 69e692300f124d837389bec427b1bbf7d0023f36..e9dc7635ed8444cc48f0ce6c615cbe812622a9ba 100644 --- a/requirements.txt +++ b/requirements/base.txt @@ -4,16 +4,10 @@ defusedxml==0.6.0 Django~=2.2 django-allauth==0.39.1 django-autocomplete-light==3.5.1 -django-cas-client==1.5.3 -django-cas-server==1.1.0 django-crispy-forms==1.7.2 django-extensions==2.1.9 django-filter==2.2.0 -django-guardian==2.1.0 django-polymorphic==2.0.3 -djangorestframework==3.9.0 -django-rest-polymorphic==0.1.8 -django-reversion==3.0.3 django-tables2==2.1.0 docutils==0.14 idna==2.8 diff --git a/requirements/cas.txt b/requirements/cas.txt new file mode 100644 index 0000000000000000000000000000000000000000..d468d2d5077580bf004e625a136f31a1734dcef0 --- /dev/null +++ b/requirements/cas.txt @@ -0,0 +1,2 @@ +django-cas-client==1.5.3 +django-cas-server==1.1.0 diff --git a/requirements/production.txt b/requirements/production.txt new file mode 100644 index 0000000000000000000000000000000000000000..f0b5222826649e71d629934444582238919500d9 --- /dev/null +++ b/requirements/production.txt @@ -0,0 +1 @@ +psycopg2==2.8.4 diff --git a/tox.ini b/tox.ini index c4e88c786dc93b3d03e10e9b775644415267a2a1..7c432d55ab581b87a68e2e71ac22157d721706aa 100644 --- a/tox.ini +++ b/tox.ini @@ -9,7 +9,10 @@ skipsdist = True setenv = PYTHONWARNINGS = all deps = - -r{toxinidir}/requirements.txt + -r{toxinidir}/requirements/base.txt + -r{toxinidir}/requirements/api.txt + -r{toxinidir}/requirements/cas.txt + -r{toxinidir}/requirements/production.txt coverage commands = ./manage.py makemigrations @@ -18,7 +21,10 @@ commands = [testenv:linters] deps = - -r{toxinidir}/requirements.txt + -r{toxinidir}/requirements/base.txt + -r{toxinidir}/requirements/api.txt + -r{toxinidir}/requirements/cas.txt + -r{toxinidir}/requirements/production.txt flake8 flake8-colors flake8-import-order