0001-misc-use-postgres-JSONField-41992.patch
debian/control | ||
---|---|---|
21 | 21 |
python-django-model-utils, |
22 | 22 |
python-requests, |
23 | 23 |
python-setuptools, |
24 |
python-django-jsonfield, |
|
25 | 24 |
python-suds, |
26 | 25 |
python-cmislib, |
27 | 26 |
python-lxml, |
debian/pydist-overrides | ||
---|---|---|
1 |
jsonfield python-django-jsonfield |
|
2 | 1 |
django-jsonresponse python-django-jsonresponse |
passerelle/apps/atos_genesys/migrations/0001_initial.py | ||
---|---|---|
4 | 4 | |
5 | 5 |
from django.db import migrations, models |
6 | 6 |
import django.db.models.deletion |
7 |
import jsonfield.fields
|
|
7 |
import django.contrib.postgres.fields.jsonb
|
|
8 | 8 | |
9 | 9 | |
10 | 10 |
class Migration(migrations.Migration): |
... | ... | |
23 | 23 |
('name_id', models.CharField(max_length=256, verbose_name='NameID')), |
24 | 24 |
('id_per', models.CharField(max_length=64, verbose_name='ID Per')), |
25 | 25 |
('created', models.DateTimeField(auto_now_add=True, verbose_name='Creation date')), |
26 |
('extra', jsonfield.fields.JSONField(null=True, verbose_name='Anything')),
|
|
26 |
('extra', django.contrib.postgres.fields.jsonb.JSONField(null=True, verbose_name='Anything')),
|
|
27 | 27 |
], |
28 | 28 |
options={ |
29 | 29 |
'ordering': ['created'], |
passerelle/apps/atos_genesys/models.py | ||
---|---|---|
17 | 17 |
import datetime |
18 | 18 |
import requests |
19 | 19 |
import xml.etree.ElementTree as ET |
20 |
import jsonfield |
|
21 | 20 | |
21 |
from django.contrib.postgres.fields import JSONField |
|
22 | 22 |
from django.db import models |
23 | 23 |
from django.utils import six |
24 | 24 |
from django.utils.six.moves.urllib import parse as urlparse |
... | ... | |
511 | 511 |
created = models.DateTimeField( |
512 | 512 |
verbose_name=_('Creation date'), |
513 | 513 |
auto_now_add=True) |
514 |
extra = jsonfield.JSONField(
|
|
514 |
extra = JSONField( |
|
515 | 515 |
verbose_name=_('Anything'), |
516 | 516 |
null=True) |
517 | 517 |
passerelle/apps/base_adresse/migrations/0016_auto_20200130_1604.py | ||
---|---|---|
3 | 3 |
from __future__ import unicode_literals |
4 | 4 | |
5 | 5 |
from django.db import migrations, models |
6 |
import jsonfield.fields
|
|
6 |
import django.contrib.postgres.fields.jsonb
|
|
7 | 7 | |
8 | 8 | |
9 | 9 |
class Migration(migrations.Migration): |
... | ... | |
18 | 18 |
fields=[ |
19 | 19 |
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
20 | 20 |
('api_id', models.CharField(max_length=30, unique=True)), |
21 |
('data', jsonfield.fields.JSONField(default=dict)),
|
|
21 |
('data', django.contrib.postgres.fields.jsonb.JSONField(default=dict)),
|
|
22 | 22 |
('timestamp', models.DateTimeField(auto_now=True)), |
23 | 23 |
], |
24 | 24 |
), |
passerelle/apps/base_adresse/models.py | ||
---|---|---|
1 | 1 |
import datetime |
2 | 2 |
import gzip |
3 | 3 | |
4 |
from jsonfield import JSONField |
|
5 | 4 |
from requests import RequestException |
6 | 5 | |
6 |
from django.contrib.postgres.fields import JSONField |
|
7 | 7 |
from django.db import connection, models |
8 | 8 |
from django.db.models import Q |
9 | 9 |
from django.utils.http import urlencode |
passerelle/apps/cartads_cs/migrations/0002_cartadsdatacache.py | ||
---|---|---|
3 | 3 |
from __future__ import unicode_literals |
4 | 4 | |
5 | 5 |
from django.db import migrations, models |
6 |
import jsonfield.fields
|
|
6 |
import django.contrib.postgres.fields.jsonb
|
|
7 | 7 | |
8 | 8 | |
9 | 9 |
class Migration(migrations.Migration): |
... | ... | |
18 | 18 |
fields=[ |
19 | 19 |
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
20 | 20 |
('data_type', models.CharField(max_length=50)), |
21 |
('data_parameters', jsonfield.fields.JSONField(default={})),
|
|
22 |
('data_values', jsonfield.fields.JSONField(default={})),
|
|
21 |
('data_parameters', django.contrib.postgres.fields.jsonb.JSONField(default={})),
|
|
22 |
('data_values', django.contrib.postgres.fields.jsonb.JSONField(default={})),
|
|
23 | 23 |
('last_update_datetime', models.DateTimeField(auto_now=True)), |
24 | 24 |
], |
25 | 25 |
), |
passerelle/apps/cartads_cs/migrations/0004_cartadsdossier_cartads_steps_cache.py | ||
---|---|---|
3 | 3 |
from __future__ import unicode_literals |
4 | 4 | |
5 | 5 |
from django.db import migrations |
6 |
import jsonfield.fields
|
|
6 |
import django.contrib.postgres.fields.jsonb
|
|
7 | 7 | |
8 | 8 | |
9 | 9 |
class Migration(migrations.Migration): |
... | ... | |
16 | 16 |
migrations.AddField( |
17 | 17 |
model_name='cartadsdossier', |
18 | 18 |
name='cartads_steps_cache', |
19 |
field=jsonfield.fields.JSONField(default={}),
|
|
19 |
field=django.contrib.postgres.fields.jsonb.JSONField(default={}),
|
|
20 | 20 |
), |
21 | 21 |
] |
passerelle/apps/cartads_cs/migrations/0011_cartadsdossier_cartads_cache_infos.py | ||
---|---|---|
3 | 3 |
from __future__ import unicode_literals |
4 | 4 | |
5 | 5 |
from django.db import migrations |
6 |
import jsonfield.fields
|
|
6 |
import django.contrib.postgres.fields.jsonb
|
|
7 | 7 | |
8 | 8 | |
9 | 9 |
class Migration(migrations.Migration): |
... | ... | |
16 | 16 |
migrations.AddField( |
17 | 17 |
model_name='cartadsdossier', |
18 | 18 |
name='cartads_cache_infos', |
19 |
field=jsonfield.fields.JSONField(default={}),
|
|
19 |
field=django.contrib.postgres.fields.jsonb.JSONField(default={}),
|
|
20 | 20 |
), |
21 | 21 |
] |
passerelle/apps/cartads_cs/models.py | ||
---|---|---|
31 | 31 |
from Crypto.Cipher import AES |
32 | 32 | |
33 | 33 |
from django.conf import settings |
34 |
from django.contrib.postgres.fields import JSONField |
|
34 | 35 |
from django.core.files.storage import default_storage |
35 | 36 |
from django.core.signing import Signer |
36 | 37 |
from django.core.urlresolvers import reverse |
... | ... | |
42 | 43 |
from django.utils.translation import ugettext_lazy as _ |
43 | 44 |
from django.utils.six.moves.urllib import parse as urlparse |
44 | 45 | |
45 |
from jsonfield import JSONField |
|
46 | 46 |
import zeep.exceptions |
47 | 47 |
import zeep.helpers as zeep_helpers |
48 | 48 |
passerelle/apps/csvdatasource/migrations/0005_csvdatasource__dialect_options.py | ||
---|---|---|
2 | 2 |
from __future__ import unicode_literals |
3 | 3 | |
4 | 4 |
from django.db import models, migrations |
5 |
import jsonfield.fields
|
|
5 |
import django.contrib.postgres.fields.jsonb
|
|
6 | 6 | |
7 | 7 | |
8 | 8 |
class Migration(migrations.Migration): |
... | ... | |
15 | 15 |
migrations.AddField( |
16 | 16 |
model_name='csvdatasource', |
17 | 17 |
name='_dialect_options', |
18 |
field=jsonfield.fields.JSONField(default=dict, editable=False),
|
|
18 |
field=django.contrib.postgres.fields.jsonb.JSONField(default=dict, editable=False),
|
|
19 | 19 |
preserve_default=True, |
20 | 20 |
), |
21 | 21 |
] |
passerelle/apps/csvdatasource/migrations/0006_auto_20160905_1031.py | ||
---|---|---|
2 | 2 |
from __future__ import unicode_literals |
3 | 3 | |
4 | 4 |
from django.db import migrations, models |
5 |
import jsonfield.fields
|
|
5 |
import django.contrib.postgres.fields.jsonb
|
|
6 | 6 | |
7 | 7 | |
8 | 8 |
class Migration(migrations.Migration): |
... | ... | |
19 | 19 |
migrations.AddField( |
20 | 20 |
model_name='csvdatasource', |
21 | 21 |
name='_dialect_options', |
22 |
field=jsonfield.fields.JSONField(null=True, editable=False),
|
|
22 |
field=django.contrib.postgres.fields.jsonb.JSONField(null=True, editable=False),
|
|
23 | 23 |
), |
24 | 24 |
] |
passerelle/apps/csvdatasource/migrations/0011_auto_20180905_0936.py | ||
---|---|---|
4 | 4 | |
5 | 5 |
from django.db import migrations, models |
6 | 6 |
import django.db.models.deletion |
7 |
import jsonfield.fields
|
|
7 |
import django.contrib.postgres.fields.jsonb
|
|
8 | 8 | |
9 | 9 | |
10 | 10 |
class Migration(migrations.Migration): |
... | ... | |
19 | 19 |
fields=[ |
20 | 20 |
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
21 | 21 |
('line_number', models.IntegerField()), |
22 |
('data', jsonfield.fields.JSONField(blank=True, default=dict)),
|
|
22 |
('data', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=dict)),
|
|
23 | 23 |
], |
24 | 24 |
options={ |
25 | 25 |
'ordering': ('line_number',), |
passerelle/apps/csvdatasource/models.py | ||
---|---|---|
26 | 26 |
from pyexcel_ods import get_data as get_data_ods |
27 | 27 |
from pyexcel_xls import get_data as get_data_xls |
28 | 28 | |
29 |
import jsonfield |
|
30 | ||
29 |
from django.contrib.postgres.fields import JSONField |
|
31 | 30 |
from django.utils.encoding import force_str, smart_text |
32 | 31 |
from django.utils.timezone import datetime, make_aware |
33 | 32 |
from django.conf import settings |
... | ... | |
141 | 140 |
default='id, text', |
142 | 141 |
help_text=_('ex: id,text,data1,data2'), blank=True) |
143 | 142 |
skip_header = models.BooleanField(_('Skip first line'), default=False) |
144 |
_dialect_options = jsonfield.JSONField(editable=False, null=True)
|
|
143 |
_dialect_options = JSONField(editable=False, null=True) |
|
145 | 144 |
sheet_name = models.CharField(_('Sheet name'), blank=True, max_length=150) |
146 | 145 | |
147 | 146 |
category = _('Data Sources') |
... | ... | |
494 | 493 |
class TableRow(models.Model): |
495 | 494 |
resource = models.ForeignKey('CsvDataSource', on_delete=models.CASCADE) |
496 | 495 |
line_number = models.IntegerField(null=False) |
497 |
data = jsonfield.JSONField(blank=True)
|
|
496 |
data = JSONField(blank=True) |
|
498 | 497 | |
499 | 498 |
class Meta: |
500 | 499 |
ordering = ('line_number',) |
passerelle/apps/gesbac/migrations/0001_initial.py | ||
---|---|---|
4 | 4 | |
5 | 5 |
from django.db import migrations, models |
6 | 6 |
import django.db.models.deletion |
7 |
import jsonfield.fields
|
|
7 |
import django.contrib.postgres.fields.jsonb
|
|
8 | 8 |
import passerelle.utils.sftp |
9 | 9 | |
10 | 10 | |
... | ... | |
25 | 25 |
('creation_datetime', models.DateTimeField(auto_now_add=True)), |
26 | 26 |
('filename', models.CharField(max_length=128, null=True)), |
27 | 27 |
('status', models.CharField(choices=[(b'new', b'New'), (b'sent', b'Sent'), (b'closed', b'Closed')], default=b'new', max_length=8)), |
28 |
('demand_data', jsonfield.fields.JSONField(default=dict)),
|
|
29 |
('card_data', jsonfield.fields.JSONField(default=dict)),
|
|
28 |
('demand_data', django.contrib.postgres.fields.jsonb.JSONField(default=dict)),
|
|
29 |
('card_data', django.contrib.postgres.fields.jsonb.JSONField(default=dict)),
|
|
30 | 30 |
], |
31 | 31 |
options={ |
32 | 32 |
'get_latest_by': 'creation_datetime', |
passerelle/apps/gesbac/models.py | ||
---|---|---|
19 | 19 | |
20 | 20 |
from collections import OrderedDict |
21 | 21 | |
22 |
from django.contrib.postgres.fields import JSONField |
|
22 | 23 |
from django.db import models, transaction, IntegrityError |
23 | 24 |
from django.utils import six |
24 | 25 |
from django.utils.encoding import force_bytes |
... | ... | |
29 | 30 |
from passerelle.utils.api import endpoint, APIError |
30 | 31 |
from passerelle.utils import SFTPField |
31 | 32 | |
32 |
from jsonfield import JSONField |
|
33 | 33 | |
34 | 34 |
CSV_DELIMITER = ';' |
35 | 35 |
FILES_ENCODING = 'latin-1' |
... | ... | |
403 | 403 |
status = models.CharField(max_length=8, default='new', |
404 | 404 |
choices=FORM_STATUSES |
405 | 405 |
) |
406 |
demand_data = JSONField() |
|
407 |
card_data = JSONField() |
|
406 |
demand_data = JSONField(default=dict)
|
|
407 |
card_data = JSONField(default=dict)
|
|
408 | 408 | |
409 | 409 |
class Meta: |
410 | 410 |
get_latest_by = 'creation_datetime' |
passerelle/apps/jsondatastore/migrations/0001_initial.py | ||
---|---|---|
3 | 3 | |
4 | 4 |
from django.db import migrations, models |
5 | 5 |
import passerelle.apps.jsondatastore.models |
6 |
import jsonfield.fields
|
|
6 |
import django.contrib.postgres.fields.jsonb
|
|
7 | 7 | |
8 | 8 | |
9 | 9 |
class Migration(migrations.Migration): |
... | ... | |
19 | 19 |
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), |
20 | 20 |
('uuid', models.CharField(default=passerelle.apps.jsondatastore.models.get_hex_uuid, verbose_name='uuid', unique=True, max_length=32, editable=False)), |
21 | 21 |
('name_id', models.CharField(max_length=256, blank=True)), |
22 |
('content', jsonfield.fields.JSONField(default=dict, verbose_name='Content')),
|
|
22 |
('content', django.contrib.postgres.fields.jsonb.JSONField(default=dict, verbose_name='Content')),
|
|
23 | 23 |
('creation_datetime', models.DateTimeField(auto_now_add=True)), |
24 | 24 |
('last_update_datetime', models.DateTimeField(auto_now=True)), |
25 | 25 |
], |
passerelle/apps/jsondatastore/models.py | ||
---|---|---|
16 | 16 | |
17 | 17 |
import uuid |
18 | 18 | |
19 |
from django.contrib.postgres.fields import JSONField |
|
19 | 20 |
from django.db import models |
20 | 21 |
from django.template import Context, Template |
21 | 22 |
from django.utils.translation import ugettext_lazy as _ |
22 | 23 | |
23 |
from jsonfield import JSONField |
|
24 | ||
25 | 24 |
from passerelle.base.models import BaseResource |
26 | 25 |
from passerelle.compat import json_loads |
27 | 26 |
from passerelle.utils.api import endpoint, APIError |
passerelle/apps/mdel_ddpacs/abstract.py | ||
---|---|---|
24 | 24 |
import xml.etree.ElementTree as ET |
25 | 25 |
import zipfile |
26 | 26 | |
27 |
from django.contrib.postgres.fields import JSONField |
|
27 | 28 |
from django.db import models, IntegrityError, transaction |
28 | 29 |
from django.core.urlresolvers import reverse |
29 | 30 |
from django.http import HttpResponse |
30 | 31 |
from django.utils.translation import ugettext_lazy as _ |
31 | 32 |
from django.utils import six, functional |
32 | 33 | |
33 |
import jsonfield |
|
34 | ||
35 | 34 |
from passerelle.base.models import BaseResource, SkipJob |
36 | 35 |
from passerelle.utils.api import endpoint |
37 | 36 |
from passerelle.utils.jsonresponse import APIError |
... | ... | |
238 | 237 |
reference = models.CharField(max_length=32, null=False, unique=True) |
239 | 238 |
status = models.CharField(max_length=32, null=True, choices=STATUSES, default=STATUS_PENDING) |
240 | 239 |
step = models.IntegerField(default=0) |
241 |
data = jsonfield.JSONField()
|
|
240 |
data = JSONField() |
|
242 | 241 | |
243 | 242 |
@functional.cached_property |
244 | 243 |
def logger(self): |
passerelle/apps/mdel_ddpacs/migrations/0001_initial.py | ||
---|---|---|
4 | 4 | |
5 | 5 |
from django.db import migrations, models |
6 | 6 |
import django.db.models.deletion |
7 |
import jsonfield.fields
|
|
7 |
import django.contrib.postgres.fields.jsonb
|
|
8 | 8 |
import passerelle.utils.sftp |
9 | 9 | |
10 | 10 | |
... | ... | |
26 | 26 |
('reference', models.CharField(max_length=32, unique=True)), |
27 | 27 |
('status', models.CharField(choices=[('pending', 'pending'), ('pushed', 'pushed'), ('error', 'error'), ('closed', 'closed'), ('rejected', 'rejected'), ('accepted', 'accepted'), ('information needed', 'information needed'), ('in progress', 'in progress'), ('invalid', 'invalid'), ('imported', 'imported')], default='pending', max_length=32, null=True)), |
28 | 28 |
('step', models.IntegerField(default=0)), |
29 |
('data', jsonfield.fields.JSONField(default=dict)),
|
|
29 |
('data', django.contrib.postgres.fields.jsonb.JSONField(default=dict)),
|
|
30 | 30 |
], |
31 | 31 |
options={ |
32 | 32 |
'verbose_name': 'MDEL compatible DDPACS request', |
passerelle/apps/opengis/migrations/0005_auto_20180227_1531.py | ||
---|---|---|
2 | 2 |
from __future__ import unicode_literals |
3 | 3 | |
4 | 4 |
from django.db import migrations, models |
5 |
import jsonfield.fields
|
|
5 |
import django.contrib.postgres.fields.jsonb
|
|
6 | 6 | |
7 | 7 | |
8 | 8 |
class Migration(migrations.Migration): |
passerelle/apps/opengis/migrations/0008_featurecache.py | ||
---|---|---|
4 | 4 | |
5 | 5 |
from django.db import migrations, models |
6 | 6 |
import django.db.models.deletion |
7 |
import jsonfield.fields
|
|
7 |
import django.contrib.postgres.fields.jsonb
|
|
8 | 8 | |
9 | 9 | |
10 | 10 |
class Migration(migrations.Migration): |
... | ... | |
20 | 20 |
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
21 | 21 |
('lat', models.FloatField()), |
22 | 22 |
('lon', models.FloatField()), |
23 |
('data', jsonfield.fields.JSONField(default=dict)),
|
|
23 |
('data', django.contrib.postgres.fields.jsonb.JSONField(default=dict)),
|
|
24 | 24 |
('query', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='features', to='opengis.Query', verbose_name='Query')), |
25 | 25 |
], |
26 | 26 |
), |
passerelle/apps/opengis/models.py | ||
---|---|---|
20 | 20 |
import six |
21 | 21 | |
22 | 22 |
import pyproj |
23 |
from jsonfield import JSONField |
|
24 | 23 | |
24 |
from django.contrib.postgres.fields import JSONField |
|
25 | 25 |
from django.core.cache import cache |
26 | 26 |
from django.db import models, transaction |
27 | 27 |
from django.http import HttpResponse |
passerelle/apps/pastell/migrations/0001_initial.py | ||
---|---|---|
2 | 2 |
from __future__ import unicode_literals |
3 | 3 | |
4 | 4 |
from django.db import models, migrations |
5 |
import jsonfield.fields
|
|
5 |
import django.contrib.postgres.fields.jsonb
|
|
6 | 6 | |
7 | 7 | |
8 | 8 |
class Migration(migrations.Migration): |
... | ... | |
25 | 25 |
('password', models.CharField(max_length=128, verbose_name='Password')), |
26 | 26 |
('keystore', models.FileField(help_text='Certificate and private key in PEM format', upload_to=b'pastell', null=True, verbose_name='Keystore')), |
27 | 27 |
('document_type', models.CharField(max_length=128, verbose_name='Document Type', blank=True)), |
28 |
('document_fields', jsonfield.fields.JSONField(null=True, verbose_name='Fields')),
|
|
28 |
('document_fields', django.contrib.postgres.fields.jsonb.JSONField(null=True, verbose_name='Fields')),
|
|
29 | 29 |
('users', models.ManyToManyField(to='base.ApiUser', related_name='_pastell_users_+', related_query_name='+', blank=True)), |
30 | 30 |
], |
31 | 31 |
options={ |
passerelle/apps/pastell/models.py | ||
---|---|---|
1 | 1 |
import requests |
2 | 2 |
from requests.auth import HTTPBasicAuth |
3 | 3 | |
4 |
from django.contrib.postgres.fields import JSONField |
|
4 | 5 |
from django.core.cache import cache |
5 | 6 |
from django.core.urlresolvers import reverse |
6 | 7 |
from django.db import models |
7 | 8 |
from django.template import Template, Context |
8 | 9 |
from django.utils.translation import ugettext_lazy as _ |
9 | 10 | |
10 |
from jsonfield import JSONField |
|
11 | ||
12 | 11 |
from passerelle.base.models import BaseResource |
13 | 12 | |
14 | 13 |
passerelle/apps/phonecalls/migrations/0001_initial.py | ||
---|---|---|
4 | 4 | |
5 | 5 |
from django.db import migrations, models |
6 | 6 |
import django.db.models.deletion |
7 |
import jsonfield.fields
|
|
7 |
import django.contrib.postgres.fields.jsonb
|
|
8 | 8 | |
9 | 9 | |
10 | 10 |
class Migration(migrations.Migration): |
... | ... | |
24 | 24 |
('caller', models.CharField(max_length=64)), |
25 | 25 |
('start_timestamp', models.DateTimeField(auto_now_add=True)), |
26 | 26 |
('end_timestamp', models.DateTimeField(default=None, null=True)), |
27 |
('details', jsonfield.fields.JSONField(default={})),
|
|
27 |
('details', django.contrib.postgres.fields.jsonb.JSONField(default={})),
|
|
28 | 28 |
], |
29 | 29 |
options={ |
30 | 30 |
'ordering': ['-start_timestamp'], |
passerelle/apps/phonecalls/models.py | ||
---|---|---|
14 | 14 |
# You should have received a copy of the GNU Affero General Public License |
15 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | |
17 |
from django.contrib.postgres.fields import JSONField |
|
17 | 18 |
from django.db import models |
18 | 19 |
from django.utils.timezone import now, timedelta, make_naive |
19 | 20 |
from django.utils.translation import ugettext_lazy as _ |
20 |
from jsonfield import JSONField |
|
21 | 21 | |
22 | 22 |
from passerelle.base.models import BaseResource |
23 | 23 |
from passerelle.utils.api import endpoint |
passerelle/apps/sp_fr/migrations/0001_initial.py | ||
---|---|---|
4 | 4 | |
5 | 5 |
from django.db import migrations, models |
6 | 6 |
import django.db.models.deletion |
7 |
import jsonfield.fields
|
|
7 |
import django.contrib.postgres.fields.jsonb
|
|
8 | 8 |
import passerelle.apps.sp_fr.models |
9 | 9 |
import passerelle.utils.sftp |
10 | 10 |
import passerelle.utils.wcs |
... | ... | |
25 | 25 |
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
26 | 26 |
('procedure', models.CharField(choices=[(b'DOC', 'Request for construction site opening'), (b'recensementCitoyen', 'Request for mandatory citizen census'), (b'depotDossierPACS', 'Pre-request for citizen solidarity pact')], max_length=32, unique=True, verbose_name='Procedure')), |
27 | 27 |
('formdef', passerelle.utils.wcs.FormDefField(verbose_name='Formdef')), |
28 |
('rules', jsonfield.fields.JSONField(default=passerelle.apps.sp_fr.models.default_rule, verbose_name='Rules')),
|
|
28 |
('rules', django.contrib.postgres.fields.jsonb.JSONField(default=passerelle.apps.sp_fr.models.default_rule, verbose_name='Rules')),
|
|
29 | 29 |
], |
30 | 30 |
options={ |
31 | 31 |
'verbose_name': 'MDEL mapping', |
passerelle/apps/sp_fr/models.py | ||
---|---|---|
25 | 25 | |
26 | 26 |
from lxml import etree as ET |
27 | 27 | |
28 |
from django.contrib.postgres.fields import JSONField |
|
28 | 29 |
from django.core.urlresolvers import reverse |
29 | 30 |
from django.core.files import File |
30 | 31 |
from django.db import models, transaction |
... | ... | |
32 | 33 |
from django.utils import six |
33 | 34 |
from django.utils.translation import ugettext_lazy as _, ugettext |
34 | 35 | |
35 |
from jsonfield import JSONField |
|
36 | ||
37 | 36 |
from passerelle.base.models import BaseResource |
38 | 37 |
from passerelle.utils.api import endpoint |
39 | 38 |
from passerelle.utils.sftp import SFTPField |
passerelle/base/migrations/0005_resourcelog.py | ||
---|---|---|
2 | 2 |
from __future__ import unicode_literals |
3 | 3 | |
4 | 4 |
from django.db import migrations, models |
5 |
import jsonfield.fields
|
|
5 |
import django.contrib.postgres.fields.jsonb
|
|
6 | 6 | |
7 | 7 | |
8 | 8 |
class Migration(migrations.Migration): |
... | ... | |
22 | 22 |
('levelno', models.IntegerField(verbose_name=b'log level')), |
23 | 23 |
('sourceip', models.GenericIPAddressField(null=True, verbose_name='Source IP', blank=True)), |
24 | 24 |
('message', models.TextField(verbose_name=b'message')), |
25 |
('extra', jsonfield.fields.JSONField(default={}, verbose_name=b'extras')),
|
|
25 |
('extra', django.contrib.postgres.fields.jsonb.JSONField(default={}, verbose_name=b'extras')),
|
|
26 | 26 |
], |
27 | 27 |
options={ |
28 | 28 |
'permissions': (('view_resourcelog', 'Can view resource logs'),), |
passerelle/base/migrations/0012_job.py | ||
---|---|---|
4 | 4 | |
5 | 5 |
from django.db import migrations, models |
6 | 6 |
import django.db.models.deletion |
7 |
import jsonfield.fields
|
|
7 |
import django.contrib.postgres.fields.jsonb
|
|
8 | 8 | |
9 | 9 | |
10 | 10 |
class Migration(migrations.Migration): |
... | ... | |
22 | 22 |
('resource_pk', models.PositiveIntegerField()), |
23 | 23 |
('method_name', models.CharField(max_length=50)), |
24 | 24 |
('natural_id', models.CharField(blank=True, max_length=256, null=True)), |
25 |
('parameters', jsonfield.fields.JSONField(default={})),
|
|
25 |
('parameters', django.contrib.postgres.fields.jsonb.JSONField(default={})),
|
|
26 | 26 |
('creation_timestamp', models.DateTimeField(auto_now_add=True)), |
27 | 27 |
('update_timestamp', models.DateTimeField(auto_now=True)), |
28 | 28 |
('done_timestamp', models.DateTimeField(null=True)), |
29 | 29 |
('status', models.CharField(choices=[(b'registered', 'Registered'), (b'running', 'Running'), (b'failed', 'Failed'), (b'completed', 'Completed')], default=b'registered', max_length=20)), |
30 |
('status_details', jsonfield.fields.JSONField(default={})),
|
|
30 |
('status_details', django.contrib.postgres.fields.jsonb.JSONField(default={})),
|
|
31 | 31 |
('resource_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType')), |
32 | 32 |
], |
33 | 33 |
), |
passerelle/base/migrations/0017_auto_20200310_1806.py | ||
---|---|---|
3 | 3 |
from __future__ import unicode_literals |
4 | 4 | |
5 | 5 |
from django.db import migrations, models |
6 |
import jsonfield.fields
|
|
6 |
import django.contrib.postgres.fields.jsonb
|
|
7 | 7 |
import passerelle.base.models |
8 | 8 | |
9 | 9 | |
... | ... | |
47 | 47 |
migrations.AlterField( |
48 | 48 |
model_name='resourcelog', |
49 | 49 |
name='extra', |
50 |
field=jsonfield.fields.JSONField(default={}, verbose_name='extras'),
|
|
50 |
field=django.contrib.postgres.fields.jsonb.JSONField(default={}, verbose_name='extras'),
|
|
51 | 51 |
), |
52 | 52 |
migrations.AlterField( |
53 | 53 |
model_name='resourcelog', |
passerelle/base/models.py | ||
---|---|---|
13 | 13 | |
14 | 14 |
from django.apps import apps |
15 | 15 |
from django.conf import settings |
16 |
from django.contrib.postgres.fields import JSONField |
|
16 | 17 |
from django.core.exceptions import ValidationError, ObjectDoesNotExist, PermissionDenied |
17 | 18 |
from django.core.urlresolvers import reverse |
18 | 19 |
from django.db import connection, models, transaction |
... | ... | |
30 | 31 |
from django.contrib.contenttypes.models import ContentType |
31 | 32 |
from django.contrib.contenttypes import fields |
32 | 33 | |
33 |
from jsonfield import JSONField |
|
34 | ||
35 | 34 |
from model_utils.managers import InheritanceManager as ModelUtilsInheritanceManager |
36 | 35 | |
37 |
import jsonfield |
|
38 | ||
39 | 36 |
import passerelle |
40 | 37 |
import requests |
41 | 38 |
from passerelle.compat import json_loads |
... | ... | |
697 | 694 |
resource = fields.GenericForeignKey('resource_type', 'resource_pk') |
698 | 695 |
method_name = models.CharField(max_length=50) |
699 | 696 |
natural_id = models.CharField(max_length=256, blank=True, null=True) |
700 |
parameters = jsonfield.JSONField(default={})
|
|
697 |
parameters = JSONField(default={}) |
|
701 | 698 |
creation_timestamp = models.DateTimeField(auto_now_add=True) |
702 | 699 |
update_timestamp = models.DateTimeField(auto_now=True) |
703 | 700 |
done_timestamp = models.DateTimeField(null=True) |
... | ... | |
711 | 708 |
('completed', _('Completed')) |
712 | 709 |
), |
713 | 710 |
) |
714 |
status_details = jsonfield.JSONField(default={})
|
|
711 |
status_details = JSONField(default={}) |
|
715 | 712 | |
716 | 713 |
def set_after_timestamp(self, value): |
717 | 714 |
if isinstance(value, datetime.datetime): |
... | ... | |
732 | 729 |
levelno = models.IntegerField(verbose_name='log level') |
733 | 730 |
sourceip = models.GenericIPAddressField(blank=True, null=True, verbose_name=_('Source IP')) |
734 | 731 |
message = models.TextField(verbose_name='message') |
735 |
extra = jsonfield.JSONField(verbose_name='extras', default={})
|
|
732 |
extra = JSONField(verbose_name='extras', default={}) |
|
736 | 733 | |
737 | 734 |
class Meta: |
738 | 735 |
permissions = ( |
passerelle/contrib/fake_family/migrations/0001_initial.py | ||
---|---|---|
2 | 2 |
from __future__ import unicode_literals |
3 | 3 | |
4 | 4 |
from django.db import models, migrations |
5 |
import jsonfield.fields
|
|
5 |
import django.contrib.postgres.fields.jsonb
|
|
6 | 6 | |
7 | 7 | |
8 | 8 |
class Migration(migrations.Migration): |
... | ... | |
19 | 19 |
('title', models.CharField(verbose_name='Title', max_length=50)), |
20 | 20 |
('slug', models.SlugField(verbose_name='Identifier', unique=True)), |
21 | 21 |
('description', models.TextField(verbose_name='Description')), |
22 |
('jsondatabase', jsonfield.fields.JSONField(default=dict, verbose_name='Fake Database (JSON)', blank=True)),
|
|
22 |
('jsondatabase', django.contrib.postgres.fields.jsonb.JSONField(default=dict, verbose_name='Fake Database (JSON)', blank=True)),
|
|
23 | 23 |
('users', models.ManyToManyField(to='base.ApiUser', related_name='_fakefamily_users_+', related_query_name='+', blank=True)), |
24 | 24 |
], |
25 | 25 |
options={ |
passerelle/contrib/fake_family/models.py | ||
---|---|---|
14 | 14 |
# You should have received a copy of the GNU Affero General Public License |
15 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | |
17 |
from django.contrib.postgres.fields import JSONField |
|
17 | 18 |
from django.core.urlresolvers import reverse |
18 | 19 |
from django.utils.translation import ugettext_lazy as _ |
19 | 20 |
from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned |
20 | 21 | |
21 |
from jsonfield import JSONField |
|
22 | ||
23 | 22 |
from passerelle.base.models import BaseResource |
24 | 23 |
from .default_database import default_database |
25 | 24 |
passerelle/contrib/meyzieu_newsletters/migrations/0001_initial.py | ||
---|---|---|
2 | 2 |
from __future__ import unicode_literals |
3 | 3 | |
4 | 4 |
from django.db import models, migrations |
5 |
import jsonfield.fields
|
|
5 |
import django.contrib.postgres.fields.jsonb
|
|
6 | 6 | |
7 | 7 | |
8 | 8 |
class Migration(migrations.Migration): |
... | ... | |
21 | 21 |
('description', models.TextField(verbose_name='Description')), |
22 | 22 |
('url', models.URLField(verbose_name='Newsletter service URL')), |
23 | 23 |
('apikey', models.CharField(max_length=32, verbose_name='API key')), |
24 |
('transport_titles_mapping', jsonfield.fields.JSONField(default=dict, verbose_name='Mapping of transports ids and titles')),
|
|
24 |
('transport_titles_mapping', django.contrib.postgres.fields.jsonb.JSONField(default=dict, verbose_name='Mapping of transports ids and titles')),
|
|
25 | 25 |
('users', models.ManyToManyField(to='base.ApiUser', related_name='_meyzieunewsletters_users_+', related_query_name='+', blank=True)), |
26 | 26 |
], |
27 | 27 |
options={ |
passerelle/contrib/meyzieu_newsletters/models.py | ||
---|---|---|
17 | 17 |
import requests |
18 | 18 |
import logging |
19 | 19 | |
20 |
from django.contrib.postgres.fields import JSONField |
|
20 | 21 |
from django.db import models |
21 | 22 |
from django.core.urlresolvers import reverse |
22 | 23 |
from django.db import models |
23 | 24 |
from django.utils.translation import ugettext_lazy as _ |
24 | 25 | |
25 |
from jsonfield import JSONField |
|
26 | ||
27 | 26 |
from passerelle.base.models import BaseResource |
28 | 27 | |
29 | 28 | |
... | ... | |
38 | 37 |
class MeyzieuNewsletters(BaseResource): |
39 | 38 |
url = models.URLField(verbose_name=_('Newsletter service URL')) |
40 | 39 |
apikey = models.CharField(max_length=32, verbose_name=_('API key')) |
41 |
transport_titles_mapping = JSONField(_('Mapping of transports ids and titles')) |
|
40 |
transport_titles_mapping = JSONField(_('Mapping of transports ids and titles'), |
|
41 |
default=dict) |
|
42 | 42 | |
43 | 43 |
category = _('Newsletter registration') |
44 | 44 |
passerelle/contrib/planitech/migrations/0002_planitechconnector_custom_fields.py | ||
---|---|---|
3 | 3 |
from __future__ import unicode_literals |
4 | 4 | |
5 | 5 |
from django.db import migrations |
6 |
import jsonfield.fields
|
|
6 |
import django.contrib.postgres.fields.jsonb
|
|
7 | 7 | |
8 | 8 | |
9 | 9 |
class Migration(migrations.Migration): |
... | ... | |
16 | 16 |
migrations.AddField( |
17 | 17 |
model_name='planitechconnector', |
18 | 18 |
name='custom_fields', |
19 |
field=jsonfield.fields.JSONField(blank=True, null=True, verbose_name='Custom places fields'),
|
|
19 |
field=django.contrib.postgres.fields.jsonb.JSONField(blank=True, null=True, verbose_name='Custom places fields'),
|
|
20 | 20 |
), |
21 | 21 |
] |
passerelle/contrib/planitech/models.py | ||
---|---|---|
21 | 21 |
import re |
22 | 22 |
import uuid |
23 | 23 | |
24 |
from django.contrib.postgres.fields import JSONField |
|
24 | 25 |
from django.core.cache import cache |
25 | 26 |
from django.db import models, transaction |
26 | 27 |
from django.utils import dateformat |
... | ... | |
28 | 29 |
from django.utils.encoding import force_bytes |
29 | 30 |
from django.utils.six.moves.urllib import parse as urlparse |
30 | 31 |
from django.utils.translation import ugettext_lazy as _ |
31 |
from jsonfield import JSONField |
|
32 | 32 |
from requests.exceptions import RequestException |
33 | 33 | |
34 | 34 |
from passerelle.base.models import BaseResource |
passerelle/contrib/teamnet_axel/migrations/0002_management_billing_regies.py | ||
---|---|---|
2 | 2 |
from __future__ import unicode_literals |
3 | 3 | |
4 | 4 |
from django.db import models, migrations |
5 |
import jsonfield.fields
|
|
5 |
import django.contrib.postgres.fields.jsonb
|
|
6 | 6 | |
7 | 7 | |
8 | 8 |
class Migration(migrations.Migration): |
... | ... | |
15 | 15 |
migrations.AddField( |
16 | 16 |
model_name='management', |
17 | 17 |
name='billing_regies', |
18 |
field=jsonfield.fields.JSONField(default=dict, verbose_name='Mapping between regie ids and billing ids'),
|
|
18 |
field=django.contrib.postgres.fields.jsonb.JSONField(default=dict, verbose_name='Mapping between regie ids and billing ids'),
|
|
19 | 19 |
preserve_default=True, |
20 | 20 |
), |
21 | 21 |
] |
passerelle/contrib/teamnet_axel/models.py | ||
---|---|---|
19 | 19 |
import logging |
20 | 20 |
import xml.etree.ElementTree as ET |
21 | 21 | |
22 |
from django.contrib.postgres.fields import JSONField |
|
22 | 23 |
from django.db import models |
23 | 24 |
from django.http import HttpResponse, HttpResponseNotFound |
24 | 25 |
from django.utils.translation import ugettext_lazy as _ |
25 | 26 |
from django.utils.encoding import smart_text |
26 | 27 | |
27 | ||
28 |
from jsonfield import JSONField |
|
29 | ||
30 | 28 |
from passerelle.base.models import BaseResource |
31 | 29 |
from passerelle.compat import json_loads |
32 | 30 |
from passerelle.soap import client_to_jsondict |
requirements.txt | ||
---|---|---|
1 | 1 |
django >= 1.8, <1.12 |
2 | 2 |
django-jsonresponse >= 0.10, < 0.11 |
3 | 3 |
django-model-utils |
4 |
django-jsonfield >= 0.9.3 |
|
5 | 4 |
requests |
6 | 5 |
-e git+http://repos.entrouvert.org/gadjo.git/#egg=gadjo |
7 | 6 |
SOAPpy |
setup.py | ||
---|---|---|
86 | 86 |
install_requires=[ |
87 | 87 |
'django >= 1.8, <1.12', |
88 | 88 |
'django-model-utils<4', |
89 |
'django-jsonfield<1.3', |
|
90 | 89 |
'requests', |
91 | 90 |
'gadjo', |
92 | 91 |
'phpserialize', |
93 |
- |