Projet

Général

Profil

0002-misc-apply-isort-52797.patch

Lauréline Guérin, 06 avril 2021 21:32

Télécharger (161 ko)

Voir les différences:

Subject: [PATCH 2/2] misc: apply isort (#52797)

 combo/apps/assets/api_views.py                |  3 +-
 combo/apps/assets/templatetags/assets.py      |  1 -
 combo/apps/assets/urls.py                     |  5 +-
 combo/apps/assets/views.py                    | 18 +++----
 combo/apps/calendar/forms.py                  |  5 +-
 .../apps/calendar/migrations/0001_initial.py  |  3 +-
 combo/apps/calendar/models.py                 |  4 +-
 combo/apps/calendar/utils.py                  |  2 +-
 combo/apps/calendar/views.py                  |  4 +-
 .../apps/dashboard/migrations/0001_initial.py |  2 +-
 combo/apps/dashboard/models.py                |  4 +-
 combo/apps/dashboard/views.py                 |  6 +--
 combo/apps/dataviz/forms.py                   |  2 +-
 combo/apps/dataviz/migrations/0001_initial.py |  2 +-
 .../0002_gauge_jsonp_data_source.py           |  2 +-
 .../0003_cubesbarchart_cubestable.py          |  2 +-
 .../migrations/0004_auto_20160108_1048.py     |  2 +-
 .../migrations/0007_auto_20170214_2006.py     |  3 +-
 .../migrations/0010_auto_20190328_1111.py     |  2 +-
 .../migrations/0012_auto_20201126_1557.py     |  2 +-
 .../migrations/0015_auto_20201202_1424.py     |  2 +-
 combo/apps/dataviz/models.py                  | 18 +++----
 combo/apps/dataviz/views.py                   |  6 +--
 combo/apps/family/migrations/0001_initial.py  |  2 +-
 ..._familyinfoscell_restricted_to_unlogged.py |  2 +-
 ...4_familyinfoscell_last_update_timestamp.py |  3 +-
 combo/apps/family/models.py                   |  4 +-
 combo/apps/family/views.py                    |  6 +--
 combo/apps/fargo/migrations/0001_initial.py   |  2 +-
 ...centdocumentscell_last_update_timestamp.py |  3 +-
 combo/apps/fargo/models.py                    |  7 ++-
 combo/apps/gallery/migrations/0001_initial.py |  2 +-
 .../gallery/migrations/0002_image_title.py    |  2 +-
 .../migrations/0003_gallerycell_title.py      |  2 +-
 combo/apps/gallery/models.py                  |  4 +-
 combo/apps/gallery/views.py                   | 14 ++---
 combo/apps/kb/migrations/0001_initial.py      |  2 +-
 combo/apps/kb/models.py                       |  2 +-
 combo/apps/lingo/__init__.py                  |  5 +-
 combo/apps/lingo/forms.py                     |  3 +-
 combo/apps/lingo/manager_views.py             | 22 ++++----
 combo/apps/lingo/migrations/0001_initial.py   |  2 +-
 .../apps/lingo/migrations/0002_transaction.py |  2 +-
 .../migrations/0003_auto_20150306_1047.py     |  2 +-
 .../0004_basketitem_notification_date.py      |  2 +-
 .../migrations/0005_auto_20150307_1242.py     |  2 +-
 .../migrations/0006_transaction_status.py     |  2 +-
 .../migrations/0007_lingobasketlinkcell.py    |  2 +-
 .../migrations/0008_auto_20150908_1538.py     |  2 +-
 .../migrations/0009_auto_20150917_1456.py     |  2 +-
 .../0010_regie_payment_min_amount.py          |  2 +-
 .../migrations/0011_auto_20151029_1535.py     |  2 +-
 .../migrations/0012_auto_20151130_1047.py     |  2 +-
 .../migrations/0013_transaction_amount.py     |  2 +-
 .../migrations/0014_auto_20160218_1455.py     |  2 +-
 .../migrations/0015_auto_20160309_2150.py     |  2 +-
 .../migrations/0016_auto_20160319_2028.py     |  2 +-
 .../migrations/0017_auto_20160327_0831.py     |  2 +-
 .../migrations/0021_transactionoperation.py   |  2 +-
 .../0024_selfdeclaredinvoicepayment.py        |  2 +-
 .../migrations/0025_auto_20161206_1713.py     |  2 +-
 .../migrations/0027_auto_20170214_2006.py     |  3 +-
 .../migrations/0028_tipipaymentformcell.py    |  3 +-
 .../migrations/0029_auto_20170528_1334.py     |  2 +-
 ...030_transaction_to_be_paid_remote_items.py |  2 +-
 .../migrations/0034_auto_20190426_1159.py     |  2 +-
 .../migrations/0036_auto_20190426_1202.py     |  2 +-
 .../0037_regie_transaction_options.py         |  2 +-
 combo/apps/lingo/models.py                    | 29 +++++------
 combo/apps/lingo/urls.py                      | 46 ++++++++---------
 combo/apps/lingo/views.py                     | 51 ++++++++++---------
 combo/apps/maps/forms.py                      |  1 +
 combo/apps/maps/manager_views.py              |  9 ++--
 combo/apps/maps/migrations/0001_initial.py    |  3 +-
 .../maps/migrations/0008_map_layer_options.py |  2 +-
 combo/apps/maps/models.py                     | 17 +++----
 combo/apps/maps/urls.py                       |  3 +-
 .../newsletters/migrations/0001_initial.py    |  2 +-
 ...3_newsletterscell_last_update_timestamp.py |  3 +-
 combo/apps/newsletters/models.py              | 13 +++--
 combo/apps/newsletters/urls.py                |  2 +-
 combo/apps/newsletters/views.py               |  4 +-
 combo/apps/notifications/api_views.py         |  3 +-
 .../notifications/migrations/0001_initial.py  |  2 +-
 ...notificationscell_last_update_timestamp.py |  3 +-
 combo/apps/notifications/models.py            | 11 ++--
 combo/apps/notifications/urls.py              |  2 +-
 combo/apps/pwa/manager_views.py               |  8 +--
 combo/apps/pwa/migrations/0001_initial.py     |  4 +-
 combo/apps/pwa/migrations/0002_pwasettings.py |  3 +-
 .../pwa/migrations/0003_pwanavigationentry.py |  2 +-
 .../pwa/migrations/0006_auto_20190628_1042.py |  2 +-
 combo/apps/pwa/models.py                      |  7 ++-
 combo/apps/pwa/signals.py                     |  3 +-
 combo/apps/pwa/templatetags/pwa.py            |  1 -
 combo/apps/pwa/urls.py                        |  9 ++--
 combo/apps/pwa/views.py                       | 13 +++--
 combo/apps/search/forms.py                    |  3 +-
 combo/apps/search/manager_views.py            |  8 ++-
 .../migrations/0002_auto_20180720_1511.py     |  2 +-
 .../search/migrations/0006_indexedcell.py     |  2 +-
 combo/apps/search/models.py                   | 16 +++---
 combo/apps/search/urls.py                     |  5 +-
 combo/apps/search/utils.py                    |  5 +-
 combo/apps/wcs/__init__.py                    | 11 ++--
 combo/apps/wcs/forms.py                       | 10 ++--
 combo/apps/wcs/migrations/0001_initial.py     |  3 +-
 .../wcs/migrations/0002_auto_20150217_1402.py |  2 +-
 .../wcs/migrations/0003_auto_20150218_1151.py |  2 +-
 .../wcs/migrations/0004_auto_20150218_1154.py |  2 +-
 .../wcs/migrations/0005_auto_20150401_0758.py |  2 +-
 .../wcs/migrations/0006_categoriescell.py     |  3 +-
 .../migrations/0007_trackingcodeinputcell.py  |  2 +-
 .../0008_wcsformcell_cached_json.py           |  2 +-
 .../0009_remove_wcscategorycell_link_page.py  |  2 +-
 .../wcs/migrations/0010_auto_20151029_1535.py |  2 +-
 .../wcs/migrations/0011_auto_20151215_1121.py |  2 +-
 ...012_wcsformsofcategorycell_manual_order.py |  2 +-
 .../wcs/migrations/0014_auto_20170214_2006.py |  3 +-
 .../0015_wcscurrentformscell_categories.py    |  2 +-
 .../0016_backofficesubmissioncell.py          |  5 +-
 .../wcs/migrations/0017_wcscareformscell.py   |  5 +-
 .../0018_wcscurrentdraftscell_categories.py   |  2 +-
 combo/apps/wcs/migrations/0020_cards.py       |  5 +-
 combo/apps/wcs/migrations/0021_card.py        |  5 +-
 .../migrations/0025_submission_categories.py  |  2 +-
 combo/apps/wcs/models.py                      | 10 ++--
 combo/apps/wcs/templatetags/wcs.py            |  1 -
 combo/apps/wcs/utils.py                       |  1 -
 combo/apps/wcs/views.py                       | 11 ++--
 combo/context_processors.py                   |  2 +-
 combo/data/fields.py                          |  3 +-
 combo/data/forms.py                           |  3 +-
 combo/data/management/commands/import_site.py |  2 +-
 combo/data/migrations/0001_initial.py         |  2 +-
 .../migrations/0002_auto_20150217_1327.py     |  2 +-
 combo/data/migrations/0003_menucell.py        |  2 +-
 combo/data/migrations/0004_menucell_depth.py  |  2 +-
 .../migrations/0005_auto_20150226_0903.py     |  2 +-
 combo/data/migrations/0006_linkcell.py        |  2 +-
 .../migrations/0007_auto_20150529_1003.py     |  2 +-
 .../migrations/0008_auto_20150529_1504.py     |  2 +-
 .../migrations/0009_auto_20150529_2247.py     |  2 +-
 combo/data/migrations/0010_feedcell.py        |  2 +-
 .../migrations/0011_auto_20151028_1047.py     |  2 +-
 .../migrations/0012_auto_20151029_1535.py     |  2 +-
 combo/data/migrations/0013_parameterscell.py  |  2 +-
 .../migrations/0014_menucell_initial_level.py |  2 +-
 combo/data/migrations/0015_feedcell_title.py  |  2 +-
 combo/data/migrations/0021_jsoncell.py        |  3 +-
 .../migrations/0022_auto_20170214_2006.py     |  3 +-
 combo/data/migrations/0024_configjsoncell.py  |  2 +-
 .../migrations/0025_jsoncell_varnames_str.py  |  1 +
 .../migrations/0029_auto_20171022_1242.py     |  3 +-
 .../migrations/0033_auto_20180401_1300.py     |  4 +-
 combo/data/migrations/0034_redirect.py        |  2 +-
 .../migrations/0035_page_related_cells.py     |  2 +-
 combo/data/migrations/0039_link_list_cell.py  |  2 +-
 .../0042_page_creation_timestamp.py           |  2 +-
 combo/data/migrations/0044_validity_info.py   |  2 +-
 combo/data/models.py                          | 34 ++++++-------
 combo/data/utils.py                           |  8 ++-
 combo/manager/fields.py                       |  2 +-
 combo/manager/forms.py                        |  6 +--
 combo/manager/urls.py                         |  6 +--
 combo/manager/views.py                        | 48 +++++++++--------
 combo/middleware.py                           |  1 -
 combo/monkeypatch.py                          |  9 ++--
 combo/plugins.py                              |  2 +-
 combo/profile/__init__.py                     |  3 +-
 combo/profile/migrations/0001_initial.py      |  2 +-
 combo/profile/migrations/0002_profilecell.py  |  2 +-
 combo/profile/models.py                       |  4 +-
 combo/public/admin.py                         |  2 +-
 combo/public/templatetags/combo.py            | 10 ++--
 combo/public/urls.py                          |  1 +
 combo/public/views.py                         | 23 ++++-----
 combo/settings.py                             |  1 +
 combo/urls.py                                 |  8 ++-
 combo/urls_utils.py                           |  1 -
 combo/utils/__init__.py                       |  6 +--
 combo/utils/cache.py                          |  1 +
 combo/utils/crypto.py                         |  3 +-
 combo/utils/misc.py                           |  3 +-
 combo/utils/requests_wrapper.py               |  8 +--
 combo/utils/signature.py                      |  5 +-
 combo/utils/spooler.py                        |  2 +-
 combo/utils/urls.py                           |  2 +-
 setup.py                                      |  8 +--
 tests/conftest.py                             |  4 +-
 tests/test_assets.py                          | 22 ++++----
 tests/test_calendar.py                        |  9 ++--
 tests/test_cells.py                           | 34 ++++++-------
 tests/test_cron.py                            |  5 +-
 tests/test_dashboard.py                       | 12 ++---
 tests/test_dataviz.py                         | 11 ++--
 tests/test_fargo.py                           |  4 +-
 tests/test_gallery_cell.py                    |  5 +-
 tests/test_import_export.py                   |  8 +--
 tests/test_kb.py                              |  4 +-
 tests/test_lingo_cells.py                     | 11 ++--
 tests/test_lingo_manager.py                   | 22 ++++----
 tests/test_lingo_payment.py                   | 36 +++++++------
 tests/test_lingo_remote_regie.py              | 28 +++++-----
 tests/test_manager.py                         | 34 ++++++-------
 tests/test_maps_cells.py                      |  9 ++--
 tests/test_maps_manager.py                    |  6 +--
 tests/test_newsletters_cell.py                | 12 ++---
 tests/test_notification.py                    | 16 +++---
 tests/test_pages.py                           |  9 ++--
 tests/test_profile.py                         |  2 +-
 tests/test_public.py                          | 33 ++++++------
 tests/test_public_templatetags.py             |  5 +-
 tests/test_publik.py                          |  5 +-
 tests/test_pwa.py                             |  8 ++-
 tests/test_requests.py                        |  3 +-
 tests/test_search.py                          | 12 ++---
 tests/test_utils.py                           |  8 +--
 tests/test_wcs.py                             | 38 +++++++-------
 219 files changed, 647 insertions(+), 686 deletions(-)
combo/apps/assets/api_views.py
18 18

  
19 19
from django.core.files import File
20 20
from django.utils.six import BytesIO
21

  
22
from rest_framework import serializers, permissions, status
21
from rest_framework import permissions, serializers, status
23 22
from rest_framework.generics import GenericAPIView
24 23
from rest_framework.response import Response
25 24

  
combo/apps/assets/templatetags/assets.py
19 19
from django import template
20 20
from django.db.models.fields.files import ImageFieldFile
21 21
from django.utils import six
22

  
23 22
from sorl.thumbnail.shortcuts import get_thumbnail
24 23

  
25 24
from ..models import Asset
combo/apps/assets/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 url, include
17
from django.conf.urls import include, url
18 18

  
19 19
from combo.urls_utils import decorated_includes, manager_required
20 20

  
21
from . import views
22
from . import api_views
21
from . import api_views, views
23 22

  
24 23
assets_manager_urls = [
25 24
    url(r'^$', views.assets, name='combo-manager-assets'),
combo/apps/assets/views.py
15 15
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
16 16

  
17 17
import json
18
import tarfile
19 18
import os
19
import tarfile
20 20

  
21
import ckeditor
21 22
from django.conf import settings
22 23
from django.contrib import messages
23 24
from django.core.exceptions import ObjectDoesNotExist, PermissionDenied
24 25
from django.core.files.storage import default_storage
25
from django.urls import reverse, reverse_lazy
26 26
from django.http import Http404, HttpResponse
27
from django.shortcuts import get_object_or_404
28
from django.shortcuts import redirect
27
from django.shortcuts import get_object_or_404, redirect
28
from django.urls import reverse, reverse_lazy
29 29
from django.utils.six import BytesIO
30 30
from django.utils.translation import ugettext_lazy as _
31
from django.views.generic import TemplateView, ListView, FormView
32

  
33
import ckeditor
31
from django.views.generic import FormView, ListView, TemplateView
34 32
from sorl.thumbnail.shortcuts import get_thumbnail
35 33

  
36
from combo.data.models import CellBase
37
from combo.apps.assets.utils import import_assets, export_assets
34
from combo.apps.assets.utils import export_assets, import_assets
38 35
from combo.apps.maps.models import MapLayer
36
from combo.data.models import CellBase
39 37

  
40
from .forms import AssetUploadForm, AssetsImportForm
38
from .forms import AssetsImportForm, AssetUploadForm
41 39
from .models import Asset
42 40

  
43 41

  
combo/apps/calendar/forms.py
15 15
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
16 16

  
17 17
from django import forms
18
from django.utils.translation import ugettext_lazy as _
19 18
from django.utils.dateparse import parse_datetime, parse_time
19
from django.utils.translation import ugettext_lazy as _
20

  
21
from combo.apps.wcs.utils import get_wcs_options
20 22

  
21 23
from .models import BookingCalendar
22 24
from .utils import get_agendas
23
from combo.apps.wcs.utils import get_wcs_options
24 25

  
25 26

  
26 27
class BookingCalendarForm(forms.ModelForm):
combo/apps/calendar/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
5 4
import datetime
6 5

  
6
from django.db import migrations, models
7

  
7 8

  
8 9
class Migration(migrations.Migration):
9 10

  
combo/apps/calendar/models.py
20 20
from django.db import models
21 21
from django.utils.translation import ugettext_lazy as _
22 22

  
23
from combo.data.models import CellBase
24 23
from combo.data.library import register_cell_class
24
from combo.data.models import CellBase
25 25

  
26
from .utils import is_chrono_enabled, is_wcs_enabled, get_chrono_events, get_calendar_context_vars
26
from .utils import get_calendar_context_vars, get_chrono_events, is_chrono_enabled, is_wcs_enabled
27 27

  
28 28

  
29 29
@register_cell_class
combo/apps/calendar/utils.py
18 18
import math
19 19

  
20 20
from django.conf import settings
21
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
21
from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator
22 22
from django.utils.dateparse import parse_datetime
23 23
from django.utils.http import urlencode
24 24
from django.utils.timezone import localtime, make_aware
combo/apps/calendar/views.py
17 17
from django.contrib import messages
18 18
from django.http import HttpResponseRedirect
19 19
from django.utils.encoding import force_text
20
from django.views.generic import View, DetailView
20
from django.views.generic import DetailView, View
21 21
from django.views.generic.detail import SingleObjectMixin
22 22

  
23 23
from .forms import BookingForm
24 24
from .models import BookingCalendar
25
from .utils import get_form_url_with_params, get_chrono_events, get_calendar_context_vars
25
from .utils import get_calendar_context_vars, get_chrono_events, get_form_url_with_params
26 26

  
27 27

  
28 28
class BookingView(SingleObjectMixin, View):
combo/apps/dashboard/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
5 4
from django.conf import settings
5
from django.db import migrations, models
6 6

  
7 7

  
8 8
class Migration(migrations.Migration):
combo/apps/dashboard/models.py
17 17
import datetime
18 18

  
19 19
from django.conf import settings
20
from django.contrib.contenttypes.models import ContentType
21 20
from django.contrib.contenttypes import fields
21
from django.contrib.contenttypes.models import ContentType
22 22
from django.db import models
23 23
from django.utils.timezone import now
24 24
from django.utils.translation import ugettext_lazy as _
25 25

  
26
from combo.data.models import CellBase, ValidityInfo
27 26
from combo.data.library import register_cell_class
27
from combo.data.models import CellBase, ValidityInfo
28 28

  
29 29

  
30 30
@register_cell_class
combo/apps/dashboard/views.py
19 19
from django.conf import settings
20 20
from django.contrib.contenttypes.models import ContentType
21 21
from django.core.exceptions import PermissionDenied
22
from django.urls import reverse
23 22
from django.db.models import Max, Min
24 23
from django.http import (
25 24
    Http404,
26 25
    HttpResponse,
27 26
    HttpResponseBadRequest,
28
    HttpResponseRedirect,
29 27
    HttpResponseNotAllowed,
28
    HttpResponseRedirect,
30 29
)
30
from django.urls import reverse
31 31
from django.utils.encoding import force_text
32 32
from django.views.decorators.csrf import csrf_exempt
33 33
from django.views.generic import View
34 34

  
35
from combo.data.models import CellBase, ConfigJsonCell
36 35
from combo.data.library import get_cell_class
36
from combo.data.models import CellBase, ConfigJsonCell
37 37
from combo.public.views import render_cell
38 38

  
39 39
from .models import DashboardCell, Tile
combo/apps/dataviz/forms.py
22 22
from django.db import transaction
23 23
from django.db.models import Q
24 24

  
25
from combo.utils import requests, cache_during_request, spooler
25
from combo.utils import cache_during_request, requests, spooler
26 26

  
27 27
from .models import ChartCell, ChartNgCell
28 28

  
combo/apps/dataviz/migrations/0001_initial.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
4
from django.db import migrations, models
5 5

  
6 6

  
7 7
class Migration(migrations.Migration):
combo/apps/dataviz/migrations/0002_gauge_jsonp_data_source.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
4
from django.db import migrations, models
5 5

  
6 6

  
7 7
class Migration(migrations.Migration):
combo/apps/dataviz/migrations/0003_cubesbarchart_cubestable.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
4
from django.db import migrations, models
5 5

  
6 6

  
7 7
class Migration(migrations.Migration):
combo/apps/dataviz/migrations/0004_auto_20160108_1048.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
4
from django.db import migrations, models
5 5

  
6 6

  
7 7
class Migration(migrations.Migration):
combo/apps/dataviz/migrations/0007_auto_20170214_2006.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import migrations, models
5 4
import datetime
5

  
6
from django.db import migrations, models
6 7
from django.utils.timezone import utc
7 8

  
8 9

  
combo/apps/dataviz/migrations/0010_auto_20190328_1111.py
2 2
# Generated by Django 1.11.12 on 2019-03-28 10:11
3 3
from __future__ import unicode_literals
4 4

  
5
from django.db import migrations, models
6 5
import django.db.models.deletion
7 6
import jsonfield.fields
7
from django.db import migrations, models
8 8

  
9 9

  
10 10
class Migration(migrations.Migration):
combo/apps/dataviz/migrations/0012_auto_20201126_1557.py
2 2
# Generated by Django 1.11.29 on 2020-11-26 14:57
3 3
from __future__ import unicode_literals
4 4

  
5
from django.db import migrations, models
6 5
import django.db.models.deletion
6
from django.db import migrations, models
7 7

  
8 8

  
9 9
class Migration(migrations.Migration):
combo/apps/dataviz/migrations/0015_auto_20201202_1424.py
2 2
# Generated by Django 1.11.29 on 2020-12-02 13:24
3 3
from __future__ import unicode_literals
4 4

  
5
from django.db import migrations
6 5
import jsonfield.fields
6
from django.db import migrations
7 7

  
8 8

  
9 9
class Migration(migrations.Migration):
combo/apps/dataviz/models.py
18 18
import os
19 19
import sys
20 20
from datetime import date
21
from requests.exceptions import RequestException
22 21

  
23
from django.urls import reverse
22
import pygal
23
import pygal.util
24
from django.conf import settings
24 25
from django.db import models, transaction
26
from django.urls import reverse
25 27
from django.utils import timezone
26 28
from django.utils.encoding import force_text
27
from django.utils.translation import ugettext_lazy as _, ungettext, gettext
28
from django.conf import settings
29

  
29
from django.utils.translation import gettext
30
from django.utils.translation import ugettext_lazy as _
31
from django.utils.translation import ungettext
30 32
from jsonfield import JSONField
31
from requests.exceptions import HTTPError
32
import pygal
33
import pygal.util
33
from requests.exceptions import HTTPError, RequestException
34 34

  
35
from combo.data.models import CellBase
36 35
from combo.data.library import register_cell_class
36
from combo.data.models import CellBase
37 37
from combo.utils import get_templated_url, requests, spooler
38 38

  
39 39

  
combo/apps/dataviz/views.py
15 15
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
16 16

  
17 17
from django.core.exceptions import PermissionDenied
18
from django.http import HttpResponse, Http404
18
from django.http import Http404, HttpResponse
19 19
from django.utils.translation import ugettext_lazy as _
20

  
21 20
from requests.exceptions import HTTPError
22 21

  
23 22
from combo.utils import get_templated_url, requests
24
from .models import Gauge, ChartNgCell, UnsupportedDataSet
23

  
24
from .models import ChartNgCell, Gauge, UnsupportedDataSet
25 25

  
26 26

  
27 27
def ajax_gauge_count(request, *args, **kwargs):
combo/apps/family/migrations/0001_initial.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
5 4
import ckeditor.fields
5
from django.db import migrations, models
6 6

  
7 7

  
8 8
class Migration(migrations.Migration):
combo/apps/family/migrations/0002_familyinfoscell_restricted_to_unlogged.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
4
from django.db import migrations, models
5 5

  
6 6

  
7 7
class Migration(migrations.Migration):
combo/apps/family/migrations/0004_familyinfoscell_last_update_timestamp.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import migrations, models
5 4
import datetime
5

  
6
from django.db import migrations, models
6 7
from django.utils.timezone import utc
7 8

  
8 9

  
combo/apps/family/models.py
16 16

  
17 17
from django.utils.translation import ugettext_lazy as _
18 18

  
19
from combo.data.models import CellBase
20 19
from combo.data.library import register_cell_class
20
from combo.data.models import CellBase
21 21

  
22
from .utils import is_family_enabled, get_family
22
from .utils import get_family, is_family_enabled
23 23

  
24 24

  
25 25
@register_cell_class
combo/apps/family/views.py
15 15
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
16 16

  
17 17

  
18
from django.views.generic import FormView, TemplateView
19
from django.utils.translation import ugettext_lazy as _
20
from django.http import HttpResponseRedirect
21 18
from django.contrib import messages
19
from django.http import HttpResponseRedirect
20
from django.utils.translation import ugettext_lazy as _
21
from django.views.generic import FormView, TemplateView
22 22

  
23 23
from .forms import FamilyLinkForm
24 24
from .utils import link_family, unlink_family
combo/apps/fargo/migrations/0001_initial.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
4
from django.db import migrations, models
5 5

  
6 6

  
7 7
class Migration(migrations.Migration):
combo/apps/fargo/migrations/0003_recentdocumentscell_last_update_timestamp.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import migrations, models
5 4
import datetime
5

  
6
from django.db import migrations, models
6 7
from django.utils.timezone import utc
7 8

  
8 9

  
combo/apps/fargo/models.py
18 18

  
19 19
from django.conf import settings
20 20
from django.db import models
21
from django.forms import models as model_forms
22 21
from django.forms import Select
22
from django.forms import models as model_forms
23 23
from django.utils.translation import ugettext_lazy as _
24
from requests import HTTPError, RequestException
24 25

  
25
from requests import RequestException, HTTPError
26

  
27
from combo.data.models import CellBase
28 26
from combo.data.library import register_cell_class
27
from combo.data.models import CellBase
29 28
from combo.utils import requests
30 29

  
31 30
logger = logging.getLogger(__name__)
combo/apps/gallery/migrations/0001_initial.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
4
from django.db import migrations, models
5 5

  
6 6

  
7 7
class Migration(migrations.Migration):
combo/apps/gallery/migrations/0002_image_title.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
4
from django.db import migrations, models
5 5

  
6 6

  
7 7
class Migration(migrations.Migration):
combo/apps/gallery/migrations/0003_gallerycell_title.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
4
from django.db import migrations, models
5 5

  
6 6

  
7 7
class Migration(migrations.Migration):
combo/apps/gallery/models.py
17 17
import json
18 18

  
19 19
from django import template
20
from django.db import models
21 20
from django.core import serializers
21
from django.db import models
22 22
from django.forms import models as model_forms
23 23
from django.utils.translation import ugettext_lazy as _
24 24

  
25
from combo.data.models import CellBase
26 25
from combo.data.library import register_cell_class
26
from combo.data.models import CellBase
27 27

  
28 28

  
29 29
@register_cell_class
combo/apps/gallery/views.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.urls import reverse, reverse_lazy
18 17
from django.shortcuts import redirect
18
from django.urls import reverse, reverse_lazy
19 19
from django.views.generic import (
20
    TemplateView,
21
    RedirectView,
22
    DetailView,
23 20
    CreateView,
24
    UpdateView,
25
    ListView,
26 21
    DeleteView,
22
    DetailView,
27 23
    FormView,
24
    ListView,
25
    RedirectView,
26
    TemplateView,
27
    UpdateView,
28 28
)
29 29

  
30
from .models import Image, GalleryCell
31 30
from .forms import ImageAddForm, ImageEditForm
31
from .models import GalleryCell, Image
32 32

  
33 33

  
34 34
class ImageAddView(CreateView):
combo/apps/kb/migrations/0001_initial.py
2 2
# Generated by Django 1.11.18 on 2020-01-31 15:40
3 3
from __future__ import unicode_literals
4 4

  
5
from django.db import migrations, models
6 5
import django.db.models.deletion
6
from django.db import migrations, models
7 7

  
8 8

  
9 9
class Migration(migrations.Migration):
combo/apps/kb/models.py
21 21
from django.utils import timezone
22 22
from django.utils.translation import ugettext_lazy as _
23 23

  
24
from combo.data.models import CellBase, Page
25 24
from combo.data.library import register_cell_class
25
from combo.data.models import CellBase, Page
26 26

  
27 27

  
28 28
@register_cell_class
combo/apps/lingo/__init__.py
18 18
import logging
19 19

  
20 20
import django.apps
21
import eopayment
21 22
from django.urls import reverse
22 23
from django.utils import timezone
23 24
from django.utils.translation import ugettext_lazy as _
24 25

  
25
import eopayment
26

  
27 26

  
28 27
class AppConfig(django.apps.AppConfig):
29 28
    name = 'combo.apps.lingo'
......
42 41
        self.notify_payments()
43 42

  
44 43
    def update_transactions(self):
45
        from .models import Transaction, EXPIRED
44
        from .models import EXPIRED, Transaction
46 45

  
47 46
        logger = logging.getLogger(__name__)
48 47
        now = timezone.now()
combo/apps/lingo/forms.py
16 16

  
17 17
import datetime
18 18

  
19

  
20 19
from django import forms
21 20
from django.core.exceptions import ValidationError
22 21
from django.utils.translation import ugettext_lazy as _
23 22

  
24
from .models import Regie, PaymentBackend
23
from .models import PaymentBackend, Regie
25 24

  
26 25
TYPE_FIELD_MAPPING = {
27 26
    str: forms.CharField,
combo/apps/lingo/manager_views.py
16 16

  
17 17
import csv
18 18
import datetime
19
from dateutil import parser as date_parser
20 19

  
21
from django.urls import reverse
22
from django.urls import reverse_lazy
20
import eopayment
21
from dateutil import parser as date_parser
23 22
from django.contrib import messages
24
from django.db.models import Q, Prefetch
23
from django.db.models import Prefetch, Q
25 24
from django.db.models.expressions import RawSQL
25
from django.http import HttpResponse, HttpResponseRedirect
26
from django.shortcuts import get_object_or_404
27
from django.template.response import TemplateResponse
28
from django.urls import reverse, reverse_lazy
26 29
from django.utils import six
27 30
from django.utils.timezone import make_aware, now
28 31
from django.utils.translation import ugettext_lazy as _
29
from django.views.generic import CreateView, UpdateView, ListView, DeleteView, View
30
from django.http import HttpResponse
31
from django.http import HttpResponseRedirect
32
from django.shortcuts import get_object_or_404
33
from django.template.response import TemplateResponse
34

  
35
import eopayment
32
from django.views.generic import CreateView, DeleteView, ListView, UpdateView, View
36 33

  
37
from .forms import RegieForm, PaymentBackendForm
38
from .forms import TransactionExportForm
34
from .forms import PaymentBackendForm, RegieForm, TransactionExportForm
39 35
from .models import BasketItem, PaymentBackend, Regie, Transaction
40 36

  
41 37

  
combo/apps/lingo/migrations/0001_initial.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
5 4
import jsonfield.fields
6 5
from django.conf import settings
6
from django.db import migrations, models
7 7

  
8 8

  
9 9
class Migration(migrations.Migration):
combo/apps/lingo/migrations/0002_transaction.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
5 4
import jsonfield.fields
5
from django.db import migrations, models
6 6

  
7 7

  
8 8
class Migration(migrations.Migration):
combo/apps/lingo/migrations/0003_auto_20150306_1047.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
4
from django.db import migrations, models
5 5

  
6 6

  
7 7
class Migration(migrations.Migration):
combo/apps/lingo/migrations/0004_basketitem_notification_date.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
4
from django.db import migrations, models
5 5

  
6 6

  
7 7
class Migration(migrations.Migration):
combo/apps/lingo/migrations/0005_auto_20150307_1242.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
5 4
from django.conf import settings
5
from django.db import migrations, models
6 6

  
7 7

  
8 8
class Migration(migrations.Migration):
combo/apps/lingo/migrations/0006_transaction_status.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
4
from django.db import migrations, models
5 5

  
6 6

  
7 7
class Migration(migrations.Migration):
combo/apps/lingo/migrations/0007_lingobasketlinkcell.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
4
from django.db import migrations, models
5 5

  
6 6

  
7 7
class Migration(migrations.Migration):
combo/apps/lingo/migrations/0008_auto_20150908_1538.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
5 4
import ckeditor.fields
5
from django.db import migrations, models
6 6

  
7 7

  
8 8
class Migration(migrations.Migration):
combo/apps/lingo/migrations/0009_auto_20150917_1456.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
5 4
from django.conf import settings
5
from django.db import migrations, models
6 6

  
7 7

  
8 8
class Migration(migrations.Migration):
combo/apps/lingo/migrations/0010_regie_payment_min_amount.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
4
from django.db import migrations, models
5 5

  
6 6

  
7 7
class Migration(migrations.Migration):
combo/apps/lingo/migrations/0011_auto_20151029_1535.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
4
from django.db import migrations, models
5 5

  
6 6

  
7 7
class Migration(migrations.Migration):
combo/apps/lingo/migrations/0012_auto_20151130_1047.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
4
from django.db import migrations, models
5 5

  
6 6

  
7 7
class Migration(migrations.Migration):
combo/apps/lingo/migrations/0013_transaction_amount.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
4
from django.db import migrations, models
5 5

  
6 6

  
7 7
class Migration(migrations.Migration):
combo/apps/lingo/migrations/0014_auto_20160218_1455.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
4
from django.db import migrations, models
5 5

  
6 6

  
7 7
class Migration(migrations.Migration):
combo/apps/lingo/migrations/0015_auto_20160309_2150.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
4
from django.db import migrations, models
5 5

  
6 6

  
7 7
class Migration(migrations.Migration):
combo/apps/lingo/migrations/0016_auto_20160319_2028.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
4
from django.db import migrations, models
5 5

  
6 6

  
7 7
class Migration(migrations.Migration):
combo/apps/lingo/migrations/0017_auto_20160327_0831.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import migrations, models
5 4
import ckeditor.fields
5
from django.db import migrations, models
6 6

  
7 7

  
8 8
class Migration(migrations.Migration):
combo/apps/lingo/migrations/0021_transactionoperation.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import migrations, models
5 4
import jsonfield.fields
5
from django.db import migrations, models
6 6

  
7 7

  
8 8
class Migration(migrations.Migration):
combo/apps/lingo/migrations/0024_selfdeclaredinvoicepayment.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import migrations, models
5 4
import ckeditor.fields
5
from django.db import migrations, models
6 6

  
7 7

  
8 8
class Migration(migrations.Migration):
combo/apps/lingo/migrations/0025_auto_20161206_1713.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
5 4
from django.conf import settings
5
from django.db import migrations, models
6 6

  
7 7

  
8 8
class Migration(migrations.Migration):
combo/apps/lingo/migrations/0027_auto_20170214_2006.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import migrations, models
5 4
import datetime
5

  
6
from django.db import migrations, models
6 7
from django.utils.timezone import utc
7 8

  
8 9

  
combo/apps/lingo/migrations/0028_tipipaymentformcell.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
4
from django.db import migrations, models
5

  
5 6
import combo.data.fields
6 7

  
7 8

  
combo/apps/lingo/migrations/0029_auto_20170528_1334.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import migrations, models
5 4
import jsonfield.fields
5
from django.db import migrations, models
6 6

  
7 7

  
8 8
class Migration(migrations.Migration):
combo/apps/lingo/migrations/0030_transaction_to_be_paid_remote_items.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
4
from django.db import migrations, models
5 5

  
6 6

  
7 7
class Migration(migrations.Migration):
combo/apps/lingo/migrations/0034_auto_20190426_1159.py
2 2
# Generated by Django 1.11.18 on 2019-04-26 09:59
3 3
from __future__ import unicode_literals
4 4

  
5
from django.db import migrations, models
6 5
import django.db.models.deletion
7 6
import jsonfield.fields
7
from django.db import migrations, models
8 8

  
9 9

  
10 10
class Migration(migrations.Migration):
combo/apps/lingo/migrations/0036_auto_20190426_1202.py
2 2
# Generated by Django 1.11.18 on 2019-04-26 10:02
3 3
from __future__ import unicode_literals
4 4

  
5
from django.db import migrations, models
6 5
import django.db.models.deletion
6
from django.db import migrations, models
7 7

  
8 8

  
9 9
class Migration(migrations.Migration):
combo/apps/lingo/migrations/0037_regie_transaction_options.py
2 2
# Generated by Django 1.11.18 on 2019-05-14 12:02
3 3
from __future__ import unicode_literals
4 4

  
5
from django.db import migrations, models
6 5
import jsonfield.fields
6
from django.db import migrations, models
7 7

  
8 8
from combo.apps.lingo.models import SERVICES
9 9

  
combo/apps/lingo/models.py
17 17
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
18 18

  
19 19
import datetime
20
from decimal import Decimal
21 20
import json
22 21
import logging
23 22
import re
23
from decimal import Decimal
24 24

  
25
from dateutil import parser
26 25
import eopayment
27
from jsonfield import JSONField
28
from requests import RequestException
29

  
26
from dateutil import parser
30 27
from django import template
31 28
from django.conf import settings
29
from django.contrib.auth.models import User
32 30
from django.core import serializers
33
from django.db import models
34
from django.forms import models as model_forms, Select
35
from django.utils.translation import ugettext_lazy as _
36
from django.utils import timezone, dateparse, six
31
from django.core.exceptions import ObjectDoesNotExist, PermissionDenied, ValidationError
37 32
from django.core.mail import EmailMultiAlternatives
33
from django.db import models
34
from django.forms import Select
35
from django.forms import models as model_forms
36
from django.template.loader import render_to_string
38 37
from django.urls import reverse
39
from django.core.exceptions import ObjectDoesNotExist, PermissionDenied, ValidationError
38
from django.utils import dateparse, six, timezone
40 39
from django.utils.encoding import force_bytes, python_2_unicode_compatible
41 40
from django.utils.formats import localize
42 41
from django.utils.http import urlencode
43 42
from django.utils.six.moves.urllib import parse as urlparse
44 43
from django.utils.timezone import make_aware, utc
44
from django.utils.translation import ugettext_lazy as _
45
from jsonfield import JSONField
46
from requests import RequestException
45 47

  
46
from django.contrib.auth.models import User
47
from django.template.loader import render_to_string
48

  
48
from combo.apps.notifications.models import Notification
49 49
from combo.data.fields import RichTextField
50
from combo.data.models import CellBase
51 50
from combo.data.library import register_cell_class
51
from combo.data.models import CellBase
52 52
from combo.utils import NothingInCacheException, aes_hex_encrypt, requests
53
from combo.apps.notifications.models import Notification
54 53

  
55 54
from .utils import signing_dumps
56 55

  
combo/apps/lingo/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 url, include
17
from django.conf.urls import include, url
18 18

  
19 19
from combo.urls_utils import decorated_includes, manager_required
20 20

  
21
from .manager_views import (
22
    BasketItemErrorListView,
23
    BasketItemMarkAsNotifiedView,
24
    PaymentBackendCreateView,
25
    PaymentBackendDeleteView,
26
    PaymentBackendListView,
27
    PaymentBackendUpdateView,
28
    RegieCreateView,
29
    RegieDeleteView,
30
    RegieListView,
31
    RegieUpdateView,
32
    TransactionListView,
33
    download_transactions_csv,
34
)
21 35
from .views import (
22
    RegiesApiView,
23 36
    AddBasketItemApiView,
24
    PayView,
37
    BasketItemPayView,
25 38
    CallbackView,
26
    ReturnView,
39
    CancelItemView,
40
    CancelTransactionApiView,
27 41
    ItemDownloadView,
28 42
    ItemView,
29
    CancelItemView,
43
    PaymentStatusView,
44
    PayView,
45
    RegiesApiView,
30 46
    RemoveBasketItemApiView,
31
    ValidateTransactionApiView,
32
    CancelTransactionApiView,
47
    ReturnView,
33 48
    SelfInvoiceView,
34
    BasketItemPayView,
35 49
    TransactionStatusApiView,
36
    PaymentStatusView,
37
)
38
from .manager_views import (
39
    RegieListView,
40
    RegieCreateView,
41
    RegieUpdateView,
42
    RegieDeleteView,
43
    TransactionListView,
44
    BasketItemErrorListView,
45
    download_transactions_csv,
46
    PaymentBackendListView,
47
    PaymentBackendCreateView,
48
    PaymentBackendUpdateView,
49
    PaymentBackendDeleteView,
50
    BasketItemMarkAsNotifiedView,
50
    ValidateTransactionApiView,
51 51
)
52 52

  
53 53
lingo_manager_urls = [
combo/apps/lingo/views.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 decimal import Decimal, ROUND_HALF_UP
18 17
import json
19 18
import logging
20
import requests
19
from decimal import ROUND_HALF_UP, Decimal
21 20

  
21
import eopayment
22
import requests
23
from django.conf import settings
24
from django.contrib import messages
22 25
from django.contrib.auth.models import User
23
from django.core.exceptions import ObjectDoesNotExist, PermissionDenied
24
from django.urls import reverse
25 26
from django.core import signing
26
from django.http import HttpResponse, HttpResponseNotFound, HttpResponseRedirect, HttpResponseBadRequest
27
from django.http import HttpResponseForbidden, Http404, JsonResponse
27
from django.core.exceptions import ObjectDoesNotExist, PermissionDenied
28
from django.db.transaction import atomic
29
from django.http import (
30
    Http404,
31
    HttpResponse,
32
    HttpResponseBadRequest,
33
    HttpResponseForbidden,
34
    HttpResponseNotFound,
35
    HttpResponseRedirect,
36
    JsonResponse,
37
)
38
from django.shortcuts import get_object_or_404
28 39
from django.template.response import TemplateResponse
29
from django.utils import timezone, dateparse, six
30
from django.utils.encoding import force_text
40
from django.urls import reverse
41
from django.utils import dateparse, six, timezone
42
from django.utils.encoding import force_text, smart_text
31 43
from django.utils.http import urlencode
32
from django.views.decorators.csrf import csrf_exempt
33
from django.views.generic import View, DetailView, ListView, TemplateView
34
from django.conf import settings
35
from django.contrib import messages
36 44
from django.utils.translation import ugettext_lazy as _
37
from django.db.transaction import atomic
38
from django.shortcuts import get_object_or_404
39
from django.utils.encoding import smart_text
40

  
41
import eopayment
45
from django.views.decorators.csrf import csrf_exempt
46
from django.views.generic import DetailView, ListView, TemplateView, View
42 47

  
43 48
from combo.data.models import Page
44
from combo.utils import check_request_signature, aes_hex_decrypt, DecryptionError
45 49
from combo.profile.utils import get_user_from_name_id
46 50
from combo.public.views import publish_page
51
from combo.utils import DecryptionError, aes_hex_decrypt, check_request_signature
47 52

  
48 53
from .models import (
49
    Regie,
54
    EXPIRED,
50 55
    BasketItem,
51
    Transaction,
52
    TransactionOperation,
53 56
    LingoBasketCell,
54
    SelfDeclaredInvoicePayment,
55 57
    PaymentBackend,
56
    EXPIRED,
58
    Regie,
57 59
    RemoteInvoiceException,
60
    SelfDeclaredInvoicePayment,
61
    Transaction,
62
    TransactionOperation,
58 63
)
59 64
from .utils import signing_dumps, signing_loads
60 65

  
combo/apps/maps/forms.py
20 20
from django.utils.translation import ugettext_lazy as _
21 21

  
22 22
from combo.data.fields import TemplatableURLField
23

  
23 24
from .models import MapLayer, MapLayerOptions
24 25

  
25 26

  
combo/apps/maps/manager_views.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.urls import reverse, reverse_lazy
18 17
from django.http import Http404
19 18
from django.shortcuts import get_object_or_404
19
from django.urls import reverse, reverse_lazy
20 20
from django.utils.translation import ugettext_lazy as _
21
from django.views.generic import ListView, CreateView, UpdateView, DeleteView
21
from django.views.generic import CreateView, DeleteView, ListView, UpdateView
22 22

  
23 23
from combo.data.models import CellBase, PageSnapshot
24
from .models import Map
25
from .models import MapLayer
26
from .models import MapLayerOptions
24

  
27 25
from .forms import MapLayerForm, MapLayerOptionsForm
26
from .models import Map, MapLayer, MapLayerOptions
28 27

  
29 28

  
30 29
class MapLayerMixin(object):
combo/apps/maps/migrations/0001_initial.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from combo.apps.maps.models import ICONS
5 4
from django.db import migrations, models
6 5

  
6
from combo.apps.maps.models import ICONS
7

  
7 8

  
8 9
class Migration(migrations.Migration):
9 10

  
combo/apps/maps/migrations/0008_map_layer_options.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import migrations, models
5 4
import django.db.models.deletion
5
from django.db import migrations, models
6 6

  
7 7

  
8 8
class Migration(migrations.Migration):
combo/apps/maps/models.py
16 16

  
17 17
import json
18 18

  
19
from django.core import serializers
20
from django.core import validators
19
import pyproj
20
from django import forms
21
from django.conf import settings
22
from django.core import serializers, validators
21 23
from django.db import models
24
from django.urls import reverse
22 25
from django.utils import six
23 26
from django.utils.encoding import python_2_unicode_compatible
24 27
from django.utils.html import escape
25 28
from django.utils.text import slugify
26 29
from django.utils.translation import ugettext_lazy as _
27
from django.urls import reverse
28
from django import forms
29
from django.conf import settings
30

  
31
import pyproj
32 30
from requests.models import PreparedRequest
33 31

  
34
from combo.data.models import CellBase
35 32
from combo.data.library import register_cell_class
36
from combo.utils import requests, get_templated_url
37

  
33
from combo.data.models import CellBase
34
from combo.utils import get_templated_url, requests
38 35

  
39 36
KIND = [
40 37
    ('tiles', _('Tiles')),
combo/apps/maps/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 url, include
17
from django.conf.urls import include, url
18 18

  
19 19
from combo.urls_utils import decorated_includes, manager_required
20 20

  
21 21
from . import manager_views
22

  
23 22
from .views import GeojsonView
24 23

  
25 24
maps_manager_urls = [
combo/apps/newsletters/migrations/0001_initial.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
4
from django.db import migrations, models
5 5

  
6 6

  
7 7
class Migration(migrations.Migration):
combo/apps/newsletters/migrations/0003_newsletterscell_last_update_timestamp.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import migrations, models
5 4
import datetime
5

  
6
from django.db import migrations, models
6 7
from django.utils.timezone import utc
7 8

  
8 9

  
combo/apps/newsletters/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 logging
18 17
import json
18
import logging
19 19

  
20
from requests.exceptions import RequestException, HTTPError
21

  
20
from django.conf import settings
22 21
from django.db import models
23
from django.utils.translation import ugettext_lazy as _
24
from django.template.defaultfilters import slugify
25 22
from django.forms import models as model_forms
26
from django.conf import settings
23
from django.template.defaultfilters import slugify
27 24
from django.utils.http import urlencode
25
from django.utils.translation import ugettext_lazy as _
26
from requests.exceptions import HTTPError, RequestException
28 27

  
29
from combo.data.models import CellBase
30 28
from combo.data.library import register_cell_class
29
from combo.data.models import CellBase
31 30
from combo.utils import requests
32 31

  
33 32
from .forms import NewslettersManageForm
combo/apps/newsletters/urls.py
1
from django.contrib.auth.decorators import login_required
2 1
from django.conf.urls import url
2
from django.contrib.auth.decorators import login_required
3 3

  
4 4
from .views import NewslettersView
5 5

  
combo/apps/newsletters/views.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.views.generic import FormView
18
from django.utils.translation import ugettext_lazy as _
19 17
from django.contrib import messages
20 18
from django.http import HttpResponseRedirect
19
from django.utils.translation import ugettext_lazy as _
20
from django.views.generic import FormView
21 21

  
22 22
from .forms import NewslettersManageForm
23 23
from .models import NewslettersCell, SubscriptionsSaveError
combo/apps/notifications/api_views.py
15 15
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
16 16

  
17 17
from django.utils.encoding import force_text
18

  
19
from rest_framework import authentication, serializers, permissions, status
18
from rest_framework import authentication, permissions, serializers, status
20 19
from rest_framework.generics import GenericAPIView
21 20
from rest_framework.response import Response
22 21

  
combo/apps/notifications/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
5 4
from django.conf import settings
5
from django.db import migrations, models
6 6

  
7 7

  
8 8
class Migration(migrations.Migration):
combo/apps/notifications/migrations/0002_notificationscell_last_update_timestamp.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import migrations, models
5 4
import datetime
5

  
6
from django.db import migrations, models
6 7
from django.utils.timezone import utc
7 8

  
8 9

  
combo/apps/notifications/models.py
18 18

  
19 19
from django.conf import settings
20 20
from django.db import models
21
from django.utils.encoding import force_text, python_2_unicode_compatible
22
from django.utils.translation import ugettext_lazy as _
23
from django.utils.timezone import now, timedelta
24 21
from django.db.models import Q
25 22
from django.db.models.query import QuerySet
26

  
27
from combo.data.models import CellBase
28
from combo.data.library import register_cell_class
23
from django.utils.encoding import force_text, python_2_unicode_compatible
24
from django.utils.timezone import now, timedelta
25
from django.utils.translation import ugettext_lazy as _
29 26

  
30 27
from combo.apps.pwa.models import PwaSettings
28
from combo.data.library import register_cell_class
29
from combo.data.models import CellBase
31 30

  
32 31

  
33 32
class NotificationQuerySet(QuerySet):
combo/apps/notifications/urls.py
16 16

  
17 17
from django.conf.urls import url
18 18

  
19
from .api_views import add, ack, forget, count
19
from .api_views import ack, add, count, forget
20 20

  
21 21
urlpatterns = [
22 22
    url('^api/notification/add/$', add, name='api-notification-add'),
combo/apps/pwa/manager_views.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.urls import reverse_lazy
18
from django.db.models import Max
19 17
from django import forms
18
from django.db.models import Max
20 19
from django.http import JsonResponse
20
from django.urls import reverse_lazy
21 21
from django.utils.translation import ugettext_lazy as _
22
from django.views.generic import CreateView, UpdateView, DeleteView
22
from django.views.generic import CreateView, DeleteView, UpdateView
23 23

  
24 24
from combo.data.forms import get_page_choices
25 25

  
26
from .models import PwaSettings, PwaNavigationEntry
27 26
from .forms import PwaSettingsForm
27
from .models import PwaNavigationEntry, PwaSettings
28 28

  
29 29

  
30 30
class ManagerHomeView(UpdateView):
combo/apps/pwa/migrations/0001_initial.py
2 2
# Generated by Django 1.11.12 on 2018-11-29 09:45
3 3
from __future__ import unicode_literals
4 4

  
5
from django.conf import settings
6
from django.db import migrations, models
7 5
import django.db.models.deletion
8 6
import jsonfield.fields
7
from django.conf import settings
8
from django.db import migrations, models
9 9

  
10 10

  
11 11
class Migration(migrations.Migration):
combo/apps/pwa/migrations/0002_pwasettings.py
2 2
# Generated by Django 1.11.12 on 2018-12-27 08:44
3 3
from __future__ import unicode_literals
4 4

  
5
import combo.data.fields
6 5
from django.db import migrations, models
7 6

  
7
import combo.data.fields
8

  
8 9

  
9 10
class Migration(migrations.Migration):
10 11

  
combo/apps/pwa/migrations/0003_pwanavigationentry.py
2 2
# Generated by Django 1.11.12 on 2018-12-27 14:27
3 3
from __future__ import unicode_literals
4 4

  
5
from django.db import migrations, models
6 5
import django.db.models.deletion
6
from django.db import migrations, models
7 7

  
8 8

  
9 9
class Migration(migrations.Migration):
combo/apps/pwa/migrations/0006_auto_20190628_1042.py
2 2
# Generated by Django 1.11.12 on 2019-06-28 08:42
3 3
from __future__ import unicode_literals
4 4

  
5
from django.db import migrations, models
6 5
import jsonfield.fields
6
from django.db import migrations, models
7 7

  
8 8

  
9 9
class Migration(migrations.Migration):
combo/apps/pwa/models.py
25 25
from django.core.files.storage import default_storage
26 26
from django.db import models
27 27
from django.utils import six
28
from django.utils.encoding import force_text, force_bytes
28
from django.utils.encoding import force_bytes, force_text
29 29
from django.utils.six import BytesIO
30 30
from django.utils.translation import ugettext_lazy as _
31

  
31
from jsonfield import JSONField
32 32
from py_vapid import Vapid
33 33

  
34
from jsonfield import JSONField
35
from combo.data.fields import RichTextField
36 34
from combo import utils
35
from combo.data.fields import RichTextField
37 36

  
38 37

  
39 38
class PwaSettings(models.Model):
combo/apps/pwa/signals.py
17 17
import json
18 18
import logging
19 19

  
20
import pywebpush
20 21
from django.conf import settings
21 22
from django.db.models.signals import post_save
22 23
from django.dispatch import receiver
23

  
24 24
from py_vapid import Vapid
25
import pywebpush
26 25

  
27 26
from combo.apps.notifications.models import Notification
28 27

  
combo/apps/pwa/templatetags/pwa.py
19 19

  
20 20
from combo.apps.pwa.models import PwaNavigationEntry
21 21

  
22

  
23 22
register = template.Library()
24 23

  
25 24

  
combo/apps/pwa/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 url, include
17
from django.conf.urls import include, url
18 18

  
19 19
from combo.urls_utils import decorated_includes, manager_required
20 20

  
21 21
from .manager_views import (
22
    ManagerHomeView,
23 22
    ManagerAddNavigationEntry,
24
    ManagerEditNavigationEntry,
25 23
    ManagerDeleteNavigationEntry,
24
    ManagerEditNavigationEntry,
25
    ManagerHomeView,
26 26
    manager_navigation_order,
27 27
)
28 28
from .views import (
29 29
    manifest_json,
30
    offline_page,
30 31
    service_worker_js,
31 32
    service_worker_registration_js,
32 33
    subscribe_push,
33
    offline_page,
34 34
)
35 35

  
36

  
37 36
pwa_manager_urls = [
38 37
    url('^$', ManagerHomeView.as_view(), name='pwa-manager-homepage'),
39 38
    url('^navigation/add/$', ManagerAddNavigationEntry.as_view(), name='pwa-manager-navigation-add'),
combo/apps/pwa/views.py
17 17
import base64
18 18
import json
19 19

  
20
from cryptography.hazmat.primitives import serialization
20 21
from django.conf import settings
21

  
22
from django.http import HttpResponse, HttpResponseForbidden, Http404, JsonResponse, HttpResponseBadRequest
23
from django.template.loader import get_template, TemplateDoesNotExist
24
from django.utils.encoding import force_text, force_bytes
22
from django.http import Http404, HttpResponse, HttpResponseBadRequest, HttpResponseForbidden, JsonResponse
23
from django.template.loader import TemplateDoesNotExist, get_template
24
from django.utils.encoding import force_bytes, force_text
25 25
from django.views.decorators.csrf import csrf_exempt
26 26
from django.views.generic import TemplateView
27

  
28
from cryptography.hazmat.primitives import serialization
29 27
from py_vapid import Vapid
30 28

  
31
from .models import PushSubscription, PwaSettings
32 29
from combo import VERSION
33 30

  
31
from .models import PushSubscription, PwaSettings
32

  
34 33

  
35 34
def manifest_json(request, *args, **kwargs):
36 35
    try:
combo/apps/search/forms.py
18 18
from django.utils.translation import ugettext_lazy as _
19 19

  
20 20
from combo.data.models import Page
21
from .models import SearchCell
21

  
22 22
from . import engines
23
from .models import SearchCell
23 24

  
24 25

  
25 26
class SearchCellForm(forms.ModelForm):
combo/apps/search/manager_views.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.http import HttpResponse
18
from django.http import HttpResponseRedirect
19
from django.shortcuts import get_object_or_404
20
from django.shortcuts import render
17
from django.http import HttpResponse, HttpResponseRedirect
18
from django.shortcuts import get_object_or_404, render
21 19
from django.urls import reverse
22 20
from django.utils.translation import ugettext_lazy as _
23 21

  
24
from combo.apps.search.forms import TextEngineSettingsForm, CardsEngineSettingsForm
22
from combo.apps.search.forms import CardsEngineSettingsForm, TextEngineSettingsForm
25 23
from combo.apps.search.models import SearchCell
26 24
from combo.data.models import PageSnapshot
27 25

  
combo/apps/search/migrations/0002_auto_20180720_1511.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import migrations
5 4
import jsonfield.fields
5
from django.db import migrations
6 6

  
7 7

  
8 8
class Migration(migrations.Migration):
combo/apps/search/migrations/0006_indexedcell.py
2 2
# Generated by Django 1.11.17 on 2020-01-20 15:30
3 3
from __future__ import unicode_literals
4 4

  
5
from django.db import migrations, models
6 5
import django.db.models.deletion
6
from django.db import migrations, models
7 7

  
8 8

  
9 9
class Migration(migrations.Migration):
combo/apps/search/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 import template
17 18
from django.contrib.auth.models import Group
18 19
from django.contrib.contenttypes import fields
19 20
from django.contrib.contenttypes.models import ContentType
21
from django.core.exceptions import PermissionDenied
20 22
from django.db import models
21
from django.utils.translation import ugettext_lazy as _
22
from django import template
23 23
from django.http import HttpResponse
24
from django.core.exceptions import PermissionDenied
25
from django.utils.functional import cached_property
26
from django.utils.http import quote
27 24
from django.shortcuts import get_object_or_404
28 25
from django.template import RequestContext, Template
29

  
26
from django.utils.functional import cached_property
27
from django.utils.http import quote
28
from django.utils.translation import ugettext_lazy as _
30 29
from jsonfield import JSONField
31 30

  
32
from combo.utils import requests
33
from combo.data.models import CellBase, Page
34 31
from combo.data.library import register_cell_class
35
from combo.utils import get_templated_url
32
from combo.data.models import CellBase, Page
33
from combo.utils import get_templated_url, requests
36 34

  
37 35
from . import engines
38 36

  
combo/apps/search/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 url, include
17
from django.conf.urls import include, url
18 18

  
19 19
from combo.urls_utils import decorated_includes, manager_required
20
from .models import SearchCell
20

  
21 21
from . import manager_views
22
from .models import SearchCell
22 23

  
23 24
search_manager_urls = [
24 25
    url(
combo/apps/search/utils.py
18 18
from django.contrib.contenttypes.models import ContentType
19 19
from django.contrib.postgres.search import SearchQuery, SearchRank, SearchVector
20 20
from django.db import connection
21
from django.db.models import Q, Prefetch
21
from django.db.models import Prefetch, Q
22 22
from django.db.transaction import atomic
23 23

  
24
from combo.data.models import Page, CellBase, ValidityInfo
24
from combo.data.models import CellBase, Page, ValidityInfo
25

  
25 26
from .models import IndexedCell
26 27

  
27 28

  
combo/apps/wcs/__init__.py
20 20
from django.conf import settings
21 21
from django.urls import reverse
22 22
from django.utils.encoding import force_bytes
23
from django.utils.translation import ugettext_lazy as _, pgettext_lazy
23
from django.utils.translation import pgettext_lazy
24
from django.utils.translation import ugettext_lazy as _
24 25

  
25 26

  
26 27
class AppConfig(django.apps.AppConfig):
......
46 47

  
47 48
    def get_card_search_engines(self, wcs_services):
48 49
        from combo.data.models import Page
50

  
49 51
        from .utils import get_wcs_json
50 52

  
51 53
        pages_with_sub_slug = Page.objects.exclude(sub_slug='')
......
125 127

  
126 128
    def update_db_cache(self):
127 129
        from combo.data.models import CellBase
130

  
128 131
        from .models import (
129
            WcsFormCell,
132
            WcsCardInfosCell,
133
            WcsCardsCell,
130 134
            WcsCategoryCell,
135
            WcsFormCell,
131 136
            WcsFormsOfCategoryCell,
132
            WcsCardsCell,
133
            WcsCardInfosCell,
134 137
        )
135 138

  
136 139
        models_to_update = [
combo/apps/wcs/forms.py
21 21
from combo.utils.forms import MultiSortWidget
22 22

  
23 23
from .models import (
24
    WcsFormCell,
24
    WcsCardInfosCell,
25
    WcsCardsCell,
25 26
    WcsCategoryCell,
26
    WcsFormsOfCategoryCell,
27
    WcsCurrentFormsCell,
28 27
    WcsCurrentDraftsCell,
29
    WcsCardsCell,
30
    WcsCardInfosCell,
28
    WcsCurrentFormsCell,
29
    WcsFormCell,
30
    WcsFormsOfCategoryCell,
31 31
)
32 32
from .utils import get_wcs_options, get_wcs_services
33 33

  
combo/apps/wcs/migrations/0001_initial.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
4
from django.db import migrations, models
5

  
5 6
import combo.apps.wcs.models
6 7

  
7 8

  
combo/apps/wcs/migrations/0002_auto_20150217_1402.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
4
from django.db import migrations, models
5 5

  
6 6

  
7 7
class Migration(migrations.Migration):
combo/apps/wcs/migrations/0003_auto_20150218_1151.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
4
from django.db import migrations, models
5 5

  
6 6

  
7 7
class Migration(migrations.Migration):
combo/apps/wcs/migrations/0004_auto_20150218_1154.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
4
from django.db import migrations, models
5 5

  
6 6

  
7 7
class Migration(migrations.Migration):
combo/apps/wcs/migrations/0005_auto_20150401_0758.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
4
from django.db import migrations, models
5 5

  
6 6

  
7 7
class Migration(migrations.Migration):
combo/apps/wcs/migrations/0006_categoriescell.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
4
from django.db import migrations, models
5

  
5 6
import combo.apps.wcs.models
6 7

  
7 8

  
combo/apps/wcs/migrations/0007_trackingcodeinputcell.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
4
from django.db import migrations, models
5 5

  
6 6

  
7 7
class Migration(migrations.Migration):
combo/apps/wcs/migrations/0008_wcsformcell_cached_json.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
5 4
import jsonfield.fields
5
from django.db import migrations, models
6 6

  
7 7

  
8 8
class Migration(migrations.Migration):
combo/apps/wcs/migrations/0009_remove_wcscategorycell_link_page.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
4
from django.db import migrations, models
5 5

  
6 6

  
7 7
class Migration(migrations.Migration):
combo/apps/wcs/migrations/0010_auto_20151029_1535.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
4
from django.db import migrations, models
5 5

  
6 6

  
7 7
class Migration(migrations.Migration):
combo/apps/wcs/migrations/0011_auto_20151215_1121.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
4
from django.db import migrations, models
5 5

  
6 6

  
7 7
class Migration(migrations.Migration):
combo/apps/wcs/migrations/0012_wcsformsofcategorycell_manual_order.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
5 4
import jsonfield.fields
5
from django.db import migrations, models
6 6

  
7 7

  
8 8
class Migration(migrations.Migration):
combo/apps/wcs/migrations/0014_auto_20170214_2006.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import migrations, models
5 4
import datetime
5

  
6
from django.db import migrations, models
6 7
from django.utils.timezone import utc
7 8

  
8 9

  
combo/apps/wcs/migrations/0015_wcscurrentformscell_categories.py
2 2
# Generated by Django 1.11.8 on 2018-01-21 12:50
3 3
from __future__ import unicode_literals
4 4

  
5
from django.db import migrations
6 5
import jsonfield.fields
6
from django.db import migrations
7 7

  
8 8

  
9 9
class Migration(migrations.Migration):
combo/apps/wcs/migrations/0016_backofficesubmissioncell.py
2 2
# Generated by Django 1.11.12 on 2018-08-10 08:05
3 3
from __future__ import unicode_literals
4 4

  
5
import combo.apps.wcs.models
6
from django.db import migrations, models
7 5
import django.db.models.deletion
6
from django.db import migrations, models
7

  
8
import combo.apps.wcs.models
8 9

  
9 10

  
10 11
class Migration(migrations.Migration):
combo/apps/wcs/migrations/0017_wcscareformscell.py
2 2
# Generated by Django 1.11.18 on 2019-10-18 13:48
3 3
from __future__ import unicode_literals
4 4

  
5
import combo.apps.wcs.models
6
from django.db import migrations, models
7 5
import django.db.models.deletion
6
from django.db import migrations, models
7

  
8
import combo.apps.wcs.models
8 9

  
9 10

  
10 11
class Migration(migrations.Migration):
combo/apps/wcs/migrations/0018_wcscurrentdraftscell_categories.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import migrations
5 4
import jsonfield.fields
5
from django.db import migrations
6 6

  
7 7

  
8 8
class Migration(migrations.Migration):
combo/apps/wcs/migrations/0020_cards.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
import combo.apps.wcs.models
5
from django.db import migrations, models
6 4
import django.db.models.deletion
5
from django.db import migrations, models
6

  
7
import combo.apps.wcs.models
7 8

  
8 9

  
9 10
class Migration(migrations.Migration):
combo/apps/wcs/migrations/0021_card.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
import combo.apps.wcs.models
5
from django.db import migrations, models
6 4
import django.db.models.deletion
7 5
import jsonfield.fields
6
from django.db import migrations, models
7

  
8
import combo.apps.wcs.models
8 9

  
9 10

  
10 11
class Migration(migrations.Migration):
combo/apps/wcs/migrations/0025_submission_categories.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import migrations
5 4
import jsonfield.fields
5
from django.db import migrations
6 6

  
7 7

  
8 8
class Migration(migrations.Migration):
combo/apps/wcs/models.py
21 21

  
22 22
from django.conf import settings
23 23
from django.db import models
24
from django.forms import models as model_forms
25 24
from django.forms import Select
25
from django.forms import models as model_forms
26 26
from django.utils.text import slugify
27 27
from django.utils.translation import ugettext_lazy as _
28

  
29 28
from jsonfield import JSONField
30 29
from requests.exceptions import RequestException
31 30

  
32
from combo.data.models import CellBase, Page
33
from combo.data.library import register_cell_class
34 31
from combo import utils
32
from combo.data.library import register_cell_class
33
from combo.data.models import CellBase, Page
35 34
from combo.utils import requests
36 35

  
37
from .utils import get_wcs_json, is_wcs_enabled, get_wcs_services
38

  
36
from .utils import get_wcs_json, get_wcs_services, is_wcs_enabled
39 37

  
40 38
invalid_reason_codes = {
41 39
    'wcs_form_not_defined': _('No form set'),
combo/apps/wcs/templatetags/wcs.py
16 16

  
17 17
from django import template
18 18

  
19

  
20 19
register = template.Library()
21 20

  
22 21

  
combo/apps/wcs/utils.py
17 17
import json
18 18

  
19 19
from django.conf import settings
20

  
21 20
from requests.exceptions import RequestException
22 21

  
23 22
from combo.utils import requests
combo/apps/wcs/views.py
16 16

  
17 17
import re
18 18

  
19
from django.contrib import messages
19
import ratelimit.utils
20 20
from django.conf import settings
21
from django.contrib import messages
21 22
from django.core.exceptions import DisallowedRedirect, PermissionDenied
23
from django.http import HttpResponseBadRequest, HttpResponseRedirect, JsonResponse
22 24
from django.urls import reverse
23
from django.http import JsonResponse, HttpResponseRedirect, HttpResponseBadRequest
24 25
from django.utils.http import urlquote
25 26
from django.utils.six.moves.urllib import parse as urlparse
26 27
from django.utils.translation import ugettext_lazy as _
27 28
from django.views.decorators.csrf import csrf_exempt
28 29
from django.views.generic import View
29 30

  
30
import ratelimit.utils
31
from combo.utils import requests
32
from combo.utils.misc import is_url_from_known_service
31 33

  
32 34
from .models import TrackingCodeInputCell
33 35
from .utils import get_wcs_services
34 36

  
35
from combo.utils import requests
36
from combo.utils.misc import is_url_from_known_service
37

  
38 37

  
39 38
class TrackingCodeView(View):
40 39
    http_method_names = ['post']
combo/context_processors.py
17 17

  
18 18
from django.conf import settings
19 19

  
20
from combo.utils.cache import cache_during_request
21 20
from combo.apps.pwa.models import PwaSettings
21
from combo.utils.cache import cache_during_request
22 22

  
23 23

  
24 24
def template_vars(request):
combo/data/fields.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 ckeditor.fields
19 20
from django import forms
20 21
from django.conf import settings
21 22
from django.core import validators
22 23
from django.forms.widgets import TextInput
23 24
from django.utils.encoding import force_text
24 25

  
25
import ckeditor.fields
26

  
27 26

  
28 27
class RichTextField(ckeditor.fields.RichTextField):
29 28
    def formfield(self, **kwargs):
combo/data/forms.py
18 18

  
19 19
from django import forms
20 20

  
21
from .models import Page, MenuCell, LinkCell, LinkListCell, ConfigJsonCell
22 21
from combo.utils import cache_during_request
23 22

  
23
from .models import ConfigJsonCell, LinkCell, LinkListCell, MenuCell, Page
24

  
24 25

  
25 26
@cache_during_request
26 27
def get_page_choices():
combo/data/management/commands/import_site.py
20 20

  
21 21
from django.core.management.base import BaseCommand, CommandError
22 22

  
23
from combo.data.utils import import_site, import_site_tar, ImportSiteError
23
from combo.data.utils import ImportSiteError, import_site, import_site_tar
24 24

  
25 25

  
26 26
class Command(BaseCommand):
combo/data/migrations/0001_initial.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
5 4
import ckeditor.fields
5
from django.db import migrations, models
6 6

  
7 7

  
8 8
class Migration(migrations.Migration):
combo/data/migrations/0002_auto_20150217_1327.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
4
from django.db import migrations, models
5 5

  
6 6

  
7 7
class Migration(migrations.Migration):
combo/data/migrations/0003_menucell.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
4
from django.db import migrations, models
5 5

  
6 6

  
7 7
class Migration(migrations.Migration):
combo/data/migrations/0004_menucell_depth.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
4
from django.db import migrations, models
5 5

  
6 6

  
7 7
class Migration(migrations.Migration):
combo/data/migrations/0005_auto_20150226_0903.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
5 4
import ckeditor.fields
5
from django.db import migrations, models
6 6

  
7 7

  
8 8
class Migration(migrations.Migration):
combo/data/migrations/0006_linkcell.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
4
from django.db import migrations, models
5 5

  
6 6

  
7 7
class Migration(migrations.Migration):
combo/data/migrations/0007_auto_20150529_1003.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
4
from django.db import migrations, models
5 5

  
6 6

  
7 7
class Migration(migrations.Migration):
combo/data/migrations/0008_auto_20150529_1504.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
4
from django.db import migrations, models
5 5

  
6 6

  
7 7
class Migration(migrations.Migration):
combo/data/migrations/0009_auto_20150529_2247.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
4
from django.db import migrations, models
5 5

  
6 6

  
7 7
class Migration(migrations.Migration):
combo/data/migrations/0010_feedcell.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
4
from django.db import migrations, models
5 5

  
6 6

  
7 7
class Migration(migrations.Migration):
combo/data/migrations/0011_auto_20151028_1047.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
4
from django.db import migrations, models
5 5

  
6 6

  
7 7
class Migration(migrations.Migration):
combo/data/migrations/0012_auto_20151029_1535.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
4
from django.db import migrations, models
5 5

  
6 6

  
7 7
class Migration(migrations.Migration):
combo/data/migrations/0013_parameterscell.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
5 4
import jsonfield.fields
5
from django.db import migrations, models
6 6

  
7 7

  
8 8
class Migration(migrations.Migration):
combo/data/migrations/0014_menucell_initial_level.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
4
from django.db import migrations, models
5 5

  
6 6

  
7 7
class Migration(migrations.Migration):
combo/data/migrations/0015_feedcell_title.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import models, migrations
4
from django.db import migrations, models
5 5

  
6 6

  
7 7
class Migration(migrations.Migration):
combo/data/migrations/0021_jsoncell.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
import combo.data.models
5 4
from django.db import migrations, models
6 5

  
6
import combo.data.models
7

  
7 8

  
8 9
class Migration(migrations.Migration):
9 10

  
combo/data/migrations/0022_auto_20170214_2006.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import migrations, models
5 4
import datetime
5

  
6
from django.db import migrations, models
6 7
from django.utils.timezone import utc
7 8

  
8 9

  
combo/data/migrations/0024_configjsoncell.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import migrations, models
5 4
import jsonfield.fields
5
from django.db import migrations, models
6 6

  
7 7

  
8 8
class Migration(migrations.Migration):
combo/data/migrations/0025_jsoncell_varnames_str.py
2 2
from __future__ import unicode_literals
3 3

  
4 4
from django.db import migrations, models
5

  
5 6
import combo.data.fields
6 7

  
7 8

  
combo/data/migrations/0029_auto_20171022_1242.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
import combo.data.models
5 4
from django.db import migrations, models
6 5

  
6
import combo.data.models
7

  
7 8

  
8 9
class Migration(migrations.Migration):
9 10

  
combo/data/migrations/0033_auto_20180401_1300.py
2 2
# Generated by Django 1.11.8 on 2018-04-01 13:00
3 3
from __future__ import unicode_literals
4 4

  
5
from django.conf import settings
6
from django.db import migrations, models
7 5
import django.db.models.deletion
8 6
import jsonfield.fields
7
from django.conf import settings
8
from django.db import migrations, models
9 9

  
10 10

  
11 11
class Migration(migrations.Migration):
combo/data/migrations/0034_redirect.py
2 2
# Generated by Django 1.11.12 on 2018-07-13 06:40
3 3
from __future__ import unicode_literals
4 4

  
5
from django.db import migrations, models
6 5
import django.db.models.deletion
6
from django.db import migrations, models
7 7

  
8 8

  
9 9
class Migration(migrations.Migration):
combo/data/migrations/0035_page_related_cells.py
2 2
# Generated by Django 1.11.12 on 2018-06-02 11:03
3 3
from __future__ import unicode_literals
4 4

  
5
from django.db import migrations
6 5
import jsonfield.fields
6
from django.db import migrations
7 7

  
8 8

  
9 9
class Migration(migrations.Migration):
combo/data/migrations/0039_link_list_cell.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import migrations, models
5 4
import django.db.models.deletion
5
from django.db import migrations, models
6 6

  
7 7

  
8 8
class Migration(migrations.Migration):
combo/data/migrations/0042_page_creation_timestamp.py
2 2
# Generated by Django 1.11.18 on 2020-01-31 15:40
3 3
from __future__ import unicode_literals
4 4

  
5
from django.db import migrations, models
6 5
import django.utils.timezone
6
from django.db import migrations, models
7 7

  
8 8

  
9 9
class Migration(migrations.Migration):
combo/data/migrations/0044_validity_info.py
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3

  
4
from django.db import migrations, models
5 4
import django.db.models.deletion
5
from django.db import migrations, models
6 6

  
7 7

  
8 8
class Migration(migrations.Migration):
combo/data/models.py
17 17
import collections
18 18
import copy
19 19
import datetime
20
import feedparser
21 20
import hashlib
22 21
import html
23 22
import json
24 23
import logging
25 24
import os
26 25
import re
27
import requests
28 26
import subprocess
29 27

  
28
import feedparser
29
import requests
30
from django import forms, template
30 31
from django.apps import apps
31 32
from django.conf import settings
32 33
from django.contrib import messages
33 34
from django.contrib.auth.models import Group
34
from django.contrib.contenttypes.fields import GenericForeignKey
35
from django.contrib.contenttypes.fields import GenericRelation
35
from django.contrib.contenttypes.fields import GenericForeignKey, GenericRelation
36 36
from django.contrib.contenttypes.models import ContentType
37
from django.core.cache import cache
38
from django.core.exceptions import ObjectDoesNotExist, ValidationError, PermissionDenied
39 37
from django.core import serializers
38
from django.core.cache import cache
39
from django.core.exceptions import ObjectDoesNotExist, PermissionDenied, ValidationError
40 40
from django.db import models, transaction
41
from django.db.models.base import ModelBase
42
from django.db.models.signals import pre_save, post_save, post_delete
43 41
from django.db.models import Max, Q
42
from django.db.models.base import ModelBase
43
from django.db.models.signals import post_delete, post_save, pre_save
44 44
from django.dispatch import receiver
45 45
from django.forms import models as model_forms
46
from django import forms
47
from django import template
46
from django.forms.widgets import MediaDefiningClass
47
from django.template import Context, TemplateDoesNotExist, TemplateSyntaxError, engines
48
from django.test.client import RequestFactory
48 49
from django.utils import six, timezone
49
from django.utils.encoding import python_2_unicode_compatible, force_text, smart_bytes
50
from django.utils.encoding import force_text, python_2_unicode_compatible, smart_bytes
50 51
from django.utils.html import strip_tags
51 52
from django.utils.safestring import mark_safe
52 53
from django.utils.six.moves.urllib import parse as urlparse
53 54
from django.utils.text import slugify
54 55
from django.utils.timezone import now
55 56
from django.utils.translation import ugettext_lazy as _
56
from django.forms.widgets import MediaDefiningClass
57
from django.template import Context, engines, TemplateDoesNotExist, TemplateSyntaxError
58
from django.test.client import RequestFactory
59

  
60
from .fields import RichTextField, TemplatableURLField
61

  
62 57
from jsonfield import JSONField
63 58

  
64
from .library import register_cell_class, get_cell_classes, get_cell_class
65

  
66 59
from combo import utils
67 60
from combo.utils import NothingInCacheException
68 61

  
62
from .fields import RichTextField, TemplatableURLField
63
from .library import get_cell_class, get_cell_classes, register_cell_class
64

  
69 65

  
70 66
class PostException(Exception):
71 67
    pass
combo/data/utils.py
26 26
from django.utils.translation import ugettext_lazy as _
27 27

  
28 28
from combo.apps.assets.models import Asset
29
from combo.apps.assets.utils import add_tar_content
30
from combo.apps.assets.utils import clean_assets_files
31
from combo.apps.assets.utils import untar_assets_files
32
from combo.apps.assets.utils import tar_assets_files
29
from combo.apps.assets.utils import add_tar_content, clean_assets_files, tar_assets_files, untar_assets_files
33 30
from combo.apps.maps.models import MapLayer
34
from combo.apps.pwa.models import PwaSettings, PwaNavigationEntry
31
from combo.apps.pwa.models import PwaNavigationEntry, PwaSettings
32

  
35 33
from .models import Page
36 34

  
37 35

  
combo/manager/fields.py
17 17
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
18 18

  
19 19

  
20
from django.core import validators
21 20
from django import forms
21
from django.core import validators
22 22

  
23 23

  
24 24
def get_available_image_extensions():
combo/manager/forms.py
20 20
from django.conf import settings
21 21
from django.contrib.auth.models import Group
22 22
from django.core.exceptions import ValidationError
23
from django.template.loader import get_template, TemplateDoesNotExist
23
from django.template.loader import TemplateDoesNotExist, get_template
24 24
from django.utils.translation import ugettext_lazy as _
25 25

  
26
from combo.data.models import Page
27
from combo.data.models import ParentContentCell
28
from combo.data.models import compile_sub_slug
26
from combo.data.models import Page, ParentContentCell, compile_sub_slug
29 27

  
30 28
from .fields import ImageIncludingSvgField
31 29

  
combo/manager/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 url, include
17
import ckeditor.views as ckeditor_views
18
from django.conf.urls import include, url
18 19
from django.contrib.admin.views.decorators import staff_member_required
19 20
from django.views.decorators.cache import never_cache
20 21

  
21
import ckeditor.views as ckeditor_views
22

  
23 22
from combo.apps.assets import views as assets_views
23

  
24 24
from .. import plugins
25 25
from . import views
26 26

  
combo/manager/views.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 hashlib
18 17
import datetime
18
import hashlib
19 19
import json
20
from operator import attrgetter
21 20
import tarfile
21
from operator import attrgetter
22 22

  
23 23
from django.conf import settings
24 24
from django.contrib import messages
25 25
from django.core.exceptions import ObjectDoesNotExist, PermissionDenied
26
from django.http import Http404, HttpResponse, HttpResponseRedirect
27
from django.shortcuts import get_object_or_404, redirect, render
26 28
from django.urls import reverse, reverse_lazy
27
from django.http import HttpResponse, HttpResponseRedirect, Http404
28
from django.shortcuts import redirect
29
from django.shortcuts import render
30
from django.shortcuts import get_object_or_404
31
from django.utils.translation import ugettext_lazy as _
32
from django.utils.encoding import force_text, force_bytes
29
from django.utils.encoding import force_bytes, force_text
33 30
from django.utils.formats import date_format
34 31
from django.utils.six import BytesIO
35 32
from django.utils.timezone import localtime
33
from django.utils.translation import ugettext_lazy as _
36 34
from django.views.decorators.csrf import requires_csrf_token
37 35
from django.views.generic import (
38
    RedirectView,
39
    DetailView,
40 36
    CreateView,
41
    UpdateView,
42
    ListView,
43 37
    DeleteView,
38
    DetailView,
44 39
    FormView,
40
    ListView,
41
    RedirectView,
42
    UpdateView,
45 43
)
46 44

  
47
from combo.data.models import Page, CellBase, ParentContentCell, PageSnapshot, LinkListCell
48
from combo.data.library import get_cell_class
49
from combo.data.utils import export_site, export_site_tar, import_site, import_site_tar, ImportSiteError
50 45
from combo import plugins
46
from combo.data.library import get_cell_class
47
from combo.data.models import CellBase, LinkListCell, Page, PageSnapshot, ParentContentCell
48
from combo.data.utils import ImportSiteError, export_site, export_site_tar, import_site, import_site_tar
51 49

  
52 50
from .forms import (
51
    CellVisibilityForm,
53 52
    PageAddForm,
54
    PageEditTitleForm,
55
    PageVisibilityForm,
56
    SiteImportForm,
57
    SiteExportForm,
53
    PageDuplicateForm,
54
    PageEditDescriptionForm,
55
    PageEditIncludeInNavigationForm,
56
    PageEditPictureForm,
58 57
    PageEditRedirectionForm,
59
    PageSelectTemplateForm,
60 58
    PageEditSlugForm,
61
    PageEditPictureForm,
62
    PageEditIncludeInNavigationForm,
63
    PageEditDescriptionForm,
64
    CellVisibilityForm,
65
    PageDuplicateForm,
59
    PageEditTitleForm,
66 60
    PageExportForm,
61
    PageSelectTemplateForm,
62
    PageVisibilityForm,
63
    SiteExportForm,
64
    SiteImportForm,
67 65
)
68 66

  
69 67

  
combo/middleware.py
18 18

  
19 19
from django.utils.deprecation import MiddlewareMixin
20 20

  
21

  
22 21
_requests = {}
23 22

  
24 23

  
combo/monkeypatch.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.urls import reverse
17
import ckeditor.views
18
import ckeditor.widgets
19
from ckeditor.image import pillow_backend
18 20
from django.forms.utils import flatatt
19 21
from django.template.loader import render_to_string
22
from django.urls import reverse
20 23
from django.utils.encoding import force_text
21 24
from django.utils.html import conditional_escape
22 25
from django.utils.safestring import mark_safe
23 26
from django.utils.translation import get_language
24 27

  
25
import ckeditor.views
26
import ckeditor.widgets
27
from ckeditor.image import pillow_backend
28

  
29 28

  
30 29
def ckeditor_render(self, name, value, attrs=None, renderer=None):
31 30
    if value is None:
combo/plugins.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 functools import wraps
18 17
import logging
18
from functools import wraps
19 19

  
20 20
from django.apps import apps
21 21
from django.conf.urls import include, url
combo/profile/__init__.py
44 44
        get_user_model().add_to_class('get_name_id', user_get_name_id)
45 45

  
46 46
    def get_search_engines(self):
47
        from combo.data.models import Page
48 47
        from django.conf import settings
49 48

  
49
        from combo.data.models import Page
50

  
50 51
        user_page = Page.objects.filter(sub_slug='name_id').first()
51 52
        if not user_page:
52 53
            user_page = Page.objects.filter(sub_slug__contains='<name_id>').first()
combo/profile/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
5 4
from django.conf import settings
5
from django.db import migrations, models
6 6

  
7 7

  
8 8
class Migration(migrations.Migration):
combo/profile/migrations/0002_profilecell.py
2 2
# Generated by Django 1.11.12 on 2018-08-10 13:52
3 3
from __future__ import unicode_literals
4 4

  
5
from django.db import migrations, models
6 5
import django.db.models.deletion
6
from django.db import migrations, models
7 7

  
8 8

  
9 9
class Migration(migrations.Migration):
combo/profile/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 collections import OrderedDict
18 17
import copy
18
from collections import OrderedDict
19 19

  
20 20
from django.conf import settings
21 21
from django.db import models
22 22
from django.utils.dateparse import parse_date
23 23
from django.utils.translation import ugettext_lazy as _
24 24

  
25
from combo.data.models import JsonCellBase
26 25
from combo.data.library import register_cell_class
26
from combo.data.models import JsonCellBase
27 27

  
28 28

  
29 29
class Profile(models.Model):
combo/public/admin.py
15 15
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
16 16

  
17 17
from django.contrib import admin
18
from django.urls import reverse
19 18
from django.shortcuts import redirect
19
from django.urls import reverse
20 20
from django.urls.exceptions import NoReverseMatch
21 21
from django.views.decorators.cache import never_cache
22 22

  
combo/public/templatetags/combo.py
17 17
from __future__ import absolute_import
18 18

  
19 19
import datetime
20
from decimal import Decimal
21
from decimal import InvalidOperation as DecimalInvalidOperation
22
from decimal import DivisionByZero as DecimalDivisionByZero
23 20
import json
24 21
import math
25 22
import time
23
from decimal import Decimal
24
from decimal import DivisionByZero as DecimalDivisionByZero
25
from decimal import InvalidOperation as DecimalInvalidOperation
26 26

  
27 27
from django import template
28 28
from django.core import signing
......
38 38
    TOKEN_COMMENT = TokenType.COMMENT
39 39
except ImportError:
40 40
    from django.template.base import TOKEN_BLOCK, TOKEN_VAR, TOKEN_COMMENT
41

  
41 42
from django.template import defaultfilters
42 43
from django.template.defaultfilters import stringfilter
43 44
from django.utils import dateparse, six
......
46 47
from django.utils.safestring import mark_safe
47 48
from django.utils.timezone import is_naive, make_aware
48 49

  
50
from combo.apps.dashboard.models import DashboardCell, Tile
49 51
from combo.data.models import Page, Placeholder
50 52
from combo.public.menu import get_menu_context
51 53
from combo.utils import NothingInCacheException, flatten_context
52 54
from combo.utils.date import make_date, make_datetime
53
from combo.apps.dashboard.models import DashboardCell, Tile
54

  
55 55

  
56 56
register = template.Library()
57 57

  
combo/public/urls.py
17 17
from django.conf.urls import url
18 18

  
19 19
from combo.urls_utils import manager_required
20

  
20 21
from . import views
21 22

  
22 23
urlpatterns = [
combo/public/views.py
27 27
from django.core import signing
28 28
from django.core.exceptions import ObjectDoesNotExist, PermissionDenied
29 29
from django.db import transaction
30
from django.forms.widgets import Media
30 31
from django.http import (
31 32
    Http404,
32 33
    HttpResponse,
33
    HttpResponseRedirect,
34
    HttpResponsePermanentRedirect,
35 34
    HttpResponseBadRequest,
35
    HttpResponsePermanentRedirect,
36
    HttpResponseRedirect,
36 37
)
37 38
from django.shortcuts import render, resolve_url
38 39
from django.template import engines
39
from django.template.loader import get_template, TemplateDoesNotExist
40
from django.template.loader import TemplateDoesNotExist, get_template
40 41
from django.utils import lorem_ipsum, timezone
41 42
from django.utils.encoding import force_text
42
from django.utils.six.moves.urllib import parse as urlparse
43 43
from django.utils.six.moves.urllib import parse as urllib
44
from django.utils.six.moves.urllib import parse as urlparse
45
from django.utils.translation import ugettext as _
44 46
from django.views.decorators.csrf import csrf_exempt
45 47
from django.views.defaults import page_not_found
46 48

  
47
from django.utils.translation import ugettext as _
48
from django.forms.widgets import Media
49

  
50 49
if 'mellon' in settings.INSTALLED_APPS:
51 50
    from mellon.utils import get_idps
52 51
else:
53 52
    get_idps = lambda: []
54 53

  
54
from combo import utils
55 55
from combo.apps.assets.models import Asset
56
from combo.apps.search.models import SearchCell
56 57
from combo.data.models import (
57 58
    CellBase,
58
    PostException,
59 59
    Page,
60
    Redirect,
60
    PageSnapshot,
61 61
    ParentContentCell,
62
    PostException,
63
    Redirect,
62 64
    TextCell,
63
    PageSnapshot,
64 65
    extract_context_from_sub_slug,
65 66
)
66 67
from combo.profile.models import Profile
67 68
from combo.profile.utils import get_user_from_name_id
68
from combo.apps.search.models import SearchCell
69
from combo import utils
70 69

  
71 70

  
72 71
class LoginView(auth_views.LoginView):
combo/settings.py
25 25

  
26 26
import copy
27 27
import os
28

  
28 29
from django.conf import global_settings
29 30
from django.utils.translation import ugettext_lazy as _
30 31

  
combo/urls.py
21 21
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
22 22
from django.views.i18n import JavaScriptCatalog
23 23

  
24
from .urls_utils import decorated_includes, manager_required
25

  
26
from .public.views import login, logout, error404, mellon_page_hook
27
from .manager.urls import urlpatterns as combo_manager_urls
28

  
29 24
from . import plugins
25
from .manager.urls import urlpatterns as combo_manager_urls
26
from .public.views import error404, login, logout, mellon_page_hook
27
from .urls_utils import decorated_includes, manager_required
30 28

  
31 29
urlpatterns = [
32 30
    url(r'^manage/', decorated_includes(manager_required, include(combo_manager_urls))),
combo/urls_utils.py
17 17
# Decorating URL includes, <https://djangosnippets.org/snippets/2532/>
18 18

  
19 19
import django
20

  
21 20
from django.contrib.auth.decorators import user_passes_test
22 21
from django.core.exceptions import PermissionDenied
23 22

  
combo/utils/__init__.py
16 16

  
17 17
# import specific symbols for compatibility
18 18
from .cache import cache_during_request
19
from .crypto import aes_hex_decrypt, aes_hex_encrypt, DecryptionError
19
from .crypto import DecryptionError, aes_hex_decrypt, aes_hex_encrypt
20 20
from .misc import ellipsize, flatten_context
21
from .requests_wrapper import requests, NothingInCacheException
21
from .requests_wrapper import NothingInCacheException, requests
22 22
from .signature import check_query, check_request_signature, sign_url
23
from .urls import get_templated_url, TemplateError
23
from .urls import TemplateError, get_templated_url
combo/utils/cache.py
16 16

  
17 17
from combo.middleware import get_request
18 18

  
19

  
19 20
# _make_key and _HashedSeq imported/adapted from functools from Python 3.2+
20 21
def _make_key(
21 22
    args,
combo/utils/crypto.py
16 16

  
17 17
import binascii
18 18

  
19
from Cryptodome import Random
19 20
from Cryptodome.Cipher import AES
20 21
from Cryptodome.Protocol.KDF import PBKDF2
21
from Cryptodome import Random
22

  
23 22
from django.utils import six
24 23
from django.utils.encoding import force_text
25 24

  
combo/utils/misc.py
16 16

  
17 17
import html
18 18

  
19
from django.utils.six.moves.urllib import parse as urlparse
20

  
21 19
from django.conf import settings
22 20
from django.template.context import BaseContext
23 21
from django.utils.html import strip_tags
22
from django.utils.six.moves.urllib import parse as urlparse
24 23

  
25 24

  
26 25
def ellipsize(text, length=50):
combo/utils/requests_wrapper.py
17 17
import hashlib
18 18
import logging
19 19

  
20
from requests import Response, Session as RequestsSession
21
from requests.auth import AuthBase
22

  
23 20
from django.conf import settings
24 21
from django.core.cache import cache
25 22
from django.utils.encoding import smart_bytes
26 23
from django.utils.http import urlencode
27
from django.utils.six.moves.urllib import parse as urlparse
28 24
from django.utils.six import BytesIO
25
from django.utils.six.moves.urllib import parse as urlparse
26
from requests import Response
27
from requests import Session as RequestsSession
28
from requests.auth import AuthBase
29 29

  
30 30
from .signature import sign_url
31 31

  
combo/utils/signature.py
16 16

  
17 17
import base64
18 18
import datetime
19
import hmac
20 19
import hashlib
20
import hmac
21 21
import random
22 22

  
23 23
from django.conf import settings
24
from django.utils import six
24 25
from django.utils.encoding import smart_bytes
25 26
from django.utils.http import quote, urlencode
26
from django.utils import six
27 27
from django.utils.six.moves.urllib import parse as urlparse
28 28

  
29

  
30 29
# Simple signature scheme for query strings
31 30

  
32 31

  
combo/utils/spooler.py
15 15
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
16 16

  
17 17
import contextlib
18
from functools import wraps
19 18
import logging
20 19
import sys
20
from functools import wraps
21 21

  
22 22
from django.db import close_old_connections, connection
23 23

  
combo/utils/urls.py
17 17
import re
18 18

  
19 19
from django.conf import settings
20
from django.utils.encoding import force_text
21 20
from django.template import Context, Template, TemplateSyntaxError, VariableDoesNotExist
21
from django.utils.encoding import force_text
22 22
from django.utils.http import quote
23 23

  
24 24

  
setup.py
7 7
import re
8 8
import subprocess
9 9
import sys
10

  
11
from setuptools.command.install_lib import install_lib as _install_lib
10
from distutils.cmd import Command
12 11
from distutils.command.build import build as _build
13 12
from distutils.command.sdist import sdist
14
from distutils.cmd import Command
15 13
from distutils.spawn import find_executable
16
from setuptools import setup, find_packages
14

  
15
from setuptools import find_packages, setup
16
from setuptools.command.install_lib import install_lib as _install_lib
17 17

  
18 18

  
19 19
class eo_sdist(sdist):
tests/conftest.py
1 1
import os
2 2
import shutil
3 3

  
4
import django_webtest
4 5
import pytest
5

  
6 6
from django.contrib.auth.models import User
7 7
from django.core.files.storage import default_storage
8 8

  
9
import django_webtest
10

  
11 9

  
12 10
@pytest.fixture
13 11
def clean_media():
tests/test_assets.py
4 4
import os
5 5
import tarfile
6 6

  
7
from django.urls import reverse
8
from django.core.files.storage import default_storage
7
import pytest
9 8
from django.core.files import File
9
from django.core.files.storage import default_storage
10
from django.urls import reverse
10 11
from django.utils.six import BytesIO
11 12

  
12
import pytest
13

  
14 13
from combo.apps.assets.models import Asset
15
from combo.apps.assets.utils import add_tar_content
16
from combo.apps.assets.utils import clean_assets_files
17
from combo.apps.assets.utils import export_assets
18
from combo.apps.assets.utils import import_assets
19
from combo.apps.assets.utils import untar_assets_files
20
from combo.apps.assets.utils import tar_assets_files
21

  
14
from combo.apps.assets.utils import (
15
    add_tar_content,
16
    clean_assets_files,
17
    export_assets,
18
    import_assets,
19
    tar_assets_files,
20
    untar_assets_files,
21
)
22 22

  
23 23
pytestmark = pytest.mark.django_db
24 24

  
tests/test_calendar.py
1
import json
2 1
import datetime
2
import json
3 3

  
4
import pytest
5 4
import mock
6

  
5
import pytest
7 6
from django.contrib.auth.models import User
8 7
from django.core.cache import cache
9 8
from django.urls import reverse
10 9
from django.utils.six.moves.urllib import parse as urlparse
11 10

  
12
from combo.data.models import Page
13 11
from combo.apps.calendar.models import BookingCalendar
14
from combo.apps.calendar.utils import get_calendar, get_chrono_service, get_chrono_events
12
from combo.apps.calendar.utils import get_calendar, get_chrono_events, get_chrono_service
13
from combo.data.models import Page
15 14

  
16 15
pytestmark = pytest.mark.django_db
17 16

  
tests/test_cells.py
1 1
import datetime
2 2
import json
3
import mock
4 3
import os
4

  
5
import mock
5 6
import pytest
6 7
import requests
7

  
8
from combo.data.models import (
9
    Page,
10
    CellBase,
11
    TextCell,
12
    LinkCell,
13
    MenuCell,
14
    JsonCellBase,
15
    JsonCell,
16
    ConfigJsonCell,
17
    LinkListCell,
18
    FeedCell,
19
    ValidityInfo,
20
)
21 8
from django.apps import apps
22 9
from django.conf import settings
10
from django.contrib.auth.models import User
23 11
from django.db import connection
24 12
from django.forms.widgets import Media
25 13
from django.test import override_settings
26 14
from django.test.client import RequestFactory
27 15
from django.test.utils import CaptureQueriesContext
28
from django.contrib.auth.models import User
29 16
from django.urls import reverse
30
from django.utils.encoding import force_text, force_bytes
17
from django.utils.encoding import force_bytes, force_text
31 18
from django.utils.timezone import now
32 19

  
33 20
from combo.data.library import get_cell_classes
21
from combo.data.models import (
22
    CellBase,
23
    ConfigJsonCell,
24
    FeedCell,
25
    JsonCell,
26
    JsonCellBase,
27
    LinkCell,
28
    LinkListCell,
29
    MenuCell,
30
    Page,
31
    TextCell,
32
    ValidityInfo,
33
)
34 34
from combo.utils import NothingInCacheException
35 35

  
36 36
from .test_manager import login
tests/test_cron.py
1
import mock
2
import pytest
1 3
from django.core.management import call_command
2 4
from django.core.management.base import CommandError
3 5
from django.utils.six import StringIO
4 6

  
5
import mock
6
import pytest
7

  
8 7
pytestmark = pytest.mark.django_db
9 8

  
10 9

  
tests/test_dashboard.py
1 1
import datetime
2 2
import json
3
import mock
4 3
import os
5
import pytest
6
from webtest import TestApp
7 4

  
5
import mock
6
import pytest
8 7
from django.apps import apps
9 8
from django.conf import settings
10 9
from django.contrib.auth.models import User
11 10
from django.core.management import call_command
11
from django.test import override_settings
12 12
from django.urls import reverse
13 13
from django.utils.six.moves.urllib import parse as urlparse
14
from django.test import override_settings
14
from webtest import TestApp
15 15

  
16
from combo.wsgi import application
17
from combo.data.models import Page, CellBase, TextCell, ConfigJsonCell
18 16
from combo.apps.dashboard.models import DashboardCell, Tile
17
from combo.data.models import CellBase, ConfigJsonCell, Page, TextCell
18
from combo.wsgi import application
19 19

  
20 20
pytestmark = pytest.mark.django_db
21 21

  
tests/test_dataviz.py
1 1
import json
2 2
import urllib.parse
3
from datetime import date, timedelta
3 4

  
4 5
import mock
5 6
import pytest
6
from datetime import timedelta, date
7
from httmock import HTTMock, with_httmock, remember_called, urlmatch
8
from requests.exceptions import HTTPError
9

  
10 7
from django.apps import apps
11
from django.contrib.auth.models import User, Group
8
from django.contrib.auth.models import Group, User
12 9
from django.db import connection
13 10
from django.db.migrations.executor import MigrationExecutor
14 11
from django.test import override_settings
15 12
from django.utils import timezone
13
from httmock import HTTMock, remember_called, urlmatch, with_httmock
14
from requests.exceptions import HTTPError
16 15

  
16
from combo.apps.dataviz.models import ChartNgCell, Gauge, Statistic, UnsupportedDataSet
17 17
from combo.data.models import Page, ValidityInfo
18
from combo.apps.dataviz.models import Gauge, ChartNgCell, UnsupportedDataSet, Statistic
19 18

  
20 19
from .test_public import login, normal_user
21 20

  
tests/test_fargo.py
1 1
import json
2
import re
3

  
2 4
import mock
3 5
import pytest
4
import re
5 6
from django.test import override_settings
6 7

  
7 8
from combo.apps.fargo.models import RecentDocumentsCell
8 9
from combo.data.models import Page
10

  
9 11
from .test_manager import login
10 12

  
11 13
pytestmark = pytest.mark.django_db
tests/test_gallery_cell.py
1 1
# -*- coding: utf-8 -*-
2 2
import os
3
import pytest
4 3

  
4
import pytest
5 5
from django.urls import reverse
6
from combo.data.models import Page
6

  
7 7
from combo.apps.gallery.models import GalleryCell, Image
8
from combo.data.models import Page
8 9

  
9 10
from .test_manager import login
10 11

  
tests/test_import_export.py
18 18

  
19 19
from combo.apps.assets.models import Asset
20 20
from combo.apps.assets.utils import clean_assets_files
21
from combo.apps.gallery.models import Image, GalleryCell
21
from combo.apps.gallery.models import GalleryCell, Image
22 22
from combo.apps.lingo.models import PaymentBackend, Regie
23
from combo.apps.maps.models import MapLayer, Map, MapLayerOptions
24
from combo.apps.pwa.models import PwaSettings, PwaNavigationEntry
23
from combo.apps.maps.models import Map, MapLayer, MapLayerOptions
24
from combo.apps.pwa.models import PwaNavigationEntry, PwaSettings
25 25
from combo.data.models import Page, TextCell
26
from combo.data.utils import export_site, import_site, MissingGroups
26
from combo.data.utils import MissingGroups, export_site, import_site
27 27

  
28 28
pytestmark = pytest.mark.django_db
29 29

  
tests/test_kb.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/>.import pytest
16 16

  
17
import pytest
18 17
import re
19 18

  
19
import pytest
20 20
from django.test.client import RequestFactory
21 21

  
22
from combo.data.models import CellBase, Page, TextCell
23 22
from combo.apps.kb.models import LatestPageUpdatesCell
23
from combo.data.models import CellBase, Page, TextCell
24 24

  
25 25
pytestmark = pytest.mark.django_db
26 26

  
tests/test_lingo_cells.py
2 2

  
3 3
import eopayment
4 4
import pytest
5

  
6 5
from django.contrib.auth.models import User
7 6
from django.test.client import RequestFactory
8 7
from django.utils import timezone
9 8
from django.utils.http import quote
10 9

  
11
from combo.data.models import Page
12
from combo.apps.lingo.models import Regie, BasketItem, Transaction
13 10
from combo.apps.lingo.models import (
11
    BasketItem,
14 12
    LingoBasketCell,
15
    PaymentBackend,
16
    LingoRecentTransactionsCell,
17 13
    LingoBasketLinkCell,
14
    LingoRecentTransactionsCell,
15
    PaymentBackend,
16
    Regie,
18 17
    TipiPaymentFormCell,
18
    Transaction,
19 19
)
20
from combo.data.models import Page
20 21

  
21 22
pytestmark = pytest.mark.django_db
22 23

  
tests/test_lingo_manager.py
1 1
# -*- coding: utf-8 -*-
2 2

  
3 3
import datetime
4
from decimal import Decimal
4 5

  
6
import eopayment
7
import mock
8
import pytest
5 9
from django.contrib.auth.models import User
6 10
from django.db import connection
7 11
from django.test.utils import CaptureQueriesContext
8
from django.utils.timezone import now
9
from django.utils.timezone import make_aware
10

  
11
import mock
12
import pytest
12
from django.utils.timezone import make_aware, now
13 13

  
14
import eopayment
15
from combo.data.models import Page
16 14
from combo.apps.lingo.models import (
17
    Regie,
18
    BasketItem,
19
    Transaction,
20 15
    ActiveItems,
21
    TipiPaymentFormCell,
16
    BasketItem,
22 17
    PaymentBackend,
18
    Regie,
19
    TipiPaymentFormCell,
20
    Transaction,
23 21
)
24
from decimal import Decimal
22
from combo.data.models import Page
25 23

  
26 24
pytestmark = pytest.mark.django_db
27 25

  
tests/test_lingo_payment.py
1
import json
2
import uuid
1 3
from contextlib import contextmanager
2
import eopayment
3
import pytest
4 4
from datetime import datetime, timedelta
5 5
from decimal import Decimal
6
import json
7
import mock
8
import uuid
9

  
10
from mellon.models import UserSAMLIdentifier
11
from requests.exceptions import ConnectionError
12
from requests.models import Response
13 6

  
7
import eopayment
8
import httmock
9
import mock
10
import pytest
14 11
from django.apps import apps
12
from django.conf import settings
15 13
from django.contrib.auth.models import User
16 14
from django.http.request import QueryDict
17
from django.urls import reverse
18
from django.conf import settings
19 15
from django.test import override_settings
16
from django.urls import reverse
20 17
from django.utils import timezone
21 18
from django.utils.six.moves.urllib import parse as urlparse
22 19
from django.utils.timezone import utc
20
from mellon.models import UserSAMLIdentifier
21
from requests.exceptions import ConnectionError
22
from requests.models import Response
23 23

  
24
from combo.data.models import Page
25 24
from combo.apps.lingo.models import (
26
    Regie,
27
    BasketItem,
28
    Transaction,
29
    TransactionOperation,
30 25
    EXPIRED,
26
    BasketItem,
31 27
    LingoBasketCell,
32 28
    PaymentBackend,
29
    Regie,
30
    Transaction,
31
    TransactionOperation,
33 32
)
33
from combo.apps.lingo.views import signing_dumps, signing_loads
34
from combo.data.models import Page
34 35
from combo.utils import sign_url
35
from combo.apps.lingo.views import signing_loads, signing_dumps
36

  
37
import httmock
38 36

  
39 37
from .test_manager import login
40 38

  
tests/test_lingo_remote_regie.py
2 2

  
3 3
import copy
4 4
import json
5
import pytest
6
import mock
7 5
from decimal import Decimal
8
from requests.models import Response
9
from requests.exceptions import ConnectionError
10 6

  
7
import mock
8
import pytest
11 9
from django.apps import apps
12
from django.test.client import RequestFactory
13
from django.test import override_settings
14
from django.urls import reverse
15 10
from django.conf import settings
11
from django.contrib.auth.models import User
16 12
from django.core.management import call_command
13
from django.test import override_settings
14
from django.test.client import RequestFactory
15
from django.urls import reverse
17 16
from django.utils.encoding import force_bytes, force_text
18 17
from django.utils.six.moves.urllib import parse as urlparse
19
from django.utils.timezone import timedelta, now
20
from django.contrib.auth.models import User
18
from django.utils.timezone import now, timedelta
19
from requests.exceptions import ConnectionError
20
from requests.models import Response
21 21

  
22
from combo.utils import check_query, aes_hex_encrypt
23
from combo.data.models import Page
24 22
from combo.apps.lingo.models import (
25
    Regie,
26 23
    ActiveItems,
24
    BasketItem,
27 25
    ItemsHistory,
26
    PaymentBackend,
27
    Regie,
28 28
    SelfDeclaredInvoicePayment,
29 29
    Transaction,
30
    BasketItem,
31
    PaymentBackend,
32 30
)
31
from combo.data.models import Page
32
from combo.utils import aes_hex_encrypt, check_query
33 33

  
34 34
pytestmark = pytest.mark.django_db
35 35

  
tests/test_manager.py
1 1
import base64
2 2
import datetime
3 3
import json
4
import mock
5 4
import os
6 5
import re
7 6
import shutil
8 7

  
8
import mock
9
import pytest
10
from django.conf import settings
11
from django.contrib.auth.models import Group
9 12
from django.core.files import File
10 13
from django.core.files.storage import default_storage
11 14
from django.core.serializers.base import DeserializationError
12
from django.urls import reverse
13
from django.conf import settings
14
from django.contrib.auth.models import Group
15 15
from django.db import connection
16 16
from django.template import TemplateSyntaxError
17 17
from django.test import override_settings
18 18
from django.test.client import RequestFactory
19 19
from django.test.utils import CaptureQueriesContext
20
from django.urls import reverse
20 21
from django.utils.encoding import force_bytes, force_str
21 22
from django.utils.http import urlencode
22
from django.utils.timezone import now
23 23
from django.utils.six import BytesIO
24 24
from django.utils.six.moves.urllib import parse as urlparse
25

  
26
import pytest
25
from django.utils.timezone import now
27 26
from webtest import Upload
28 27

  
28
from combo.apps.assets.models import Asset
29
from combo.apps.family.models import FamilyInfosCell
30
from combo.apps.maps.models import MapLayer
31
from combo.apps.search.models import SearchCell
29 32
from combo.data.forms import LinkCellForm
30 33
from combo.data.models import (
31
    Page,
32 34
    CellBase,
33
    TextCell,
34
    LinkCell,
35 35
    ConfigJsonCell,
36 36
    JsonCell,
37
    PageSnapshot,
37
    LinkCell,
38 38
    LinkListCell,
39
    ParentContentCell,
40 39
    MenuCell,
40
    Page,
41
    PageSnapshot,
42
    ParentContentCell,
43
    TextCell,
41 44
    ValidityInfo,
42 45
)
43
from combo.manager.forms import PageAddForm
44
from combo.manager.forms import PageSelectTemplateForm
45
from combo.apps.assets.models import Asset
46
from combo.apps.maps.models import MapLayer
47
from combo.apps.family.models import FamilyInfosCell
48
from combo.apps.search.models import SearchCell
46
from combo.manager.forms import PageAddForm, PageSelectTemplateForm
49 47

  
50 48
pytestmark = pytest.mark.django_db
51 49

  
tests/test_maps_cells.py
1 1
# -*- coding: utf-8 -*-
2 2
import json
3

  
3 4
import mock
4 5
import pytest
5

  
6 6
from django.conf import settings
7
from django.contrib.auth.models import User
8
from django.contrib.auth.models import Group
9
from django.urls import reverse
7
from django.contrib.auth.models import Group, User
10 8
from django.test.client import RequestFactory
9
from django.urls import reverse
11 10

  
11
from combo.apps.maps.models import Map, MapLayer, MapLayerOptions
12 12
from combo.data.models import Page
13
from combo.apps.maps.models import MapLayer, Map, MapLayerOptions
14 13

  
15 14
from .test_manager import login
16 15

  
tests/test_maps_manager.py
1 1
# -*- coding: utf-8 -*-
2 2

  
3
import pytest
4 3
import mock
4
import pytest
5 5

  
6
from combo.apps.maps.models import Map
7
from combo.apps.maps.models import MapLayer
8
from combo.apps.maps.models import MapLayerOptions
6
from combo.apps.maps.models import Map, MapLayer, MapLayerOptions
9 7
from combo.data.models import Page
10 8

  
11 9
pytestmark = pytest.mark.django_db
tests/test_newsletters_cell.py
1 1
# -*- coding: utf-8 -*-
2 2

  
3
import pytest
4
import mock
5
import requests
6 3
import json
7 4

  
8
from django.template.defaultfilters import slugify
5
import mock
6
import pytest
7
import requests
9 8
from django.contrib.auth.models import User
9
from django.template.defaultfilters import slugify
10 10

  
11
from combo.data.models import Page
12
from combo.apps.newsletters.models import NewslettersCell, SubscriptionsSaveError
13 11
from combo.apps.newsletters.forms import NewslettersManageForm
12
from combo.apps.newsletters.models import NewslettersCell, SubscriptionsSaveError
13
from combo.data.models import Page
14 14
from combo.utils import check_query
15 15

  
16 16
pytestmark = pytest.mark.django_db
tests/test_notification.py
1 1
import json
2
from datetime import timedelta as timedelta
3
from decimal import Decimal
2 4

  
3 5
import mock
4 6
import pytest
5
from decimal import Decimal
6
from datetime import timedelta as timedelta
7

  
8 7
from django.contrib.auth.models import User
8
from django.test import Client
9 9
from django.test.client import RequestFactory
10
from django.utils.encoding import force_text
11
from django.utils.timezone import timedelta, now
12 10
from django.urls import reverse
11
from django.utils.encoding import force_text
12
from django.utils.timezone import now, timedelta
13 13

  
14
from django.test import Client
15

  
16
from combo.data.models import Page
14
from combo.apps.lingo.models import ActiveItems, PaymentBackend, Regie
17 15
from combo.apps.notifications.models import Notification, NotificationsCell
18
from combo.apps.lingo.models import Regie, ActiveItems, PaymentBackend
16
from combo.data.models import Page
19 17

  
20 18
from .test_manager import login as login_app
21 19

  
tests/test_pages.py
1 1
import os
2
import pytest
3 2
import sys
4 3

  
4
import pytest
5 5
from django.conf import settings
6
from django.contrib.auth.models import User, Group
6
from django.contrib.auth.models import Group, User
7 7
from django.test import override_settings
8 8
from django.test.client import RequestFactory
9 9
from django.utils.six import StringIO
10
from combo.data.models import Page, PageSnapshot, CellBase, TextCell, LinkCell, LinkListCell
11
from combo.data.management.commands.import_site import Command as ImportSiteCommand
10

  
12 11
from combo.data.management.commands.export_site import Command as ExportSiteCommand
12
from combo.data.management.commands.import_site import Command as ImportSiteCommand
13
from combo.data.models import CellBase, LinkCell, LinkListCell, Page, PageSnapshot, TextCell
13 14
from combo.manager.forms import PageVisibilityForm
14 15

  
15 16
pytestmark = pytest.mark.django_db
tests/test_profile.py
1 1
import datetime
2 2
import json
3

  
3 4
import mock
4 5
import pytest
5

  
6 6
from django.test import override_settings
7 7

  
8 8
from combo.data.models import Page
tests/test_public.py
1
import mock
2
from webtest import TestApp
3

  
4 1
import datetime
5 2
import json
6
import pytest
7
import re
8 3
import os
4
import re
9 5

  
6
import mock
7
import pytest
10 8
from django.conf import settings
11
from django.contrib.auth.models import User, Group
9
from django.contrib.auth.models import Group, User
12 10
from django.core.files import File
13
from django.urls import reverse
14 11
from django.db import connection
12
from django.test import override_settings
13
from django.test.utils import CaptureQueriesContext
14
from django.urls import reverse
15 15
from django.utils.http import quote
16 16
from django.utils.six import StringIO
17 17
from django.utils.six.moves.urllib import parse as urlparse
18
from django.test import override_settings
19
from django.test.utils import CaptureQueriesContext
18
from webtest import TestApp
20 19

  
21 20
try:
22 21
    import mellon
......
24 23
    mellon = None
25 24
import requests
26 25

  
27
from combo.wsgi import application
26
from combo.apps.assets.models import Asset
27
from combo.apps.family.models import FamilyInfosCell
28 28
from combo.data.models import (
29
    Page,
30 29
    CellBase,
31
    TextCell,
32
    ParentContentCell,
30
    ConfigJsonCell,
33 31
    FeedCell,
32
    JsonCell,
34 33
    LinkCell,
35 34
    LinkListCell,
36
    ConfigJsonCell,
35
    Page,
36
    ParentContentCell,
37 37
    Redirect,
38
    JsonCell,
38
    TextCell,
39 39
)
40
from combo.apps.assets.models import Asset
41
from combo.apps.family.models import FamilyInfosCell
40
from combo.wsgi import application
42 41

  
43 42
pytestmark = pytest.mark.django_db
44 43

  
tests/test_public_templatetags.py
4 4
import time
5 5

  
6 6
import pytest
7

  
7
from django.contrib.auth.models import AnonymousUser, Group, User
8 8
from django.core.files import File
9 9
from django.core.files.storage import default_storage
10 10
from django.template import Context, Template
11 11
from django.template.exceptions import TemplateSyntaxError
12 12
from django.test import override_settings
13 13
from django.test.client import RequestFactory
14
from django.contrib.auth.models import User, Group, AnonymousUser
15 14
from django.utils.six import StringIO
16 15
from django.utils.timezone import now
17 16

  
18
from combo.data.models import Page, TextCell
19 17
from combo.apps.assets.models import Asset
18
from combo.data.models import Page, TextCell
20 19
from combo.profile.utils import get_user_from_name_id
21 20

  
22 21
pytestmark = pytest.mark.django_db
tests/test_publik.py
3 3
import re
4 4

  
5 5
import pytest
6
from webtest import TestApp
7

  
8 6
from django.conf import settings
9
from django.contrib.auth.models import User, Group
7
from django.contrib.auth.models import Group, User
8
from webtest import TestApp
10 9

  
11 10
from combo.data.models import Page
12 11

  
tests/test_pwa.py
3 3

  
4 4
import mock
5 5
import pytest
6
from webtest import Upload
7

  
8 6
import pywebpush
9

  
10 7
from django.conf import settings
11 8
from django.core.files import File
12
from django.urls import reverse
13 9
from django.template import Context, Template
14 10
from django.test import override_settings
15 11
from django.test.client import RequestFactory
12
from django.urls import reverse
16 13
from django.utils.six import BytesIO
14
from webtest import Upload
17 15

  
18 16
from combo.apps.notifications.models import Notification
19
from combo.apps.pwa.models import PushSubscription, PwaSettings, PwaNavigationEntry
17
from combo.apps.pwa.models import PushSubscription, PwaNavigationEntry, PwaSettings
20 18
from combo.data.models import Page
21 19

  
22 20
from .test_manager import login
tests/test_requests.py
2 2

  
3 3
import mock
4 4
import pytest
5

  
6 5
from django.contrib.auth.models import AnonymousUser
7 6
from django.utils.six.moves.urllib import parse as urlparse
8 7

  
9
from combo.utils import requests, check_query, NothingInCacheException
8
from combo.utils import NothingInCacheException, check_query, requests
10 9

  
11 10

  
12 11
class MockUser(object):
tests/test_search.py
1 1
import datetime
2 2
import json
3 3
import os
4
import pytest
5
import mock
6 4

  
5
import mock
6
import pytest
7 7
from django.conf import settings
8
from django.contrib.auth.models import AnonymousUser, User, Group
8
from django.contrib.auth.models import AnonymousUser, Group, User
9 9
from django.contrib.contenttypes.models import ContentType
10 10
from django.db import connection
11 11
from django.test import override_settings
......
14 14
from django.urls import reverse
15 15
from django.utils.http import urlencode
16 16
from django.utils.timezone import now
17

  
18 17
from requests.exceptions import ConnectionError
19 18
from requests.models import Response
20 19

  
21 20
from combo.apps.search.engines import engines
22
from combo.apps.search.models import SearchCell, IndexedCell
21
from combo.apps.search.models import IndexedCell, SearchCell
23 22
from combo.apps.search.utils import index_site, search_site
24
from combo.data.models import Page, JsonCell, TextCell, MenuCell, LinkCell, PageSnapshot
23
from combo.data.models import JsonCell, LinkCell, MenuCell, Page, PageSnapshot, TextCell
25 24

  
26 25
from .test_manager import login
27 26

  
28

  
29 27
pytestmark = pytest.mark.django_db
30 28

  
31 29

  
tests/test_utils.py
1 1
import pytest
2

  
3
from combo.utils import aes_hex_decrypt, aes_hex_encrypt, get_templated_url, TemplateError
4 2
from django.conf import settings
5
from django.test import override_settings
3
from django.contrib.auth.models import AnonymousUser
6 4
from django.template import Context, RequestContext
5
from django.test import override_settings
7 6
from django.test.client import RequestFactory
8
from django.contrib.auth.models import AnonymousUser
9 7
from django.utils.encoding import force_bytes
10 8

  
9
from combo.utils import TemplateError, aes_hex_decrypt, aes_hex_encrypt, get_templated_url
10

  
11 11

  
12 12
class MockUser(object):
13 13
    email = 'foo=3@example.net'
tests/test_wcs.py
1 1
# -*- coding: utf-8 -*-
2 2

  
3
import pytest
4

  
5 3
import copy
6 4
import json
7 5
import re
8 6

  
7
import mock
8
import pytest
9 9
from django.apps import apps
10 10
from django.conf import settings
11
from django.contrib.auth.models import AnonymousUser
11 12
from django.core.cache import cache
12
from django.urls import reverse
13 13
from django.db import connection
14 14
from django.test.client import RequestFactory
15 15
from django.test.utils import CaptureQueriesContext
16
from django.urls import reverse
16 17
from django.utils.six.moves.urllib import parse as urlparse
17

  
18
import mock
19 18
from requests.exceptions import ConnectionError
20 19
from requests.models import Response
21 20

  
22
from combo.data.library import get_cell_classes
23
from combo.data.models import CellBase, LinkListCell, Page, ValidityInfo
24 21
from combo.apps.search.engines import engines
22
from combo.apps.search.models import SearchCell
23
from combo.apps.search.utils import index_site, search_site
24
from combo.apps.wcs.context_processors import Cards
25 25
from combo.apps.wcs.models import (
26
    WcsFormCell,
27
    WcsCurrentFormsCell,
28
    WcsFormsOfCategoryCell,
29
    WcsCurrentDraftsCell,
30
    WcsCategoryCell,
31
    TrackingCodeInputCell,
32 26
    BackofficeSubmissionCell,
33
    WcsCareFormsCell,
34
    WcsCardsCell,
27
    TrackingCodeInputCell,
35 28
    WcsCardInfosCell,
29
    WcsCardsCell,
30
    WcsCareFormsCell,
31
    WcsCategoryCell,
32
    WcsCurrentDraftsCell,
33
    WcsCurrentFormsCell,
34
    WcsFormCell,
35
    WcsFormsOfCategoryCell,
36 36
)
37
from combo.apps.wcs.context_processors import Cards
38

  
39
from combo.apps.search.models import SearchCell
40
from combo.apps.search.utils import index_site, search_site
41
from django.contrib.auth.models import AnonymousUser
42

  
37
from combo.data.library import get_cell_classes
38
from combo.data.models import CellBase, LinkListCell, Page, ValidityInfo
43 39
from combo.utils import NothingInCacheException
44 40

  
45 41
from .test_manager import login
46
-