From 1ce02268f2408836f716032bffbdb669c33a51ac Mon Sep 17 00:00:00 2001 From: Nikolaus Schlemm Date: Sat, 17 Jun 2017 03:09:49 +0200 Subject: [PATCH 1/4] fixed typo --- docs/usage.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/usage.rst b/docs/usage.rst index 75f0556..f8e2a13 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -168,7 +168,7 @@ will need to add the context processor to your settings: "django.core.context_processors.static", "django.core.context_processors.tz", "django.contrib.messages.context_processors.messages", - "cid.context_processos.cid_context_processor", + "cid.context_processors.cid_context_processor", ) This will place the context variable ``correlation_id`` in your template From 41d00fb033d4ece04cb63d5e2eda32e28dee0db5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Diemer?= Date: Wed, 21 Feb 2018 16:42:01 +0100 Subject: [PATCH 2/4] fix travis build --- .travis.yml | 25 +++++++++---------------- tox.ini | 40 ++++++++++++++++++++++++++-------------- 2 files changed, 35 insertions(+), 30 deletions(-) diff --git a/.travis.yml b/.travis.yml index 468502e..89ee1ba 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,31 +1,24 @@ language: python python: - "2.7" - + - "3.3" + - "3.4" + - "3.5" env: - matrix: - - TOX_ENV=py27-1.10 - - TOX_ENV=py34-1.10 - - TOX_ENV=py35-1.10 - - TOX_ENV=py27-1.9 - - TOX_ENV=py34-1.9 - - TOX_ENV=py35-1.9 - - TOX_ENV=py27-1.8 - - TOX_ENV=py33-1.8 - - TOX_ENV=py34-1.8 - - TOX_ENV=py35-1.8 - - TOX_ENV=py27-1.7 - - TOX_ENV=py33-1.7 - - TOX_ENV=py34-1.7 + - DJANGO="1.7" + - DJANGO="1.8" + - DJANGO="1.9" + - DJANGO="1.10" install: - pip install -U setuptools wheel - python setup.py develop - pip install --use-wheel -U -r requirements/ci.txt - pip install tox + - pip install tox-travis script: - - tox -e $TOX_ENV + - tox after_success: - coveralls diff --git a/tox.ini b/tox.ini index abdbc90..5f064e8 100644 --- a/tox.ini +++ b/tox.ini @@ -1,84 +1,96 @@ [tox] -envlist = py27-1.10, py34-1.10, py35-1.10, py27-1.9, py34-1.9, py35-1.9, py27-1.8, py33-1.8, py34-1.8, py35-1.8, py27-1.7, py33-1.7, py34-1.7, docs +envlist = py{27,34,35}-django1.{9,10}, py{27, 33, 34, 35}-django1.8, py{27, 33, 34}-django1.7, docs + +[travis] +python = + 2.7: py27 + 3.4: py34, docs + +[travis:env] +DJANGO = + 1.7: django1.7 + 1.8: django1.8, docs + 1.9: django1.9 + 1.10: django1.10 [testenv] commands = python runtests.py setenv = PYTHONPATH = {toxinidir}:{toxinidir}/cid -[testenv:py27-1.10] +[testenv:py27-django1.10] basepython = python2.7 deps = -r{toxinidir}/requirements/ci.txt django>=1.10,<1.11 -[testenv:py34-1.10] +[testenv:py34-django1.10] basepython = python3.4 deps = -r{toxinidir}/requirements/ci.txt django>=1.10,<1.11 -[testenv:py35-1.10] +[testenv:py35-django1.10] basepython = python3.5 deps = -r{toxinidir}/requirements/ci.txt django>=1.10,<1.11 -[testenv:py27-1.9] +[testenv:py27-django1.9] basepython = python2.7 deps = -r{toxinidir}/requirements/ci.txt django>=1.9,<1.10 -[testenv:py34-1.9] +[testenv:py34-django1.9] basepython = python3.4 deps = -r{toxinidir}/requirements/ci.txt django>=1.9,<1.10 -[testenv:py35-1.9] +[testenv:py35-django1.9] basepython = python3.5 deps = -r{toxinidir}/requirements/ci.txt django>=1.9,<1.10 -[testenv:py27-1.8] +[testenv:py27-django1.8] basepython = python2.7 deps = -r{toxinidir}/requirements/ci.txt django>=1.8,<1.9 -[testenv:py33-1.8] +[testenv:py33-django1.8] basepython = python3.3 deps = -r{toxinidir}/requirements/ci.txt django>=1.8,<1.9 -[testenv:py34-1.8] +[testenv:py34-django1.8] basepython = python3.4 deps = -r{toxinidir}/requirements/ci.txt django>=1.8,<1.9 -[testenv:py35-1.8] +[testenv:py35-django1.8] basepython = python3.5 deps = -r{toxinidir}/requirements/ci.txt django>=1.8,<1.9 -[testenv:py27-1.7] +[testenv:py27-django1.7] basepython = python2.7 deps = -r{toxinidir}/requirements/ci.txt django>=1.7,<1.8 -[testenv:py33-1.7] +[testenv:py33-django1.7] basepython = python3.3 deps = -r{toxinidir}/requirements/ci.txt django>=1.7,<1.8 -[testenv:py34-1.7] +[testenv:py34-django1.7] basepython = python3.4 deps = -r{toxinidir}/requirements/ci.txt From 4ab65107d2d7e51c560fe3a3f6bdfcb5bd6f7bb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Diemer?= Date: Wed, 21 Feb 2018 17:54:47 +0100 Subject: [PATCH 3/4] fix docs --- HISTORY.rst | 2 +- README.rst | 4 ++-- docs/_static/__empty__ | 0 docs/conf.py | 6 +++++- tox.ini | 4 +++- 5 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 docs/_static/__empty__ diff --git a/HISTORY.rst b/HISTORY.rst index 181b332..24a99d9 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -14,6 +14,6 @@ History * Made CID repsonse header configurable, and optional (thanks @dbaty) 0.2.0 (2016-12-06) -+++++++++++++++++ +++++++++++++++++++ * Added support for Django 1.10 middleware (thanks @qbey) diff --git a/README.rst b/README.rst index 7e745b5..67313f8 100644 --- a/README.rst +++ b/README.rst @@ -19,7 +19,7 @@ is quite a simple one. Incoming requests are assigned a unique id (a uuid). This can either happen in say your public facing web server (e.g. nginx) or be applied as soon as it hits django. -This ``cid`` is then available throught the django request/response cycle. We +This ``cid`` is then available through the django request/response cycle. We provide filters for logging witch adds the ``cid`` to the logging record so you can add it to your formatting string. We also provide wrappers around all the standard database backends which adds the ``cid`` as a comment before each SQL @@ -31,7 +31,7 @@ Features * Processing/Generation of a correlation id * Database wrappers to add correlation id to each sql call * Logging filter to inject the correlation id into logs -* A template context processe to make correlation id available in templates +* A template context processor to make correlation id available in templates * Output correlation id as a header Documentation can be found at: http://django-correlation-id.readthedocs.org/ diff --git a/docs/_static/__empty__ b/docs/_static/__empty__ new file mode 100644 index 0000000..e69de29 diff --git a/docs/conf.py b/docs/conf.py index 86c1f62..22bb727 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -251,4 +251,8 @@ #texinfo_show_urls = 'footnote' # If true, do not generate a @detailmenu in the "Top" node's menu. -#texinfo_no_detailmenu = False \ No newline at end of file +#texinfo_no_detailmenu = False + +# Make autodoc work with Django +os.environ['DJANGO_SETTINGS_MODULE'] = 'sandbox.settings' +suppress_warnings = ['image.not_readable'] diff --git a/tox.ini b/tox.ini index 5f064e8..ec9604d 100644 --- a/tox.ini +++ b/tox.ini @@ -99,6 +99,8 @@ deps = [testenv:docs] changedir = docs deps = - Sphinx==1.2.2 + Sphinx==1.7.0 + -r{toxinidir}/requirements/ci.txt + django>=1.8,<1.9 commands = sphinx-build -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html From afb17cc10d1e0aa7e9490d7f3c9f476c7480eced Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Diemer?= Date: Wed, 21 Feb 2018 21:10:24 +0100 Subject: [PATCH 4/4] last fix --- tox.ini | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index ec9604d..b0bb868 100644 --- a/tox.ini +++ b/tox.ini @@ -96,7 +96,9 @@ deps = -r{toxinidir}/requirements/ci.txt django>=1.7,<1.8 -[testenv:docs] +[docs] +setenv = + PYTHONPATH = {toxinidir}:{toxinidir}/cid changedir = docs deps = Sphinx==1.7.0