mirror of
https://github.com/SectorLabs/django-localized-fields.git
synced 2025-04-24 19:32:53 +03:00
Merge pull request #33 from MELScience/issue32
Django requirement updated
This commit is contained in:
commit
8b76948328
@ -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?
|
||||
|
||||
|
@ -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
|
||||
|
@ -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('<label (.|\n|\t)*>\w+<\/label>', output))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user