8 Commits
v5.3 ... v5.4.1

Author SHA1 Message Date
Swen Kooij
a198440a64 Remove annoying quotes around 'master' in README 2019-10-20 18:20:27 +03:00
Swen Kooij
5945c3f531 Update pip install command for 5.4.1 2019-10-20 18:19:07 +03:00
Swen Kooij
3fd862ce4d Bump version number to 5.4.1 2019-10-20 18:15:05 +03:00
Swen Kooij
dad7f164cd Pin dependency down to django-postgres-extra <2.0 2019-10-20 18:14:12 +03:00
Swen Kooij
6490f3908c Add warning about v6 2019-10-20 18:00:29 +03:00
Uma Zalakain
54ad6eb434 The deprecation package removes its unnecessary unittest2 dependency 2019-09-13 21:03:31 +02:00
Swen Kooij
893fe0f5ab Bump version to 5.4 2019-08-14 08:58:08 +03:00
Swen Kooij
3de1492a58 Use collections.abc.Iterable instead of collections.Iterable
The latter is going to be removed after Python 3.8
2019-08-14 08:57:05 +03:00
5 changed files with 41 additions and 11 deletions

View File

@@ -1,8 +1,8 @@
django-localized-fields
=======================
.. image:: https://circleci.com/gh/SectorLabs/django-localized-fields.svg?style=svg
:target: https://circleci.com/gh/SectorLabs/django-localized-fields
.. image:: https://circleci.com/gh/SectorLabs/django-localized-fields/tree/v5.x.svg?style=svg
:target: https://circleci.com/gh/SectorLabs/django-localized-fields/tree/v5.x
.. image:: https://img.shields.io/github/license/SectorLabs/django-localized-fields.svg
:target: https://github.com/SectorLabs/django-localized-fields/blob/master/LICENSE.md
@@ -14,11 +14,17 @@ django-localized-fields
This package requires Python 3.5 or newer, Django 1.11 or newer and PostgreSQL 9.6 or newer.
----
**This README is for v5.x. Check out the master branch for v6.x and newer.**
----
Contributors
------------
* `seroy <https://github.com/seroy/>`_
* `unaizalakain <https://github.com/unaizalakain/>`_
* `umazalakain <https://github.com/umazalakain/>`_
Installation
------------
@@ -26,7 +32,7 @@ Installation
.. code-block:: bash
$ pip install django-localized-fields
$ pip install django-localized-fields==5.4.1
2. Add ``localized_fields`` and ``django.contrib.postgres`` to your ``INSTALLED_APPS``:

View File

@@ -1,7 +1,8 @@
import deprecation
import collections
from typing import Optional
from collections.abc import Iterable
from django.conf import settings
from django.utils import translation
@@ -97,7 +98,7 @@ class LocalizedValue(dict):
lang_value = value.get(lang_code, self.default_value)
self.set(lang_code, lang_value)
elif isinstance(value, collections.Iterable):
elif isinstance(value, Iterable):
for val in value:
self._interpret_value(val)

View File

@@ -1,2 +1,2 @@
django-postgres-extra==1.21a9
deprecation==2.0.3
django-postgres-extra==1.22
deprecation==2.0.7

View File

@@ -24,10 +24,33 @@ INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.admin',
'django.contrib.messages',
'localized_fields',
'tests',
)
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [],
"APP_DIRS": True,
"OPTIONS": {
"context_processors": [
"django.template.context_processors.debug",
"django.template.context_processors.request",
"django.contrib.auth.context_processors.auth",
"django.contrib.messages.context_processors.messages",
],
},
},
]
MIDDLEWARE = [
'django.contrib.messages.middleware.MessageMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
]
# set to a lower number than the default, since
# we want the tests to be fast, default is 100
LOCALIZED_FIELDS_MAX_RETRIES = 3

View File

@@ -33,7 +33,7 @@ with open(os.path.join(os.path.dirname(__file__), 'README.rst'), encoding='utf-8
setup(
name='django-localized-fields',
version='5.3',
version='5.4.1',
packages=find_packages(exclude=['tests']),
include_package_data=True,
license='MIT License',
@@ -44,9 +44,9 @@ setup(
author_email='open-source@sectorlabs.ro',
keywords=['django', 'localized', 'language', 'models', 'fields'],
install_requires=[
'django-postgres-extra>=1.22',
'django-postgres-extra>=1.22,<2.0',
'Django>=1.11',
'deprecation==2.0.3'
'deprecation==2.0.7'
],
classifiers=[
'Environment :: Web Environment',