mirror of
https://github.com/SectorLabs/django-localized-fields.git
synced 2025-10-19 06:18:57 +03:00
Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
f0ac0f7f25 | ||
|
93ffce557c | ||
|
7c432baec7 | ||
|
476a20ba88 | ||
|
ad99b77bcd | ||
|
151250505d | ||
|
d8b872758c | ||
|
a0ca977cab |
@@ -279,7 +279,7 @@ Besides ``LocalizedField``, there's also:
|
||||
|
||||
Allows storing integers in multiple languages. This works exactly like ``LocalizedField`` except that
|
||||
all values must be integers. Do note that values are stored as strings in your database because
|
||||
the backing field type is ``hstore``, which only allows storing integers. The ``LocalizedIntegerField``
|
||||
the backing field type is ``hstore``, which only allows storing strings. The ``LocalizedIntegerField``
|
||||
takes care of ensuring that all values are integers and converts the stored strings back to integers
|
||||
when retrieving them from the database. Do not expect to be able to do queries such as:
|
||||
|
||||
|
@@ -233,4 +233,4 @@ class LocalizedIntegerValue(LocalizedValue):
|
||||
"""Returns string representation of value"""
|
||||
|
||||
value = self.translate()
|
||||
return str(value) if value is not None else None
|
||||
return str(value) if value is not None else ''
|
||||
|
4
setup.py
4
setup.py
@@ -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.0a7',
|
||||
version='5.0a9',
|
||||
packages=find_packages(exclude=['tests']),
|
||||
include_package_data=True,
|
||||
license='MIT License',
|
||||
@@ -44,7 +44,7 @@ setup(
|
||||
author_email='open-source@sectorlabs.ro',
|
||||
keywords=['django', 'localized', 'language', 'models', 'fields'],
|
||||
install_requires=[
|
||||
'django-postgres-extra>=1.21a15',
|
||||
'django-postgres-extra>=1.21a16',
|
||||
'Django>=1.11',
|
||||
'deprecation==2.0.3'
|
||||
],
|
||||
|
Reference in New Issue
Block a user