diff --git a/README.rst b/README.rst index b6628a6..ccdfdd7 100644 --- a/README.rst +++ b/README.rst @@ -12,9 +12,9 @@ django-localized-fields .. image:: https://badge.fury.io/py/django-localized-fields.svg :target: https://pypi.python.org/pypi/django-localized-fields -``django-localized-fields`` is an implementation of a field class for Django models that allows the field's value to be set in multiple languages. It does this by utilizing the ``hstore`` type (PostgreSQL specific), which is available as ``models.HStoreField`` in Django 1.10. +``django-localized-fields`` is an implementation of a field class for Django models that allows the field's value to be set in multiple languages. It does this by utilizing the ``hstore`` type (PostgreSQL specific), which is available as ``models.HStoreField`` since Django 1.10. -This package requires Python 3.5 or newer, Django 1.10 or newer and PostgreSQL 9.6 or newer. +This package requires Python 3.5 or newer, Django 1.11 or newer and PostgreSQL 9.6 or newer. Installation ------------ @@ -335,7 +335,7 @@ Frequently asked questions (FAQ) 2. Does this package work with Django 1.X? - No. Only Django 1.10 or newer is supported. This is because we rely on Django's ``HStoreField``. + No. Only Django 1.11 or newer is supported. This is because we rely on Django's ``HStoreField`` and template-based widget rendering. 3. Does this package come with support for Django Admin? diff --git a/requirements/test.txt b/requirements/test.txt index 1eb0eaa..7b475f0 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -1,7 +1,7 @@ -r base.txt coverage==4.2 -Django==1.10.2 +Django==1.11 django-autoslug==1.9.3 django-bleach==0.3.0 django-coverage-plugin==1.3.1 diff --git a/tests/test_widget.py b/tests/test_widget.py index a1ed753..f9bd382 100644 --- a/tests/test_widget.py +++ b/tests/test_widget.py @@ -1,3 +1,4 @@ +import re from django.conf import settings from django.test import TestCase @@ -42,3 +43,13 @@ class LocalizedFieldWidgetTestCase(TestCase): for _, value in zip(settings.LANGUAGES, decompressed_values): assert not value + + @staticmethod + def test_render(): + """Tests whether the :see:LocalizedFieldWidget correctly + render.""" + + widget = LocalizedFieldWidget() + output = widget.render(name='title', value=None) + assert bool(re.search('