0005-misc-fix-unused-import-pylint-error-62099.patch
passerelle/apps/api_particulier/migrations/0002_auto_20181118_0807.py | ||
---|---|---|
2 | 2 |
# Generated by Django 1.11.12 on 2018-11-18 14:07 |
3 | 3 |
from __future__ import unicode_literals |
4 | 4 | |
5 |
from django.db import migrations, models
|
|
5 |
from django.db import migrations |
|
6 | 6 | |
7 | 7 | |
8 | 8 |
class Migration(migrations.Migration): |
passerelle/apps/arcgis/models.py | ||
---|---|---|
21 | 21 |
from django.http import HttpResponse |
22 | 22 |
from django.shortcuts import get_object_or_404 |
23 | 23 |
from django.urls import reverse |
24 |
from django.utils import six |
|
25 | 24 |
from django.utils.six.moves.urllib import parse as urlparse |
26 | 25 |
from django.utils.text import slugify |
27 | 26 |
from django.utils.translation import ugettext_lazy as _ |
passerelle/apps/base_adresse/migrations/0006_rename_model.py | ||
---|---|---|
1 | 1 |
# -*- coding: utf-8 -*- |
2 | 2 |
from __future__ import unicode_literals |
3 | 3 | |
4 |
from django.db import migrations, models
|
|
4 |
from django.db import migrations |
|
5 | 5 | |
6 | 6 | |
7 | 7 |
class Migration(migrations.Migration): |
passerelle/apps/base_adresse/migrations/0008_delete_updatestreetmodel.py | ||
---|---|---|
1 | 1 |
# -*- coding: utf-8 -*- |
2 | 2 |
from __future__ import unicode_literals |
3 | 3 | |
4 |
from django.db import migrations, models
|
|
4 |
from django.db import migrations |
|
5 | 5 | |
6 | 6 | |
7 | 7 |
class Migration(migrations.Migration): |
passerelle/apps/base_adresse/migrations/0011_auto_20160919_0949.py | ||
---|---|---|
1 | 1 |
# -*- coding: utf-8 -*- |
2 | 2 |
from __future__ import unicode_literals |
3 | 3 | |
4 |
from django.db import migrations, models
|
|
4 |
from django.db import migrations |
|
5 | 5 | |
6 | 6 | |
7 | 7 |
class Migration(migrations.Migration): |
passerelle/apps/base_adresse/migrations/0020_streetmodel_resource_runpython.py | ||
---|---|---|
1 | 1 |
# Generated by Django 2.2.24 on 2021-08-03 17:47 |
2 | 2 | |
3 |
import django.db.models.deletion |
|
4 |
from django.db import migrations, models |
|
3 |
from django.db import migrations |
|
5 | 4 | |
6 | 5 | |
7 | 6 |
def set_streetmodel_resource(apps, schema_editor): |
passerelle/apps/base_adresse/migrations/0023_resource_in_models_runpython.py | ||
---|---|---|
1 | 1 |
# Generated by Django 2.2.19 on 2021-08-03 18:35 |
2 | 2 | |
3 |
import django.db.models.deletion |
|
4 |
from django.db import migrations, models |
|
3 |
from django.db import migrations |
|
5 | 4 | |
6 | 5 | |
7 | 6 |
def set_resource(apps, schema_editor): |
passerelle/apps/base_adresse/models.py | ||
---|---|---|
10 | 10 |
from django.utils.six.moves.urllib import parse as urlparse |
11 | 11 |
from django.utils.translation import ugettext_lazy as _ |
12 | 12 |
from requests import RequestException |
13 |
from requests.exceptions import ConnectionError |
|
14 | 13 | |
15 | 14 |
from passerelle.address.models import AddressResource |
16 | 15 |
from passerelle.compat import json_loads |
passerelle/apps/bdp/models.py | ||
---|---|---|
2 | 2 | |
3 | 3 |
import requests |
4 | 4 |
from django.db import models |
5 |
from django.urls import reverse |
|
6 | 5 |
from django.utils.translation import ugettext_lazy as _ |
7 | 6 |
from requests.auth import HTTPBasicAuth |
8 | 7 |
passerelle/apps/cartads_cs/models.py | ||
---|---|---|
39 | 39 |
from django.urls import reverse |
40 | 40 |
from django.utils.encoding import force_text |
41 | 41 |
from django.utils.six.moves.urllib import parse as urlparse |
42 |
from django.utils.text import slugify |
|
43 | 42 |
from django.utils.timezone import now |
44 | 43 |
from django.utils.translation import ugettext_lazy as _ |
45 | 44 |
passerelle/apps/choosit/migrations/0007_auto_20180814_1048.py | ||
---|---|---|
2 | 2 |
# Generated by Django 1.11.12 on 2018-08-14 15:48 |
3 | 3 |
from __future__ import unicode_literals |
4 | 4 | |
5 |
from django.db import migrations, models
|
|
5 |
from django.db import migrations |
|
6 | 6 | |
7 | 7 | |
8 | 8 |
class Migration(migrations.Migration): |
passerelle/apps/choosit/migrations/0008_auto_20181118_0807.py | ||
---|---|---|
2 | 2 |
# Generated by Django 1.11.12 on 2018-11-18 14:07 |
3 | 3 |
from __future__ import unicode_literals |
4 | 4 | |
5 |
from django.db import migrations, models
|
|
5 |
from django.db import migrations |
|
6 | 6 | |
7 | 7 | |
8 | 8 |
class Migration(migrations.Migration): |
passerelle/apps/cityweb/cityweb.py | ||
---|---|---|
17 | 17 |
import os |
18 | 18 |
import stat |
19 | 19 | |
20 |
from django.core.files.base import ContentFile |
|
21 | 20 |
from django.core.files.storage import default_storage |
22 | 21 |
from django.utils import six |
23 | 22 |
from django.utils.dateparse import parse_date |
passerelle/apps/clicrdv/migrations/0001_initial.py | ||
---|---|---|
1 | 1 |
# -*- coding: utf-8 -*- |
2 | 2 |
from __future__ import unicode_literals |
3 | 3 | |
4 |
from django.db import migrations, models
|
|
4 |
from django.db import migrations |
|
5 | 5 | |
6 | 6 | |
7 | 7 |
class Migration(migrations.Migration): |
passerelle/apps/clicrdv/migrations/0002_clicrdv_group_id.py | ||
---|---|---|
1 | 1 |
# -*- coding: utf-8 -*- |
2 | 2 |
from __future__ import unicode_literals |
3 | 3 | |
4 |
from django.db import migrations, models
|
|
4 |
from django.db import migrations |
|
5 | 5 | |
6 | 6 | |
7 | 7 |
class Migration(migrations.Migration): |
passerelle/apps/clicrdv/migrations/0003_auto_20160920_0903.py | ||
---|---|---|
1 | 1 |
# -*- coding: utf-8 -*- |
2 | 2 |
from __future__ import unicode_literals |
3 | 3 | |
4 |
from django.db import migrations, models
|
|
4 |
from django.db import migrations |
|
5 | 5 | |
6 | 6 | |
7 | 7 |
class Migration(migrations.Migration): |
passerelle/apps/clicrdv/migrations/0005_auto_20161218_1701.py | ||
---|---|---|
1 | 1 |
# -*- coding: utf-8 -*- |
2 | 2 |
from __future__ import unicode_literals |
3 | 3 | |
4 |
from django.db import migrations, models
|
|
4 |
from django.db import migrations |
|
5 | 5 | |
6 | 6 | |
7 | 7 |
class Migration(migrations.Migration): |
passerelle/apps/clicrdv/models.py | ||
---|---|---|
4 | 4 |
It is a gateway to http://developers.clicrdv.com/fr/rest-api.html |
5 | 5 |
''' |
6 | 6 | |
7 |
import base64 |
|
8 | 7 |
import datetime |
9 |
import json |
|
10 | 8 | |
11 | 9 |
import requests |
12 |
from django.conf import settings |
|
13 | 10 |
from django.db import models |
14 |
from django.urls import reverse |
|
15 | 11 |
from django.utils.dateformat import format as date_format |
16 | 12 |
from django.utils.dateformat import time_format |
17 | 13 |
from django.utils.http import urlquote |
passerelle/apps/clicrdv/urls.py | ||
---|---|---|
1 |
from django.conf.urls import include, url
|
|
1 |
from django.conf.urls import url |
|
2 | 2 |
from django.views.decorators.csrf import csrf_exempt |
3 | 3 | |
4 | 4 |
from passerelle.apps.clicrdv.views import * |
5 |
from passerelle.urls_utils import app_enabled, decorated_includes, required |
|
6 | 5 | |
7 | 6 |
urlpatterns = [ |
8 | 7 |
url(r'^(?P<slug>[\w,-]+)/$', ClicRdvDetailView.as_view(), name='clicrdv-view'), |
passerelle/apps/cmis/migrations/0003_auto_20181118_0807.py | ||
---|---|---|
2 | 2 |
# Generated by Django 1.11.12 on 2018-11-18 14:07 |
3 | 3 |
from __future__ import unicode_literals |
4 | 4 | |
5 |
from django.db import migrations, models
|
|
5 |
from django.db import migrations |
|
6 | 6 | |
7 | 7 | |
8 | 8 |
class Migration(migrations.Migration): |
passerelle/apps/cmis/urls.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.conf.urls import include, url
|
|
17 |
from django.conf.urls import url |
|
18 | 18 | |
19 | 19 |
from .views import CmisTypeView |
20 | 20 |
passerelle/apps/csvdatasource/migrations/0005_csvdatasource__dialect_options.py | ||
---|---|---|
2 | 2 |
from __future__ import unicode_literals |
3 | 3 | |
4 | 4 |
import django.contrib.postgres.fields.jsonb |
5 |
from django.db import migrations, models
|
|
5 |
from django.db import migrations |
|
6 | 6 | |
7 | 7 | |
8 | 8 |
class Migration(migrations.Migration): |
passerelle/apps/csvdatasource/migrations/0006_auto_20160905_1031.py | ||
---|---|---|
2 | 2 |
from __future__ import unicode_literals |
3 | 3 | |
4 | 4 |
import django.contrib.postgres.fields.jsonb |
5 |
from django.db import migrations, models
|
|
5 |
from django.db import migrations |
|
6 | 6 | |
7 | 7 | |
8 | 8 |
class Migration(migrations.Migration): |
passerelle/apps/csvdatasource/migrations/0012_auto_20180912_0215.py | ||
---|---|---|
2 | 2 |
# Generated by Django 1.11.12 on 2018-09-12 07:15 |
3 | 3 |
from __future__ import unicode_literals |
4 | 4 | |
5 |
from django.db import migrations, models
|
|
5 |
from django.db import migrations |
|
6 | 6 | |
7 | 7 | |
8 | 8 |
class Migration(migrations.Migration): |
passerelle/apps/csvdatasource/migrations/0013_auto_20181118_0807.py | ||
---|---|---|
2 | 2 |
# Generated by Django 1.11.12 on 2018-11-18 14:07 |
3 | 3 |
from __future__ import unicode_literals |
4 | 4 | |
5 |
from django.db import migrations, models
|
|
5 |
from django.db import migrations |
|
6 | 6 | |
7 | 7 | |
8 | 8 |
class Migration(migrations.Migration): |
passerelle/apps/csvdatasource/urls.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.conf.urls import include, url
|
|
17 |
from django.conf.urls import url |
|
18 | 18 | |
19 | 19 |
from .views import * |
20 | 20 |
passerelle/apps/family/loaders/concerto_fondettes.py | ||
---|---|---|
16 | 16 | |
17 | 17 |
import csv |
18 | 18 |
import datetime |
19 |
import json |
|
20 |
import os |
|
21 |
import sys |
|
22 |
import zipfile |
|
23 | 19 |
from decimal import Decimal |
24 | 20 | |
25 | 21 |
from django.core.exceptions import ValidationError |
passerelle/apps/family/loaders/concerto_orleans.py | ||
---|---|---|
22 | 22 |
from django.core.files.storage import DefaultStorage |
23 | 23 |
from django.utils import six, timezone |
24 | 24 |
from django.utils.encoding import force_text |
25 |
from django.utils.timezone import datetime, make_aware |
|
26 | 25 |
from django.utils.translation import ugettext_lazy as _ |
27 | 26 | |
28 | 27 |
from ..models import Adult, Child, Family, Invoice, dict_cherry_pick, get_date, get_datetime |
passerelle/apps/family/loaders/opus_fondettes.py | ||
---|---|---|
16 | 16 | |
17 | 17 |
import csv |
18 | 18 |
import datetime |
19 |
import json |
|
20 |
import os |
|
21 |
import sys |
|
22 |
import zipfile |
|
23 | 19 |
from decimal import Decimal |
24 | 20 | |
25 | 21 |
from django.core.exceptions import ValidationError |
passerelle/apps/family/management/commands/import_orleans_data.py | ||
---|---|---|
16 | 16 | |
17 | 17 |
import fcntl |
18 | 18 |
import os |
19 |
import sys |
|
20 |
import tempfile |
|
21 |
import zipfile |
|
22 | 19 | |
23 | 20 |
from django.core.files.base import File |
24 | 21 |
from django.core.files.storage import DefaultStorage |
25 | 22 |
from django.core.management.base import BaseCommand, CommandError |
26 | 23 | |
27 |
from passerelle.apps.family.models import GenericFamily, Invoice
|
|
24 |
from passerelle.apps.family.models import GenericFamily |
|
28 | 25 | |
29 | 26 | |
30 | 27 |
class Command(BaseCommand): |
passerelle/apps/family/models.py | ||
---|---|---|
28 | 28 |
from django.db import models, transaction |
29 | 29 |
from django.http import Http404, HttpResponse |
30 | 30 |
from django.utils import six |
31 |
from django.utils.timezone import datetime, is_naive, make_aware, now
|
|
31 |
from django.utils.timezone import datetime, make_aware, now |
|
32 | 32 |
from django.utils.translation import ugettext_lazy as _ |
33 | 33 | |
34 | 34 |
from passerelle.base.models import BaseResource |
passerelle/apps/mobyt/migrations/0007_auto_20181118_0807.py | ||
---|---|---|
2 | 2 |
# Generated by Django 1.11.12 on 2018-11-18 14:07 |
3 | 3 |
from __future__ import unicode_literals |
4 | 4 | |
5 |
from django.db import migrations, models
|
|
5 |
from django.db import migrations |
|
6 | 6 | |
7 | 7 | |
8 | 8 |
class Migration(migrations.Migration): |
passerelle/apps/opengis/migrations/0005_auto_20180227_1531.py | ||
---|---|---|
1 | 1 |
# -*- coding: utf-8 -*- |
2 | 2 |
from __future__ import unicode_literals |
3 | 3 | |
4 |
import django.contrib.postgres.fields.jsonb |
|
5 | 4 |
from django.db import migrations, models |
6 | 5 | |
7 | 6 |
passerelle/apps/opengis/migrations/0006_auto_20181118_0807.py | ||
---|---|---|
2 | 2 |
# Generated by Django 1.11.12 on 2018-11-18 14:07 |
3 | 3 |
from __future__ import unicode_literals |
4 | 4 | |
5 |
from django.db import migrations, models
|
|
5 |
from django.db import migrations |
|
6 | 6 | |
7 | 7 | |
8 | 8 |
class Migration(migrations.Migration): |
passerelle/apps/ovh/migrations/0007_auto_20181118_0807.py | ||
---|---|---|
2 | 2 |
# Generated by Django 1.11.12 on 2018-11-18 14:07 |
3 | 3 |
from __future__ import unicode_literals |
4 | 4 | |
5 |
from django.db import migrations, models
|
|
5 |
from django.db import migrations |
|
6 | 6 | |
7 | 7 | |
8 | 8 |
class Migration(migrations.Migration): |
passerelle/apps/ovh/views.py | ||
---|---|---|
1 | 1 |
import uuid |
2 |
from urllib.parse import urljoin |
|
3 | 2 | |
4 |
from django.conf import settings |
|
5 | 3 |
from django.contrib import messages |
6 | 4 |
from django.shortcuts import reverse |
7 | 5 |
from django.utils.translation import ugettext_lazy as _ |
passerelle/apps/oxyd/migrations/0007_auto_20181118_0807.py | ||
---|---|---|
2 | 2 |
# Generated by Django 1.11.12 on 2018-11-18 14:07 |
3 | 3 |
from __future__ import unicode_literals |
4 | 4 | |
5 |
from django.db import migrations, models
|
|
5 |
from django.db import migrations |
|
6 | 6 | |
7 | 7 | |
8 | 8 |
class Migration(migrations.Migration): |
passerelle/apps/photon/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 |
import datetime |
|
18 | 17 |
import hashlib |
19 | 18 |
import json |
20 | 19 | |
21 | 20 |
from django.contrib.postgres.fields import JSONField |
22 | 21 |
from django.db import models |
23 |
from django.utils import timezone |
|
24 | 22 |
from django.utils.encoding import force_bytes |
25 | 23 |
from django.utils.http import urlencode |
26 | 24 |
from django.utils.six.moves.urllib import parse as urlparse |
passerelle/apps/solis/models.py | ||
---|---|---|
16 | 16 | |
17 | 17 |
import base64 |
18 | 18 |
import copy |
19 |
import re |
|
20 | 19 | |
21 | 20 |
from django.db import models |
22 | 21 |
from django.template.loader import get_template |
passerelle/base/migrations/0004_auto_20170117_0326.py | ||
---|---|---|
1 | 1 |
# -*- coding: utf-8 -*- |
2 | 2 |
from __future__ import unicode_literals |
3 | 3 | |
4 |
from django.db import migrations, models
|
|
4 |
from django.db import migrations |
|
5 | 5 | |
6 | 6 | |
7 | 7 |
class Migration(migrations.Migration): |
passerelle/base/migrations/0015_auto_20190921_0347.py | ||
---|---|---|
4 | 4 | |
5 | 5 |
from django.db import migrations, models |
6 | 6 | |
7 |
import passerelle.base.models |
|
8 | ||
9 | 7 | |
10 | 8 |
class Migration(migrations.Migration): |
11 | 9 |
passerelle/base/models.py | ||
---|---|---|
12 | 12 |
import uuid |
13 | 13 |
from contextlib import contextmanager |
14 | 14 | |
15 |
from django import VERSION |
|
16 | 15 |
from django.apps import apps |
17 | 16 |
from django.conf import settings |
18 | 17 |
from django.contrib.contenttypes import fields |
passerelle/base/views.py | ||
---|---|---|
18 | 18 |
import json |
19 | 19 | |
20 | 20 |
from dateutil import parser as date_parser |
21 |
from django.conf import settings |
|
22 | 21 |
from django.contrib.contenttypes.models import ContentType |
23 | 22 |
from django.core.exceptions import ObjectDoesNotExist, PermissionDenied |
24 | 23 |
from django.db.models import Q |
passerelle/contrib/fake_family/models.py | ||
---|---|---|
16 | 16 | |
17 | 17 |
from django.contrib.postgres.fields import JSONField |
18 | 18 |
from django.core.exceptions import MultipleObjectsReturned, ObjectDoesNotExist |
19 |
from django.urls import reverse |
|
20 | 19 |
from django.utils.translation import ugettext_lazy as _ |
21 | 20 | |
22 | 21 |
from passerelle.base.models import BaseResource |
passerelle/contrib/fake_family/urls.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.conf.urls import include, url
|
|
17 |
from django.conf.urls import url |
|
18 | 18 | |
19 | 19 |
from .views import * |
20 | 20 |
passerelle/contrib/gdema/migrations/0002_auto_20181119_1446.py | ||
---|---|---|
2 | 2 |
# Generated by Django 1.11.12 on 2018-11-19 13:46 |
3 | 3 |
from __future__ import unicode_literals |
4 | 4 | |
5 |
from django.db import migrations, models
|
|
5 |
from django.db import migrations |
|
6 | 6 | |
7 | 7 | |
8 | 8 |
class Migration(migrations.Migration): |
passerelle/contrib/greco/models.py | ||
---|---|---|
22 | 22 |
import suds.sudsobject |
23 | 23 |
from django.core.cache import cache |
24 | 24 |
from django.db import models |
25 |
from django.utils import six |
|
26 | 25 |
from django.utils.translation import ugettext_lazy as _ |
27 | 26 |
from suds.client import Client |
28 | 27 |
from suds.transport import Reply |
passerelle/contrib/iparapheur/migrations/0002_auto_20160406_1123.py | ||
---|---|---|
1 | 1 |
# -*- coding: utf-8 -*- |
2 | 2 |
from __future__ import unicode_literals |
3 | 3 | |
4 |
from django.db import migrations, models
|
|
4 |
from django.db import migrations |
|
5 | 5 | |
6 | 6 | |
7 | 7 |
class Migration(migrations.Migration): |
passerelle/contrib/iws/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 |
import json |
|
18 | 17 |
from datetime import datetime |
19 | 18 | |
20 | 19 |
import lxml.etree |
passerelle/contrib/mdph13/models.py | ||
---|---|---|
21 | 21 | |
22 | 22 |
import requests |
23 | 23 |
from django.db import models, transaction |
24 |
from django.utils import dateparse, six
|
|
24 |
from django.utils import six |
|
25 | 25 |
from django.utils.six.moves.urllib import parse as urlparse |
26 |
from django.utils.timezone import now |
|
27 | 26 |
from django.utils.translation import ugettext_lazy as _ |
28 | 27 | |
29 | 28 |
from passerelle.base.models import BaseResource, HTTPResource |
passerelle/contrib/nancypoll/models.py | ||
---|---|---|
1 | 1 |
import csv |
2 | 2 | |
3 |
from django.core.exceptions import ObjectDoesNotExist |
|
4 | 3 |
from django.db import models |
5 | 4 |
from django.utils import six |
6 | 5 |
from django.utils.encoding import force_text |
passerelle/contrib/solis_apa/models.py | ||
---|---|---|
19 | 19 | |
20 | 20 |
from django.core.cache import cache |
21 | 21 |
from django.db import models |
22 |
from django.http import HttpResponse |
|
23 |
from django.urls import reverse |
|
24 | 22 |
from django.utils.six.moves.urllib import parse as urlparse |
25 | 23 |
from django.utils.translation import ugettext_lazy as _ |
26 | 24 |
passerelle/contrib/solis_apa/urls.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.conf.urls import include, url
|
|
17 |
from django.conf.urls import url |
|
18 | 18 | |
19 | 19 |
from .views import * |
20 | 20 |
passerelle/contrib/teamnet_axel/migrations/0002_management_billing_regies.py | ||
---|---|---|
2 | 2 |
from __future__ import unicode_literals |
3 | 3 | |
4 | 4 |
import django.contrib.postgres.fields.jsonb |
5 |
from django.db import migrations, models
|
|
5 |
from django.db import migrations |
|
6 | 6 | |
7 | 7 | |
8 | 8 |
class Migration(migrations.Migration): |
passerelle/contrib/toulouse_smart/migrations/0007_drop_wcs_form_api_url_pk.py | ||
---|---|---|
2 | 2 | |
3 | 3 |
import uuid |
4 | 4 | |
5 |
import django.db.models.deletion |
|
6 | 5 |
from django.db import migrations, models |
7 | 6 | |
8 | 7 |
passerelle/contrib/toulouse_smart/migrations/0008_recreate_wscrequest_fk.py | ||
---|---|---|
1 | 1 |
# Generated by Django 2.2.24 on 2022-03-17 13:36 |
2 | 2 | |
3 |
import uuid |
|
4 | ||
5 | 3 |
import django.db.models.deletion |
6 | 4 |
from django.db import migrations, models |
7 | 5 |
passerelle/contrib/toulouse_smart/migrations/0011_rename_fk.py | ||
---|---|---|
1 | 1 |
# Generated by Django 2.2.24 on 2022-03-17 13:52 |
2 | 2 | |
3 |
import django.db.models.deletion |
|
4 |
from django.db import migrations, models |
|
3 |
from django.db import migrations |
|
5 | 4 | |
6 | 5 | |
7 | 6 |
class Migration(migrations.Migration): |
passerelle/plugins.py | ||
---|---|---|
17 | 17 |
from django.apps import apps |
18 | 18 |
from django.conf.urls import include, url |
19 | 19 | |
20 |
from .urls_utils import app_enabled, decorated_includes, manager_required, required, trust_required
|
|
20 |
from .urls_utils import app_enabled, manager_required, required, trust_required |
|
21 | 21 | |
22 | 22 | |
23 | 23 |
def register_apps_urls(urlpatterns): |
passerelle/sms/models.py | ||
---|---|---|
26 | 26 |
from django.utils.translation import ugettext_lazy as _ |
27 | 27 | |
28 | 28 |
from passerelle.base.models import BaseResource |
29 |
from passerelle.compat import json_loads |
|
30 | 29 |
from passerelle.sms.forms import SMSConnectorForm |
31 | 30 |
from passerelle.utils.api import endpoint |
32 | 31 |
from passerelle.utils.jsonresponse import APIError |
passerelle/sms/views.py | ||
---|---|---|
1 | 1 |
import datetime |
2 | 2 | |
3 |
from django.apps import apps |
|
4 | 3 |
from django.contrib import messages |
5 | 4 |
from django.db.models import Count |
6 | 5 |
from django.db.models.functions import TruncDay |
passerelle/utils/__init__.py | ||
---|---|---|
29 | 29 |
from django.core.exceptions import PermissionDenied |
30 | 30 |
from django.db import transaction |
31 | 31 |
from django.http import HttpResponse, HttpResponseBadRequest |
32 |
from django.template import Context, Template |
|
33 | 32 |
from django.utils.decorators import available_attrs |
34 | 33 |
from django.utils.encoding import force_bytes, force_text |
35 | 34 |
from django.utils.functional import lazy |
passerelle/utils/api.py | ||
---|---|---|
23 | 23 |
from django.utils.safestring import mark_safe |
24 | 24 | |
25 | 25 |
# make APIError available from this module |
26 |
from .jsonresponse import APIError # noqa |
|
26 |
from .jsonresponse import APIError # noqa pylint: disable=unused-import
|
|
27 | 27 | |
28 | 28 | |
29 | 29 |
class endpoint(object): |
passerelle/utils/conversion.py | ||
---|---|---|
22 | 22 | |
23 | 23 |
import unidecode |
24 | 24 |
from django.utils import six |
25 |
from django.utils.encoding import force_str, force_text
|
|
25 |
from django.utils.encoding import force_text |
|
26 | 26 |
from django.utils.six import BytesIO |
27 | 27 |
from PIL import Image |
28 | 28 |
passerelle/utils/jsonresponse.py | ||
---|---|---|
9 | 9 |
import json |
10 | 10 |
import logging |
11 | 11 |
import re |
12 |
import sys |
|
13 | 12 |
import time |
14 | 13 | |
15 | 14 |
from django.conf import settings |
... | ... | |
17 | 16 |
from django.core.serializers.json import DjangoJSONEncoder |
18 | 17 |
from django.http import Http404, HttpResponse, HttpResponseBadRequest |
19 | 18 |
from django.http.response import HttpResponseBase |
20 |
from django.utils import six |
|
21 | 19 |
from django.utils.encoding import force_text |
22 | 20 |
from django.utils.log import log_response |
23 | 21 |
from requests import HTTPError, RequestException |
tests/test_actesweb.py | ||
---|---|---|
19 | 19 |
import io |
20 | 20 |
import json |
21 | 21 |
import os |
22 |
import shutil |
|
23 | 22 |
import stat |
24 | 23 | |
25 | 24 |
import pytest |
26 |
from django.utils import six |
|
27 | 25 | |
28 | 26 |
import tests.utils |
29 | 27 |
from passerelle.apps.actesweb.models import ActesWeb |
tests/test_api_access.py | ||
---|---|---|
1 |
import re |
|
2 |
import sys |
|
3 | ||
4 | 1 |
import pytest |
5 |
from django.contrib.auth.models import User |
|
6 | 2 |
from django.contrib.contenttypes.models import ContentType |
7 |
from django.test import override_settings |
|
8 | 3 |
from django.urls import reverse |
9 | 4 | |
10 |
import tests.utils |
|
11 | 5 |
from passerelle.apps.oxyd.models import OxydSMSGateway |
12 | 6 |
from passerelle.base import signature |
13 |
from passerelle.base.models import AccessRight, ApiUser, ResourceLog
|
|
7 |
from passerelle.base.models import AccessRight, ApiUser |
|
14 | 8 | |
15 | 9 |
pytestmark = pytest.mark.django_db |
16 | 10 |
tests/test_arcgis.py | ||
---|---|---|
5 | 5 | |
6 | 6 |
import mock |
7 | 7 |
import pytest |
8 |
from django.contrib.auth.models import User |
|
9 | 8 |
from django.contrib.contenttypes.models import ContentType |
10 | 9 |
from django.core.exceptions import ValidationError |
11 | 10 |
tests/test_astech.py | ||
---|---|---|
24 | 24 | |
25 | 25 |
import tests.utils |
26 | 26 |
from passerelle.apps.astech.models import ASTech |
27 |
from passerelle.utils.jsonresponse import APIError |
|
28 | 27 | |
29 | 28 | |
30 | 29 |
@pytest.fixture |
tests/test_astre_rest.py | ||
---|---|---|
7 | 7 | |
8 | 8 |
from passerelle.apps.astre_rest.models import AstreREST |
9 | 9 |
from passerelle.base.models import AccessRight, ApiUser |
10 |
from passerelle.utils.jsonresponse import APIError |
|
11 | 10 | |
12 | 11 | |
13 | 12 |
@pytest.fixture() |
tests/test_cartads_cs.py | ||
---|---|---|
7 | 7 | |
8 | 8 |
import mock |
9 | 9 |
import pytest |
10 |
from django.core.files.storage import default_storage |
|
11 | 10 |
from django.test import override_settings |
12 | 11 |
from httmock import HTTMock |
13 | 12 |
tests/test_cityweb.py | ||
---|---|---|
20 | 20 |
import os |
21 | 21 |
import shutil |
22 | 22 |
import stat |
23 |
import zipfile |
|
24 | 23 | |
25 |
import mock |
|
26 | 24 |
import pytest |
27 | 25 |
from django.core.files.storage import default_storage |
28 | 26 |
from lxml import etree |
tests/test_fake_family.py | ||
---|---|---|
1 | 1 |
# -*- coding: utf-8 -*- |
2 | 2 | |
3 |
import json |
|
4 | ||
5 | 3 |
import pytest |
6 | 4 |
from django.urls import reverse |
7 | 5 |
tests/test_generic_endpoint.py | ||
---|---|---|
25 | 25 | |
26 | 26 |
import mock |
27 | 27 |
import pytest |
28 |
from django.contrib.contenttypes.models import ContentType |
|
29 | 28 |
from django.urls import reverse |
30 | 29 | |
31 | 30 |
import tests.utils |
32 | 31 |
from passerelle.apps.api_particulier.models import APIParticulier |
33 | 32 |
from passerelle.apps.arcgis.models import ArcGIS |
34 | 33 |
from passerelle.apps.mdel.models import MDEL |
35 |
from passerelle.base.models import ( |
|
36 |
BaseResource, |
|
37 |
HTTPResource, |
|
38 |
LoggingParameters, |
|
39 |
ProxyLogger, |
|
40 |
ResourceLog, |
|
41 |
ResourceStatus, |
|
42 |
) |
|
34 |
from passerelle.base.models import BaseResource, LoggingParameters, ProxyLogger, ResourceLog, ResourceStatus |
|
43 | 35 |
from passerelle.contrib.stub_invoices.models import StubInvoicesConnector |
44 | 36 |
from passerelle.utils.api import endpoint |
45 | 37 |
from tests.test_manager import login |
tests/test_gesbac.py | ||
---|---|---|
16 | 16 |
# You should have received a copy of the GNU Affero General Public License |
17 | 17 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
18 | 18 | |
19 |
import datetime |
|
20 | ||
21 | 19 |
import pytest |
22 |
from django.utils.encoding import force_bytes, force_str, force_text
|
|
20 |
from django.utils.encoding import force_bytes, force_text |
|
23 | 21 |
from django.utils.timezone import now |
24 | 22 | |
25 |
from passerelle.apps.gesbac.models import Form, Gesbac
|
|
23 |
from passerelle.apps.gesbac.models import Gesbac |
|
26 | 24 |
from passerelle.utils import SFTP |
27 | 25 |
from tests.utils import make_resource |
28 | 26 |
tests/test_iparapheur.py | ||
---|---|---|
1 | 1 |
# -*- coding: utf-8 -*- |
2 | 2 | |
3 |
import base64 |
|
4 | 3 |
import os |
5 | 4 |
import uuid |
6 | 5 |
import xml.etree.ElementTree as ET |
tests/test_isere_ens.py | ||
---|---|---|
16 | 16 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | 17 | |
18 | 18 | |
19 |
import json |
|
20 |
import os |
|
21 | ||
22 | 19 |
import mock |
23 | 20 |
import pytest |
24 | 21 |
from django.urls import reverse |
25 | 22 | |
26 | 23 |
import tests.utils |
27 | 24 |
from passerelle.contrib.isere_ens.models import API_VERSION, IsereENS |
28 |
from passerelle.utils.jsonresponse import APIError |
|
29 | 25 | |
30 | 26 | |
31 | 27 |
@pytest.fixture |
tests/test_jobs.py | ||
---|---|---|
11 | 11 |
import tests.utils |
12 | 12 |
from passerelle.base.models import Job, ResourceLog, SkipJob |
13 | 13 |
from passerelle.utils.jsonresponse import APIError |
14 |
from tests.test_base_adresse import StreetModel, base_adresse |
|
14 |
from tests.test_base_adresse import BaseAdresse, StreetModel |
|
15 | ||
16 | ||
17 |
@pytest.fixture |
|
18 |
def base_adresse(db): |
|
19 |
return tests.utils.setup_access_rights(BaseAdresse.objects.create(slug='base-adresse', zipcode='73')) |
|
15 | 20 | |
16 | 21 | |
17 | 22 |
@mock.patch('passerelle.utils.Request.get') |
tests/test_jsondatastore.py | ||
---|---|---|
4 | 4 |
from django.contrib.contenttypes.models import ContentType |
5 | 5 |
from django.core.serializers.json import DjangoJSONEncoder |
6 | 6 | |
7 |
from passerelle.apps.jsondatastore.models import JsonData, JsonDataStore
|
|
7 |
from passerelle.apps.jsondatastore.models import JsonDataStore |
|
8 | 8 |
from passerelle.base.models import AccessRight, ApiUser |
9 | 9 | |
10 | 10 |
tests/test_lille_kimoce.py | ||
---|---|---|
17 | 17 | |
18 | 18 | |
19 | 19 |
import json |
20 |
import os |
|
21 | 20 | |
22 | 21 |
import mock |
23 | 22 |
import pytest |
tests/test_maelis.py | ||
---|---|---|
16 | 16 |
month_range, |
17 | 17 |
week_boundaries_datetimes, |
18 | 18 |
) |
19 |
from passerelle.utils.jsonresponse import APIError |
|
20 | 19 | |
21 | 20 |
pytestmark = pytest.mark.django_db |
22 | 21 |
tests/test_opendatasoft.py | ||
---|---|---|
19 | 19 | |
20 | 20 |
import mock |
21 | 21 |
import pytest |
22 |
from django.contrib.auth.models import User |
|
23 | 22 |
from requests.exceptions import ConnectionError |
24 | 23 | |
25 | 24 |
import tests.utils |
tests/test_opengis.py | ||
---|---|---|
2 | 2 | |
3 | 3 |
import mock |
4 | 4 |
import pytest |
5 |
from django.contrib.auth.models import User |
|
6 | 5 |
from django.core.management import call_command |
7 | 6 | |
8 | 7 |
import tests.utils |
tests/test_phonecalls.py | ||
---|---|---|
1 |
import re |
|
2 | ||
3 | 1 |
import pytest |
4 | 2 |
from django.contrib.contenttypes.models import ContentType |
5 | 3 |
from django.utils.timezone import now, timedelta |
tests/test_photon.py | ||
---|---|---|
19 | 19 | |
20 | 20 |
import mock |
21 | 21 |
import pytest |
22 |
from django.core.management import call_command |
|
23 | 22 |
from httmock import HTTMock, remember_called, response, urlmatch |
24 | 23 |
from requests.exceptions import ConnectionError, HTTPError |
25 | 24 |
tests/test_requests.py | ||
---|---|---|
8 | 8 |
from httmock import HTTMock, response, urlmatch |
9 | 9 |
from urllib3.exceptions import ReadTimeoutError |
10 | 10 | |
11 |
import tests.utils |
|
12 | 11 |
from passerelle.utils import CaseInsensitiveDict, Request, log_http_request |
13 | 12 |
from passerelle.utils.http_authenticators import HawkAuth |
14 | 13 |
from tests.utils import FakedResponse |
tests/test_sms.py | ||
---|---|---|
16 | 16 |
import json |
17 | 17 |
import logging |
18 | 18 | |
19 |
import isodate |
|
20 | 19 |
import mock |
21 | 20 |
import pytest |
22 |
from django.conf import settings |
|
23 | 21 |
from django.contrib.contenttypes.models import ContentType |
24 | 22 |
from django.urls import reverse |
25 | 23 |
from django.utils.translation import ugettext as _ |
26 |
from requests import RequestException |
|
27 | 24 | |
28 | 25 |
import tests.utils |
29 | 26 |
from passerelle.apps.choosit.models import ChoositSMSGateway |
tests/test_strasbourg_eu.py | ||
---|---|---|
2 | 2 | |
3 | 3 |
import pytest |
4 | 4 |
from django.contrib.contenttypes.models import ContentType |
5 |
from httmock import HTTMock, all_requests
|
|
5 |
from httmock import HTTMock |
|
6 | 6 | |
7 | 7 |
import tests.utils |
8 | 8 |
from passerelle.base.models import AccessRight, ApiUser |
9 |
- |