Skip to content

Commit

Permalink
Merge pull request #22 from julen/issue/18
Browse files Browse the repository at this point in the history
Add support for Django 1.8, 1.9 and 1.10
  • Loading branch information
Sébastien Fievet committed Aug 12, 2016
2 parents 472827c + 7c88e4e commit f543cdd
Show file tree
Hide file tree
Showing 14 changed files with 134 additions and 428 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*.egg-info
*.pyc
*.egg
*.swp
pip-log.txt
/htmlcov
/cover
Expand Down
4 changes: 2 additions & 2 deletions .python-version
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
3.5.2
3.4.3
3.3.6
3.2.6
2.7.10
2.6.9
2.7.12
22 changes: 9 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,24 @@
language: python
python:
- "2.6"
- "2.7"
- "3.2"
- "3.3"
- "3.4"
- "3.5"
env:
- DJANGO_VERSION=1.4
- DJANGO_VERSION=1.5
- DJANGO_VERSION=1.6
- DJANGO_VERSION=1.7
- DJANGO_VERSION=1.8
- DJANGO_VERSION=1.9
- DJANGO_VERSION=1.10
matrix:
exclude:
- python: "3.2"
env: DJANGO_VERSION=1.4
env: DJANGO_VERSION=1.9
- python: "3.3"
env: DJANGO_VERSION=1.4
- python: "3.4"
env: DJANGO_VERSION=1.4
- python: "2.6"
env: DJANGO_VERSION=1.7
- python: "2.6"
env: DJANGO_VERSION=1.8
env: DJANGO_VERSION=1.9
- python: "3.2"
env: DJANGO_VERSION=1.10
- python: "3.3"
env: DJANGO_VERSION=1.10
before_install:
- sudo apt-get install -y shtool
- shtool version -s "${DJANGO_VERSION}.0" dj_version.txt
Expand Down
36 changes: 25 additions & 11 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ The main website for ``django-statici18n`` is
.. _adding an overhead: https://docs.djangoproject.com/en/1.6/topics/i18n/translation/#note-on-performance
.. _github.com/zyegfryed/django-statici18n: https://github.com/zyegfryed/django-statici18n

Supported Django Versions
^^^^^^^^^^^^^^^^^^^^^^^^^

django-statici18n works with all the Django versions officially supported by the
Django project. At the time of writing, these are the 1.8 (LTS), 1.9 and 1.10
series.

Installation
------------

Expand All @@ -56,14 +63,21 @@ Installation

python manage.py compilejsi18n

4. Add the ``django.core.context_processors.i18n`` context processor to your
``TEMPLATE_CONTEXT_PROCESSORS`` setting - should have already been set by
Django::
4. Add the ``django.core.context_processors.i18n`` context processor to the
``context_processors`` section for your backend in the ``TEMPLATES`` setting
— it should have already been set by Django::

TEMPLATE_CONTEXT_PROCESSORS = (
# ...
'django.core.context_processors.i18n',
)
TEMPLATES = [
{
# ...
'OPTIONS': {
'context_processors': {
# ...
'django.core.context_processors.i18n',
},
},
},
]

5. Edit your template(s) and replace the `dynamically generated script`_ by the
statically generated one:
Expand Down Expand Up @@ -97,7 +111,7 @@ The following step assumes you're using `django.contrib.staticfiles`_.
<script>{% inlinei18n LANGUAGE_CODE %}</script>

.. _PyPI: http://pypi.python.org/pypi/django-statici18n
.. _translated: https://docs.djangoproject.com/en/1.6/topics/i18n/translation/#message-files
.. _compiled: https://docs.djangoproject.com/en/1.6/topics/i18n/translation/#compiling-message-files
.. _dynamically generated script: https://docs.djangoproject.com/en/1.6/topics/i18n/translation/#using-the-javascript-translation-catalog
.. _django.contrib.staticfiles: https://docs.djangoproject.com/en/1.6/ref/contrib/staticfiles/
.. _translated: https://docs.djangoproject.com/en/1.10/topics/i18n/translation/#message-files
.. _compiled: https://docs.djangoproject.com/en/1.10/topics/i18n/translation/#compiling-message-files
.. _dynamically generated script: https://docs.djangoproject.com/en/1.10/topics/i18n/translation/#using-the-javascript-translation-catalog
.. _django.contrib.staticfiles: https://docs.djangoproject.com/en/1.10/ref/contrib/staticfiles/
3 changes: 3 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Changelog
v.next (unreleased)
-------------------

* Added support for Django 1.9 and 1.10. This change also drops support for
Django 1.4, 1.5, 1.6 and 1.7 as they are not officially supported by the DSF
anymore (#18).
* Added support for `USE_18N = False` (#19).

v1.1.5 (2015 Aug 7)
Expand Down
6 changes: 3 additions & 3 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-r requirements-test.txt

tox==1.9.0
virtualenv==1.10.1
wheel==0.24.0
tox==2.3.1
virtualenv<14.0.0
wheel==0.29.0
10 changes: 5 additions & 5 deletions requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
-r requirements.txt

cov-core==1.15.0
coverage==3.7.1
flake8==2.4.0
pytest==2.6.4
pytest-cov==1.8.1
pytest-django==2.8.0
coverage<4
flake8==2.5.4
pytest==2.9.2
pytest-cov==2.2.1
pytest-django==2.9.1
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
django-appconf==0.6
six==1.9.0
django-appconf==1.0.2
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
include_package_data=True,
zip_safe=False,
install_requires=[
"Django>=1.4",
"Django>=1.8",
"django-appconf>=0.6",
],
license="BSD",
Expand All @@ -27,10 +27,11 @@
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.2",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
],
)

0 comments on commit f543cdd

Please sign in to comment.