added post_office and crontab
This commit is contained in:
@@ -0,0 +1,121 @@
|
||||
django-jsonfield
|
||||
----------------
|
||||
|
||||
django-jsonfield is a reusable Django field that allows you to store validated JSON in your model.
|
||||
|
||||
It silently takes care of serialization. To use, simply add the field to one of your models.
|
||||
|
||||
Python 3 & Django 1.8 through 1.11 supported!
|
||||
|
||||
**Use PostgreSQL?** 1.0.0 introduced a breaking change to the underlying data type, so if you were using < 1.0.0 please read https://github.com/dmkoch/django-jsonfield/issues/57 before upgrading. Also, consider switching to Django's native JSONField that was added in Django 1.9.
|
||||
|
||||
**Note:** There are a couple of third-party add-on JSONFields for Django. This project is django-jsonfield here on GitHub but is named `jsonfield on PyPI`_. There is another `django-jsonfield on Bitbucket`_, but that one is `django-jsonfield on PyPI`_. I realize this naming conflict is confusing and I am open to merging the two projects.
|
||||
|
||||
.. _jsonfield on PyPI: https://pypi.python.org/pypi/jsonfield
|
||||
.. _django-jsonfield on Bitbucket: https://bitbucket.org/schinckel/django-jsonfield
|
||||
.. _django-jsonfield on PyPI: https://pypi.python.org/pypi/django-jsonfield
|
||||
|
||||
**Note:** Django 1.9 added native PostgreSQL JSON support in `django.contrib.postgres.fields.JSONField`_. This module is still useful if you need to support JSON in databases other than PostgreSQL or are creating a third-party module that needs to be database-agnostic. But if you're an end user using PostgreSQL and want full-featured JSON support, I recommend using the built-in JSONField from Django instead of this module.
|
||||
|
||||
.. _django.contrib.postgres.fields.JSONField: https://docs.djangoproject.com/en/dev/ref/contrib/postgres/fields/#jsonfield
|
||||
|
||||
**Note:** Semver is followed after the 1.0 release.
|
||||
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
pip install jsonfield
|
||||
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from django.db import models
|
||||
from jsonfield import JSONField
|
||||
|
||||
class MyModel(models.Model):
|
||||
json = JSONField()
|
||||
|
||||
Advanced Usage
|
||||
--------------
|
||||
|
||||
By default python deserializes json into dict objects. This behavior differs from the standard json behavior because python dicts do not have ordered keys.
|
||||
|
||||
To overcome this limitation and keep the sort order of OrderedDict keys the deserialisation can be adjusted on model initialisation:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
import collections
|
||||
class MyModel(models.Model):
|
||||
json = JSONField(load_kwargs={'object_pairs_hook': collections.OrderedDict})
|
||||
|
||||
|
||||
Other Fields
|
||||
------------
|
||||
|
||||
**jsonfield.JSONCharField**
|
||||
|
||||
If you need to use your JSON field in an index or other constraint, you can use **JSONCharField** which subclasses **CharField** instead of **TextField**. You'll also need to specify a **max_length** parameter if you use this field.
|
||||
|
||||
|
||||
Compatibility
|
||||
--------------
|
||||
|
||||
django-jsonfield aims to support the same versions of Django currently maintained by the main Django project. See `Django supported versions`_, currently:
|
||||
|
||||
* Django 1.8 (LTS) with Python 2.7, 3.3, 3.4, or 3.5
|
||||
* Django 1.9 with Python 2.7, 3.4, or 3.5
|
||||
* Django 1.10 with Python 2.7, 3.4, or 3.5
|
||||
* Django 1.11 (LTS) with Python 2.7, 3.4, 3.5 or 3.6
|
||||
|
||||
.. _Django supported versions: https://www.djangoproject.com/download/#supported-versions
|
||||
|
||||
|
||||
Testing django-jsonfield Locally
|
||||
--------------------------------
|
||||
|
||||
To test against all supported versions of Django:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
$ docker-compose build && docker-compose up
|
||||
|
||||
Or just one version (for example Django 1.10 on Python 3.5):
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
$ docker-compose build && docker-compose run tox tox -e py35-1.10
|
||||
|
||||
|
||||
Travis CI
|
||||
---------
|
||||
|
||||
.. image:: https://travis-ci.org/dmkoch/django-jsonfield.svg?branch=master
|
||||
:target: https://travis-ci.org/dmkoch/django-jsonfield
|
||||
|
||||
Contact
|
||||
-------
|
||||
Web: http://bradjasper.com
|
||||
|
||||
Twitter: `@bradjasper`_
|
||||
|
||||
Email: `contact@bradjasper.com`_
|
||||
|
||||
|
||||
|
||||
.. _contact@bradjasper.com: mailto:contact@bradjasper.com
|
||||
.. _@bradjasper: https://twitter.com/bradjasper
|
||||
|
||||
Changes
|
||||
-------
|
||||
|
||||
Take a look at the `changelog`_.
|
||||
|
||||
.. _changelog: https://github.com/dmkoch/django-jsonfield/blob/master/CHANGES.rst
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
pip
|
||||
@@ -0,0 +1,143 @@
|
||||
Metadata-Version: 2.0
|
||||
Name: jsonfield
|
||||
Version: 2.0.2
|
||||
Summary: A reusable Django field that allows you to store validated JSON in your model.
|
||||
Home-page: https://github.com/dmkoch/django-jsonfield/
|
||||
Author: Dan Koch
|
||||
Author-email: dmkoch@gmail.com
|
||||
License: MIT
|
||||
Platform: UNKNOWN
|
||||
Classifier: Environment :: Web Environment
|
||||
Classifier: Intended Audience :: Developers
|
||||
Classifier: Operating System :: OS Independent
|
||||
Classifier: Programming Language :: Python
|
||||
Classifier: Programming Language :: Python :: 2.7
|
||||
Classifier: Programming Language :: Python :: 3
|
||||
Classifier: Programming Language :: Python :: 3.3
|
||||
Classifier: Programming Language :: Python :: 3.4
|
||||
Classifier: Programming Language :: Python :: 3.5
|
||||
Classifier: Programming Language :: Python :: 3.6
|
||||
Classifier: Framework :: Django
|
||||
Requires-Dist: Django (>=1.8.0)
|
||||
|
||||
django-jsonfield
|
||||
----------------
|
||||
|
||||
django-jsonfield is a reusable Django field that allows you to store validated JSON in your model.
|
||||
|
||||
It silently takes care of serialization. To use, simply add the field to one of your models.
|
||||
|
||||
Python 3 & Django 1.8 through 1.11 supported!
|
||||
|
||||
**Use PostgreSQL?** 1.0.0 introduced a breaking change to the underlying data type, so if you were using < 1.0.0 please read https://github.com/dmkoch/django-jsonfield/issues/57 before upgrading. Also, consider switching to Django's native JSONField that was added in Django 1.9.
|
||||
|
||||
**Note:** There are a couple of third-party add-on JSONFields for Django. This project is django-jsonfield here on GitHub but is named `jsonfield on PyPI`_. There is another `django-jsonfield on Bitbucket`_, but that one is `django-jsonfield on PyPI`_. I realize this naming conflict is confusing and I am open to merging the two projects.
|
||||
|
||||
.. _jsonfield on PyPI: https://pypi.python.org/pypi/jsonfield
|
||||
.. _django-jsonfield on Bitbucket: https://bitbucket.org/schinckel/django-jsonfield
|
||||
.. _django-jsonfield on PyPI: https://pypi.python.org/pypi/django-jsonfield
|
||||
|
||||
**Note:** Django 1.9 added native PostgreSQL JSON support in `django.contrib.postgres.fields.JSONField`_. This module is still useful if you need to support JSON in databases other than PostgreSQL or are creating a third-party module that needs to be database-agnostic. But if you're an end user using PostgreSQL and want full-featured JSON support, I recommend using the built-in JSONField from Django instead of this module.
|
||||
|
||||
.. _django.contrib.postgres.fields.JSONField: https://docs.djangoproject.com/en/dev/ref/contrib/postgres/fields/#jsonfield
|
||||
|
||||
**Note:** Semver is followed after the 1.0 release.
|
||||
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
pip install jsonfield
|
||||
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from django.db import models
|
||||
from jsonfield import JSONField
|
||||
|
||||
class MyModel(models.Model):
|
||||
json = JSONField()
|
||||
|
||||
Advanced Usage
|
||||
--------------
|
||||
|
||||
By default python deserializes json into dict objects. This behavior differs from the standard json behavior because python dicts do not have ordered keys.
|
||||
|
||||
To overcome this limitation and keep the sort order of OrderedDict keys the deserialisation can be adjusted on model initialisation:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
import collections
|
||||
class MyModel(models.Model):
|
||||
json = JSONField(load_kwargs={'object_pairs_hook': collections.OrderedDict})
|
||||
|
||||
|
||||
Other Fields
|
||||
------------
|
||||
|
||||
**jsonfield.JSONCharField**
|
||||
|
||||
If you need to use your JSON field in an index or other constraint, you can use **JSONCharField** which subclasses **CharField** instead of **TextField**. You'll also need to specify a **max_length** parameter if you use this field.
|
||||
|
||||
|
||||
Compatibility
|
||||
--------------
|
||||
|
||||
django-jsonfield aims to support the same versions of Django currently maintained by the main Django project. See `Django supported versions`_, currently:
|
||||
|
||||
* Django 1.8 (LTS) with Python 2.7, 3.3, 3.4, or 3.5
|
||||
* Django 1.9 with Python 2.7, 3.4, or 3.5
|
||||
* Django 1.10 with Python 2.7, 3.4, or 3.5
|
||||
* Django 1.11 (LTS) with Python 2.7, 3.4, 3.5 or 3.6
|
||||
|
||||
.. _Django supported versions: https://www.djangoproject.com/download/#supported-versions
|
||||
|
||||
|
||||
Testing django-jsonfield Locally
|
||||
--------------------------------
|
||||
|
||||
To test against all supported versions of Django:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
$ docker-compose build && docker-compose up
|
||||
|
||||
Or just one version (for example Django 1.10 on Python 3.5):
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
$ docker-compose build && docker-compose run tox tox -e py35-1.10
|
||||
|
||||
|
||||
Travis CI
|
||||
---------
|
||||
|
||||
.. image:: https://travis-ci.org/dmkoch/django-jsonfield.svg?branch=master
|
||||
:target: https://travis-ci.org/dmkoch/django-jsonfield
|
||||
|
||||
Contact
|
||||
-------
|
||||
Web: http://bradjasper.com
|
||||
|
||||
Twitter: `@bradjasper`_
|
||||
|
||||
Email: `contact@bradjasper.com`_
|
||||
|
||||
|
||||
|
||||
.. _contact@bradjasper.com: mailto:contact@bradjasper.com
|
||||
.. _@bradjasper: https://twitter.com/bradjasper
|
||||
|
||||
Changes
|
||||
-------
|
||||
|
||||
Take a look at the `changelog`_.
|
||||
|
||||
.. _changelog: https://github.com/dmkoch/django-jsonfield/blob/master/CHANGES.rst
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
jsonfield-2.0.2.dist-info/DESCRIPTION.rst,sha256=ol_8lnYqTVXq5ExDwAmbBhSUylv5skifu1MSqZJUszU,4077
|
||||
jsonfield-2.0.2.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
||||
jsonfield-2.0.2.dist-info/METADATA,sha256=fILysyClwPP4RqmlbgBEyjyhmBkYfqG_laVx_21m19M,4892
|
||||
jsonfield-2.0.2.dist-info/RECORD,,
|
||||
jsonfield-2.0.2.dist-info/WHEEL,sha256=o2k-Qa-RMNIJmUdIc7KU6VWR_ErNRbWNlxDIpl7lm34,110
|
||||
jsonfield-2.0.2.dist-info/metadata.json,sha256=EkZdQOU_zbNU_Uf6f6l2RPH3n9HoVNU0X8V0DbM5LIY,1010
|
||||
jsonfield-2.0.2.dist-info/top_level.txt,sha256=vKhrOliM1tJJBXUhSXSoHcWs_90pUa7ogHvn-mzxGKQ,10
|
||||
jsonfield/__init__.py,sha256=JzGSlVByVSYtIsp9iNf1S8pgxFdZ3ZY6y9Uys8hk2hs,53
|
||||
jsonfield/__pycache__/__init__.cpython-36.pyc,,
|
||||
jsonfield/__pycache__/encoder.cpython-36.pyc,,
|
||||
jsonfield/__pycache__/fields.cpython-36.pyc,,
|
||||
jsonfield/__pycache__/models.cpython-36.pyc,,
|
||||
jsonfield/__pycache__/subclassing.cpython-36.pyc,,
|
||||
jsonfield/__pycache__/tests.cpython-36.pyc,,
|
||||
jsonfield/encoder.py,sha256=LamzI8S3leLOW0RG80-YUb2oxZxtUhuHXpKogYadL2w,2306
|
||||
jsonfield/fields.py,sha256=09LBgXPcTxo6-rDwVewn8NhwtZ9yWe1DpoZehGVAcjk,6064
|
||||
jsonfield/models.py,sha256=yXIA5LSYKowbs8bQWcU1TJ4Yc10MdEP5zWS5QD5P38E,43
|
||||
jsonfield/subclassing.py,sha256=g1aGtzSlz3OisbQZgRtjDXVvQEqh0jNcMvZvBWHZ_ow,2236
|
||||
jsonfield/tests.py,sha256=c0E2QV2l2gc3OLTVEOsePHl8Nt3gdaTcU02ShZksAOo,14949
|
||||
@@ -0,0 +1,6 @@
|
||||
Wheel-Version: 1.0
|
||||
Generator: bdist_wheel (0.29.0)
|
||||
Root-Is-Purelib: true
|
||||
Tag: py2-none-any
|
||||
Tag: py3-none-any
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
{"classifiers": ["Environment :: Web Environment", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Framework :: Django"], "extensions": {"python.details": {"contacts": [{"email": "dmkoch@gmail.com", "name": "Dan Koch", "role": "author"}], "document_names": {"description": "DESCRIPTION.rst"}, "project_urls": {"Home": "https://github.com/dmkoch/django-jsonfield/"}}}, "extras": [], "generator": "bdist_wheel (0.29.0)", "license": "MIT", "metadata_version": "2.0", "name": "jsonfield", "run_requires": [{"requires": ["Django (>=1.8.0)"]}], "summary": "A reusable Django field that allows you to store validated JSON in your model.", "test_requires": [{"requires": ["Django (>=1.8.0)"]}], "version": "2.0.2"}
|
||||
@@ -0,0 +1 @@
|
||||
jsonfield
|
||||
Reference in New Issue
Block a user