misc: apply isort (#52797)
This commit is contained in:
parent
6c6d7bac40
commit
29bc8e66a9
|
@ -18,8 +18,7 @@ import base64
|
||||||
|
|
||||||
from django.core.files import File
|
from django.core.files import File
|
||||||
from django.utils.six import BytesIO
|
from django.utils.six import BytesIO
|
||||||
|
from rest_framework import permissions, serializers, status
|
||||||
from rest_framework import serializers, permissions, status
|
|
||||||
from rest_framework.generics import GenericAPIView
|
from rest_framework.generics import GenericAPIView
|
||||||
from rest_framework.response import Response
|
from rest_framework.response import Response
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,6 @@ import os
|
||||||
from django import template
|
from django import template
|
||||||
from django.db.models.fields.files import ImageFieldFile
|
from django.db.models.fields.files import ImageFieldFile
|
||||||
from django.utils import six
|
from django.utils import six
|
||||||
|
|
||||||
from sorl.thumbnail.shortcuts import get_thumbnail
|
from sorl.thumbnail.shortcuts import get_thumbnail
|
||||||
|
|
||||||
from ..models import Asset
|
from ..models import Asset
|
||||||
|
|
|
@ -14,12 +14,11 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from django.conf.urls import url, include
|
from django.conf.urls import include, url
|
||||||
|
|
||||||
from combo.urls_utils import decorated_includes, manager_required
|
from combo.urls_utils import decorated_includes, manager_required
|
||||||
|
|
||||||
from . import views
|
from . import api_views, views
|
||||||
from . import api_views
|
|
||||||
|
|
||||||
assets_manager_urls = [
|
assets_manager_urls = [
|
||||||
url(r'^$', views.assets, name='combo-manager-assets'),
|
url(r'^$', views.assets, name='combo-manager-assets'),
|
||||||
|
|
|
@ -15,29 +15,27 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import json
|
import json
|
||||||
import tarfile
|
|
||||||
import os
|
import os
|
||||||
|
import tarfile
|
||||||
|
|
||||||
|
import ckeditor
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.contrib import messages
|
from django.contrib import messages
|
||||||
from django.core.exceptions import ObjectDoesNotExist, PermissionDenied
|
from django.core.exceptions import ObjectDoesNotExist, PermissionDenied
|
||||||
from django.core.files.storage import default_storage
|
from django.core.files.storage import default_storage
|
||||||
from django.urls import reverse, reverse_lazy
|
|
||||||
from django.http import Http404, HttpResponse
|
from django.http import Http404, HttpResponse
|
||||||
from django.shortcuts import get_object_or_404
|
from django.shortcuts import get_object_or_404, redirect
|
||||||
from django.shortcuts import redirect
|
from django.urls import reverse, reverse_lazy
|
||||||
from django.utils.six import BytesIO
|
from django.utils.six import BytesIO
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from django.views.generic import TemplateView, ListView, FormView
|
from django.views.generic import FormView, ListView, TemplateView
|
||||||
|
|
||||||
import ckeditor
|
|
||||||
from sorl.thumbnail.shortcuts import get_thumbnail
|
from sorl.thumbnail.shortcuts import get_thumbnail
|
||||||
|
|
||||||
from combo.data.models import CellBase
|
from combo.apps.assets.utils import export_assets, import_assets
|
||||||
from combo.apps.assets.utils import import_assets, export_assets
|
|
||||||
from combo.apps.maps.models import MapLayer
|
from combo.apps.maps.models import MapLayer
|
||||||
|
from combo.data.models import CellBase
|
||||||
|
|
||||||
from .forms import AssetUploadForm, AssetsImportForm
|
from .forms import AssetsImportForm, AssetUploadForm
|
||||||
from .models import Asset
|
from .models import Asset
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -15,12 +15,13 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from django import forms
|
from django import forms
|
||||||
from django.utils.translation import ugettext_lazy as _
|
|
||||||
from django.utils.dateparse import parse_datetime, parse_time
|
from django.utils.dateparse import parse_datetime, parse_time
|
||||||
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
|
from combo.apps.wcs.utils import get_wcs_options
|
||||||
|
|
||||||
from .models import BookingCalendar
|
from .models import BookingCalendar
|
||||||
from .utils import get_agendas
|
from .utils import get_agendas
|
||||||
from combo.apps.wcs.utils import get_wcs_options
|
|
||||||
|
|
||||||
|
|
||||||
class BookingCalendarForm(forms.ModelForm):
|
class BookingCalendarForm(forms.ModelForm):
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
|
|
@ -20,10 +20,10 @@ from django.conf import settings
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from combo.data.models import CellBase
|
|
||||||
from combo.data.library import register_cell_class
|
from combo.data.library import register_cell_class
|
||||||
|
from combo.data.models import CellBase
|
||||||
|
|
||||||
from .utils import is_chrono_enabled, is_wcs_enabled, get_chrono_events, get_calendar_context_vars
|
from .utils import get_calendar_context_vars, get_chrono_events, is_chrono_enabled, is_wcs_enabled
|
||||||
|
|
||||||
|
|
||||||
@register_cell_class
|
@register_cell_class
|
||||||
|
|
|
@ -18,7 +18,7 @@ import datetime
|
||||||
import math
|
import math
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
|
from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator
|
||||||
from django.utils.dateparse import parse_datetime
|
from django.utils.dateparse import parse_datetime
|
||||||
from django.utils.http import urlencode
|
from django.utils.http import urlencode
|
||||||
from django.utils.timezone import localtime, make_aware
|
from django.utils.timezone import localtime, make_aware
|
||||||
|
|
|
@ -17,12 +17,12 @@
|
||||||
from django.contrib import messages
|
from django.contrib import messages
|
||||||
from django.http import HttpResponseRedirect
|
from django.http import HttpResponseRedirect
|
||||||
from django.utils.encoding import force_text
|
from django.utils.encoding import force_text
|
||||||
from django.views.generic import View, DetailView
|
from django.views.generic import DetailView, View
|
||||||
from django.views.generic.detail import SingleObjectMixin
|
from django.views.generic.detail import SingleObjectMixin
|
||||||
|
|
||||||
from .forms import BookingForm
|
from .forms import BookingForm
|
||||||
from .models import BookingCalendar
|
from .models import BookingCalendar
|
||||||
from .utils import get_form_url_with_params, get_chrono_events, get_calendar_context_vars
|
from .utils import get_calendar_context_vars, get_chrono_events, get_form_url_with_params
|
||||||
|
|
||||||
|
|
||||||
class BookingView(SingleObjectMixin, View):
|
class BookingView(SingleObjectMixin, View):
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
|
@ -17,14 +17,14 @@
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.contrib.contenttypes.models import ContentType
|
|
||||||
from django.contrib.contenttypes import fields
|
from django.contrib.contenttypes import fields
|
||||||
|
from django.contrib.contenttypes.models import ContentType
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from django.utils.timezone import now
|
from django.utils.timezone import now
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from combo.data.models import CellBase, ValidityInfo
|
|
||||||
from combo.data.library import register_cell_class
|
from combo.data.library import register_cell_class
|
||||||
|
from combo.data.models import CellBase, ValidityInfo
|
||||||
|
|
||||||
|
|
||||||
@register_cell_class
|
@register_cell_class
|
||||||
|
|
|
@ -19,21 +19,21 @@ import json
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.contrib.contenttypes.models import ContentType
|
from django.contrib.contenttypes.models import ContentType
|
||||||
from django.core.exceptions import PermissionDenied
|
from django.core.exceptions import PermissionDenied
|
||||||
from django.urls import reverse
|
|
||||||
from django.db.models import Max, Min
|
from django.db.models import Max, Min
|
||||||
from django.http import (
|
from django.http import (
|
||||||
Http404,
|
Http404,
|
||||||
HttpResponse,
|
HttpResponse,
|
||||||
HttpResponseBadRequest,
|
HttpResponseBadRequest,
|
||||||
HttpResponseRedirect,
|
|
||||||
HttpResponseNotAllowed,
|
HttpResponseNotAllowed,
|
||||||
|
HttpResponseRedirect,
|
||||||
)
|
)
|
||||||
|
from django.urls import reverse
|
||||||
from django.utils.encoding import force_text
|
from django.utils.encoding import force_text
|
||||||
from django.views.decorators.csrf import csrf_exempt
|
from django.views.decorators.csrf import csrf_exempt
|
||||||
from django.views.generic import View
|
from django.views.generic import View
|
||||||
|
|
||||||
from combo.data.models import CellBase, ConfigJsonCell
|
|
||||||
from combo.data.library import get_cell_class
|
from combo.data.library import get_cell_class
|
||||||
|
from combo.data.models import CellBase, ConfigJsonCell
|
||||||
from combo.public.views import render_cell
|
from combo.public.views import render_cell
|
||||||
|
|
||||||
from .models import DashboardCell, Tile
|
from .models import DashboardCell, Tile
|
||||||
|
|
|
@ -22,7 +22,7 @@ from django.conf import settings
|
||||||
from django.db import transaction
|
from django.db import transaction
|
||||||
from django.db.models import Q
|
from django.db.models import Q
|
||||||
|
|
||||||
from combo.utils import requests, cache_during_request, spooler
|
from combo.utils import cache_during_request, requests, spooler
|
||||||
|
|
||||||
from .models import ChartCell, ChartNgCell
|
from .models import ChartCell, ChartNgCell
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
from django.utils.timezone import utc
|
from django.utils.timezone import utc
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
# Generated by Django 1.11.12 on 2019-03-28 10:11
|
# Generated by Django 1.11.12 on 2019-03-28 10:11
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
import django.db.models.deletion
|
import django.db.models.deletion
|
||||||
import jsonfield.fields
|
import jsonfield.fields
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
# Generated by Django 1.11.29 on 2020-11-26 14:57
|
# Generated by Django 1.11.29 on 2020-11-26 14:57
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
import django.db.models.deletion
|
import django.db.models.deletion
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
# Generated by Django 1.11.29 on 2020-12-02 13:24
|
# Generated by Django 1.11.29 on 2020-12-02 13:24
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import migrations
|
|
||||||
import jsonfield.fields
|
import jsonfield.fields
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
|
@ -18,22 +18,22 @@ import copy
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from datetime import date
|
from datetime import date
|
||||||
from requests.exceptions import RequestException
|
|
||||||
|
|
||||||
from django.urls import reverse
|
|
||||||
from django.db import models, transaction
|
|
||||||
from django.utils import timezone
|
|
||||||
from django.utils.encoding import force_text
|
|
||||||
from django.utils.translation import ugettext_lazy as _, ungettext, gettext
|
|
||||||
from django.conf import settings
|
|
||||||
|
|
||||||
from jsonfield import JSONField
|
|
||||||
from requests.exceptions import HTTPError
|
|
||||||
import pygal
|
import pygal
|
||||||
import pygal.util
|
import pygal.util
|
||||||
|
from django.conf import settings
|
||||||
|
from django.db import models, transaction
|
||||||
|
from django.urls import reverse
|
||||||
|
from django.utils import timezone
|
||||||
|
from django.utils.encoding import force_text
|
||||||
|
from django.utils.translation import gettext
|
||||||
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
from django.utils.translation import ungettext
|
||||||
|
from jsonfield import JSONField
|
||||||
|
from requests.exceptions import HTTPError, RequestException
|
||||||
|
|
||||||
from combo.data.models import CellBase
|
|
||||||
from combo.data.library import register_cell_class
|
from combo.data.library import register_cell_class
|
||||||
|
from combo.data.models import CellBase
|
||||||
from combo.utils import get_templated_url, requests, spooler
|
from combo.utils import get_templated_url, requests, spooler
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -15,13 +15,13 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from django.core.exceptions import PermissionDenied
|
from django.core.exceptions import PermissionDenied
|
||||||
from django.http import HttpResponse, Http404
|
from django.http import Http404, HttpResponse
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from requests.exceptions import HTTPError
|
from requests.exceptions import HTTPError
|
||||||
|
|
||||||
from combo.utils import get_templated_url, requests
|
from combo.utils import get_templated_url, requests
|
||||||
from .models import Gauge, ChartNgCell, UnsupportedDataSet
|
|
||||||
|
from .models import ChartNgCell, Gauge, UnsupportedDataSet
|
||||||
|
|
||||||
|
|
||||||
def ajax_gauge_count(request, *args, **kwargs):
|
def ajax_gauge_count(request, *args, **kwargs):
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
|
||||||
import ckeditor.fields
|
import ckeditor.fields
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
from django.utils.timezone import utc
|
from django.utils.timezone import utc
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -16,10 +16,10 @@
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from combo.data.models import CellBase
|
|
||||||
from combo.data.library import register_cell_class
|
from combo.data.library import register_cell_class
|
||||||
|
from combo.data.models import CellBase
|
||||||
|
|
||||||
from .utils import is_family_enabled, get_family
|
from .utils import get_family, is_family_enabled
|
||||||
|
|
||||||
|
|
||||||
@register_cell_class
|
@register_cell_class
|
||||||
|
|
|
@ -15,10 +15,10 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
from django.views.generic import FormView, TemplateView
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
|
||||||
from django.http import HttpResponseRedirect
|
|
||||||
from django.contrib import messages
|
from django.contrib import messages
|
||||||
|
from django.http import HttpResponseRedirect
|
||||||
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
from django.views.generic import FormView, TemplateView
|
||||||
|
|
||||||
from .forms import FamilyLinkForm
|
from .forms import FamilyLinkForm
|
||||||
from .utils import link_family, unlink_family
|
from .utils import link_family, unlink_family
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
from django.utils.timezone import utc
|
from django.utils.timezone import utc
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -18,14 +18,13 @@ import logging
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from django.forms import models as model_forms
|
|
||||||
from django.forms import Select
|
from django.forms import Select
|
||||||
|
from django.forms import models as model_forms
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
from requests import HTTPError, RequestException
|
||||||
|
|
||||||
from requests import RequestException, HTTPError
|
|
||||||
|
|
||||||
from combo.data.models import CellBase
|
|
||||||
from combo.data.library import register_cell_class
|
from combo.data.library import register_cell_class
|
||||||
|
from combo.data.models import CellBase
|
||||||
from combo.utils import requests
|
from combo.utils import requests
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
|
@ -17,13 +17,13 @@
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from django import template
|
from django import template
|
||||||
from django.db import models
|
|
||||||
from django.core import serializers
|
from django.core import serializers
|
||||||
|
from django.db import models
|
||||||
from django.forms import models as model_forms
|
from django.forms import models as model_forms
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from combo.data.models import CellBase
|
|
||||||
from combo.data.library import register_cell_class
|
from combo.data.library import register_cell_class
|
||||||
|
from combo.data.models import CellBase
|
||||||
|
|
||||||
|
|
||||||
@register_cell_class
|
@register_cell_class
|
||||||
|
|
|
@ -14,21 +14,21 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from django.urls import reverse, reverse_lazy
|
|
||||||
from django.shortcuts import redirect
|
from django.shortcuts import redirect
|
||||||
|
from django.urls import reverse, reverse_lazy
|
||||||
from django.views.generic import (
|
from django.views.generic import (
|
||||||
TemplateView,
|
|
||||||
RedirectView,
|
|
||||||
DetailView,
|
|
||||||
CreateView,
|
CreateView,
|
||||||
UpdateView,
|
|
||||||
ListView,
|
|
||||||
DeleteView,
|
DeleteView,
|
||||||
|
DetailView,
|
||||||
FormView,
|
FormView,
|
||||||
|
ListView,
|
||||||
|
RedirectView,
|
||||||
|
TemplateView,
|
||||||
|
UpdateView,
|
||||||
)
|
)
|
||||||
|
|
||||||
from .models import Image, GalleryCell
|
|
||||||
from .forms import ImageAddForm, ImageEditForm
|
from .forms import ImageAddForm, ImageEditForm
|
||||||
|
from .models import GalleryCell, Image
|
||||||
|
|
||||||
|
|
||||||
class ImageAddView(CreateView):
|
class ImageAddView(CreateView):
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
# Generated by Django 1.11.18 on 2020-01-31 15:40
|
# Generated by Django 1.11.18 on 2020-01-31 15:40
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
import django.db.models.deletion
|
import django.db.models.deletion
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
|
@ -21,8 +21,8 @@ from django.db import models
|
||||||
from django.utils import timezone
|
from django.utils import timezone
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from combo.data.models import CellBase, Page
|
|
||||||
from combo.data.library import register_cell_class
|
from combo.data.library import register_cell_class
|
||||||
|
from combo.data.models import CellBase, Page
|
||||||
|
|
||||||
|
|
||||||
@register_cell_class
|
@register_cell_class
|
||||||
|
|
|
@ -18,12 +18,11 @@ import datetime
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
import django.apps
|
import django.apps
|
||||||
|
import eopayment
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
from django.utils import timezone
|
from django.utils import timezone
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
import eopayment
|
|
||||||
|
|
||||||
|
|
||||||
class AppConfig(django.apps.AppConfig):
|
class AppConfig(django.apps.AppConfig):
|
||||||
name = 'combo.apps.lingo'
|
name = 'combo.apps.lingo'
|
||||||
|
@ -42,7 +41,7 @@ class AppConfig(django.apps.AppConfig):
|
||||||
self.notify_payments()
|
self.notify_payments()
|
||||||
|
|
||||||
def update_transactions(self):
|
def update_transactions(self):
|
||||||
from .models import Transaction, EXPIRED
|
from .models import EXPIRED, Transaction
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
now = timezone.now()
|
now = timezone.now()
|
||||||
|
|
|
@ -16,12 +16,11 @@
|
||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
|
|
||||||
from django import forms
|
from django import forms
|
||||||
from django.core.exceptions import ValidationError
|
from django.core.exceptions import ValidationError
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from .models import Regie, PaymentBackend
|
from .models import PaymentBackend, Regie
|
||||||
|
|
||||||
TYPE_FIELD_MAPPING = {
|
TYPE_FIELD_MAPPING = {
|
||||||
str: forms.CharField,
|
str: forms.CharField,
|
||||||
|
|
|
@ -16,26 +16,22 @@
|
||||||
|
|
||||||
import csv
|
import csv
|
||||||
import datetime
|
import datetime
|
||||||
from dateutil import parser as date_parser
|
|
||||||
|
|
||||||
from django.urls import reverse
|
import eopayment
|
||||||
from django.urls import reverse_lazy
|
from dateutil import parser as date_parser
|
||||||
from django.contrib import messages
|
from django.contrib import messages
|
||||||
from django.db.models import Q, Prefetch
|
from django.db.models import Prefetch, Q
|
||||||
from django.db.models.expressions import RawSQL
|
from django.db.models.expressions import RawSQL
|
||||||
|
from django.http import HttpResponse, HttpResponseRedirect
|
||||||
|
from django.shortcuts import get_object_or_404
|
||||||
|
from django.template.response import TemplateResponse
|
||||||
|
from django.urls import reverse, reverse_lazy
|
||||||
from django.utils import six
|
from django.utils import six
|
||||||
from django.utils.timezone import make_aware, now
|
from django.utils.timezone import make_aware, now
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from django.views.generic import CreateView, UpdateView, ListView, DeleteView, View
|
from django.views.generic import CreateView, DeleteView, ListView, UpdateView, View
|
||||||
from django.http import HttpResponse
|
|
||||||
from django.http import HttpResponseRedirect
|
|
||||||
from django.shortcuts import get_object_or_404
|
|
||||||
from django.template.response import TemplateResponse
|
|
||||||
|
|
||||||
import eopayment
|
from .forms import PaymentBackendForm, RegieForm, TransactionExportForm
|
||||||
|
|
||||||
from .forms import RegieForm, PaymentBackendForm
|
|
||||||
from .forms import TransactionExportForm
|
|
||||||
from .models import BasketItem, PaymentBackend, Regie, Transaction
|
from .models import BasketItem, PaymentBackend, Regie, Transaction
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
|
||||||
import jsonfield.fields
|
import jsonfield.fields
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
|
||||||
import jsonfield.fields
|
import jsonfield.fields
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
|
||||||
import ckeditor.fields
|
import ckeditor.fields
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
import ckeditor.fields
|
import ckeditor.fields
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
import jsonfield.fields
|
import jsonfield.fields
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
import ckeditor.fields
|
import ckeditor.fields
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
from django.utils.timezone import utc
|
from django.utils.timezone import utc
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
from django.db import migrations, models
|
||||||
|
|
||||||
import combo.data.fields
|
import combo.data.fields
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
import jsonfield.fields
|
import jsonfield.fields
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
# Generated by Django 1.11.18 on 2019-04-26 09:59
|
# Generated by Django 1.11.18 on 2019-04-26 09:59
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
import django.db.models.deletion
|
import django.db.models.deletion
|
||||||
import jsonfield.fields
|
import jsonfield.fields
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
# Generated by Django 1.11.18 on 2019-04-26 10:02
|
# Generated by Django 1.11.18 on 2019-04-26 10:02
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
import django.db.models.deletion
|
import django.db.models.deletion
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
# Generated by Django 1.11.18 on 2019-05-14 12:02
|
# Generated by Django 1.11.18 on 2019-05-14 12:02
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
import jsonfield.fields
|
import jsonfield.fields
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
from combo.apps.lingo.models import SERVICES
|
from combo.apps.lingo.models import SERVICES
|
||||||
|
|
||||||
|
|
|
@ -17,40 +17,39 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
from decimal import Decimal
|
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import re
|
import re
|
||||||
|
from decimal import Decimal
|
||||||
|
|
||||||
from dateutil import parser
|
|
||||||
import eopayment
|
import eopayment
|
||||||
from jsonfield import JSONField
|
from dateutil import parser
|
||||||
from requests import RequestException
|
|
||||||
|
|
||||||
from django import template
|
from django import template
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
from django.contrib.auth.models import User
|
||||||
from django.core import serializers
|
from django.core import serializers
|
||||||
from django.db import models
|
|
||||||
from django.forms import models as model_forms, Select
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
|
||||||
from django.utils import timezone, dateparse, six
|
|
||||||
from django.core.mail import EmailMultiAlternatives
|
|
||||||
from django.urls import reverse
|
|
||||||
from django.core.exceptions import ObjectDoesNotExist, PermissionDenied, ValidationError
|
from django.core.exceptions import ObjectDoesNotExist, PermissionDenied, ValidationError
|
||||||
|
from django.core.mail import EmailMultiAlternatives
|
||||||
|
from django.db import models
|
||||||
|
from django.forms import Select
|
||||||
|
from django.forms import models as model_forms
|
||||||
|
from django.template.loader import render_to_string
|
||||||
|
from django.urls import reverse
|
||||||
|
from django.utils import dateparse, six, timezone
|
||||||
from django.utils.encoding import force_bytes, python_2_unicode_compatible
|
from django.utils.encoding import force_bytes, python_2_unicode_compatible
|
||||||
from django.utils.formats import localize
|
from django.utils.formats import localize
|
||||||
from django.utils.http import urlencode
|
from django.utils.http import urlencode
|
||||||
from django.utils.six.moves.urllib import parse as urlparse
|
from django.utils.six.moves.urllib import parse as urlparse
|
||||||
from django.utils.timezone import make_aware, utc
|
from django.utils.timezone import make_aware, utc
|
||||||
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
from jsonfield import JSONField
|
||||||
|
from requests import RequestException
|
||||||
|
|
||||||
from django.contrib.auth.models import User
|
|
||||||
from django.template.loader import render_to_string
|
|
||||||
|
|
||||||
from combo.data.fields import RichTextField
|
|
||||||
from combo.data.models import CellBase
|
|
||||||
from combo.data.library import register_cell_class
|
|
||||||
from combo.utils import NothingInCacheException, aes_hex_encrypt, requests
|
|
||||||
from combo.apps.notifications.models import Notification
|
from combo.apps.notifications.models import Notification
|
||||||
|
from combo.data.fields import RichTextField
|
||||||
|
from combo.data.library import register_cell_class
|
||||||
|
from combo.data.models import CellBase
|
||||||
|
from combo.utils import NothingInCacheException, aes_hex_encrypt, requests
|
||||||
|
|
||||||
from .utils import signing_dumps
|
from .utils import signing_dumps
|
||||||
|
|
||||||
|
|
|
@ -14,40 +14,40 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from django.conf.urls import url, include
|
from django.conf.urls import include, url
|
||||||
|
|
||||||
from combo.urls_utils import decorated_includes, manager_required
|
from combo.urls_utils import decorated_includes, manager_required
|
||||||
|
|
||||||
|
from .manager_views import (
|
||||||
|
BasketItemErrorListView,
|
||||||
|
BasketItemMarkAsNotifiedView,
|
||||||
|
PaymentBackendCreateView,
|
||||||
|
PaymentBackendDeleteView,
|
||||||
|
PaymentBackendListView,
|
||||||
|
PaymentBackendUpdateView,
|
||||||
|
RegieCreateView,
|
||||||
|
RegieDeleteView,
|
||||||
|
RegieListView,
|
||||||
|
RegieUpdateView,
|
||||||
|
TransactionListView,
|
||||||
|
download_transactions_csv,
|
||||||
|
)
|
||||||
from .views import (
|
from .views import (
|
||||||
RegiesApiView,
|
|
||||||
AddBasketItemApiView,
|
AddBasketItemApiView,
|
||||||
PayView,
|
BasketItemPayView,
|
||||||
CallbackView,
|
CallbackView,
|
||||||
ReturnView,
|
CancelItemView,
|
||||||
|
CancelTransactionApiView,
|
||||||
ItemDownloadView,
|
ItemDownloadView,
|
||||||
ItemView,
|
ItemView,
|
||||||
CancelItemView,
|
|
||||||
RemoveBasketItemApiView,
|
|
||||||
ValidateTransactionApiView,
|
|
||||||
CancelTransactionApiView,
|
|
||||||
SelfInvoiceView,
|
|
||||||
BasketItemPayView,
|
|
||||||
TransactionStatusApiView,
|
|
||||||
PaymentStatusView,
|
PaymentStatusView,
|
||||||
)
|
PayView,
|
||||||
from .manager_views import (
|
RegiesApiView,
|
||||||
RegieListView,
|
RemoveBasketItemApiView,
|
||||||
RegieCreateView,
|
ReturnView,
|
||||||
RegieUpdateView,
|
SelfInvoiceView,
|
||||||
RegieDeleteView,
|
TransactionStatusApiView,
|
||||||
TransactionListView,
|
ValidateTransactionApiView,
|
||||||
BasketItemErrorListView,
|
|
||||||
download_transactions_csv,
|
|
||||||
PaymentBackendListView,
|
|
||||||
PaymentBackendCreateView,
|
|
||||||
PaymentBackendUpdateView,
|
|
||||||
PaymentBackendDeleteView,
|
|
||||||
BasketItemMarkAsNotifiedView,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
lingo_manager_urls = [
|
lingo_manager_urls = [
|
||||||
|
|
|
@ -14,47 +14,52 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from decimal import Decimal, ROUND_HALF_UP
|
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import requests
|
from decimal import ROUND_HALF_UP, Decimal
|
||||||
|
|
||||||
from django.contrib.auth.models import User
|
|
||||||
from django.core.exceptions import ObjectDoesNotExist, PermissionDenied
|
|
||||||
from django.urls import reverse
|
|
||||||
from django.core import signing
|
|
||||||
from django.http import HttpResponse, HttpResponseNotFound, HttpResponseRedirect, HttpResponseBadRequest
|
|
||||||
from django.http import HttpResponseForbidden, Http404, JsonResponse
|
|
||||||
from django.template.response import TemplateResponse
|
|
||||||
from django.utils import timezone, dateparse, six
|
|
||||||
from django.utils.encoding import force_text
|
|
||||||
from django.utils.http import urlencode
|
|
||||||
from django.views.decorators.csrf import csrf_exempt
|
|
||||||
from django.views.generic import View, DetailView, ListView, TemplateView
|
|
||||||
from django.conf import settings
|
|
||||||
from django.contrib import messages
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
|
||||||
from django.db.transaction import atomic
|
|
||||||
from django.shortcuts import get_object_or_404
|
|
||||||
from django.utils.encoding import smart_text
|
|
||||||
|
|
||||||
import eopayment
|
import eopayment
|
||||||
|
import requests
|
||||||
|
from django.conf import settings
|
||||||
|
from django.contrib import messages
|
||||||
|
from django.contrib.auth.models import User
|
||||||
|
from django.core import signing
|
||||||
|
from django.core.exceptions import ObjectDoesNotExist, PermissionDenied
|
||||||
|
from django.db.transaction import atomic
|
||||||
|
from django.http import (
|
||||||
|
Http404,
|
||||||
|
HttpResponse,
|
||||||
|
HttpResponseBadRequest,
|
||||||
|
HttpResponseForbidden,
|
||||||
|
HttpResponseNotFound,
|
||||||
|
HttpResponseRedirect,
|
||||||
|
JsonResponse,
|
||||||
|
)
|
||||||
|
from django.shortcuts import get_object_or_404
|
||||||
|
from django.template.response import TemplateResponse
|
||||||
|
from django.urls import reverse
|
||||||
|
from django.utils import dateparse, six, timezone
|
||||||
|
from django.utils.encoding import force_text, smart_text
|
||||||
|
from django.utils.http import urlencode
|
||||||
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
from django.views.decorators.csrf import csrf_exempt
|
||||||
|
from django.views.generic import DetailView, ListView, TemplateView, View
|
||||||
|
|
||||||
from combo.data.models import Page
|
from combo.data.models import Page
|
||||||
from combo.utils import check_request_signature, aes_hex_decrypt, DecryptionError
|
|
||||||
from combo.profile.utils import get_user_from_name_id
|
from combo.profile.utils import get_user_from_name_id
|
||||||
from combo.public.views import publish_page
|
from combo.public.views import publish_page
|
||||||
|
from combo.utils import DecryptionError, aes_hex_decrypt, check_request_signature
|
||||||
|
|
||||||
from .models import (
|
from .models import (
|
||||||
Regie,
|
EXPIRED,
|
||||||
BasketItem,
|
BasketItem,
|
||||||
|
LingoBasketCell,
|
||||||
|
PaymentBackend,
|
||||||
|
Regie,
|
||||||
|
RemoteInvoiceException,
|
||||||
|
SelfDeclaredInvoicePayment,
|
||||||
Transaction,
|
Transaction,
|
||||||
TransactionOperation,
|
TransactionOperation,
|
||||||
LingoBasketCell,
|
|
||||||
SelfDeclaredInvoicePayment,
|
|
||||||
PaymentBackend,
|
|
||||||
EXPIRED,
|
|
||||||
RemoteInvoiceException,
|
|
||||||
)
|
)
|
||||||
from .utils import signing_dumps, signing_loads
|
from .utils import signing_dumps, signing_loads
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@ from django.utils.text import slugify
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from combo.data.fields import TemplatableURLField
|
from combo.data.fields import TemplatableURLField
|
||||||
|
|
||||||
from .models import MapLayer, MapLayerOptions
|
from .models import MapLayer, MapLayerOptions
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -14,17 +14,16 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from django.urls import reverse, reverse_lazy
|
|
||||||
from django.http import Http404
|
from django.http import Http404
|
||||||
from django.shortcuts import get_object_or_404
|
from django.shortcuts import get_object_or_404
|
||||||
|
from django.urls import reverse, reverse_lazy
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from django.views.generic import ListView, CreateView, UpdateView, DeleteView
|
from django.views.generic import CreateView, DeleteView, ListView, UpdateView
|
||||||
|
|
||||||
from combo.data.models import CellBase, PageSnapshot
|
from combo.data.models import CellBase, PageSnapshot
|
||||||
from .models import Map
|
|
||||||
from .models import MapLayer
|
|
||||||
from .models import MapLayerOptions
|
|
||||||
from .forms import MapLayerForm, MapLayerOptionsForm
|
from .forms import MapLayerForm, MapLayerOptionsForm
|
||||||
|
from .models import Map, MapLayer, MapLayerOptions
|
||||||
|
|
||||||
|
|
||||||
class MapLayerMixin(object):
|
class MapLayerMixin(object):
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from combo.apps.maps.models import ICONS
|
|
||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
from combo.apps.maps.models import ICONS
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
import django.db.models.deletion
|
import django.db.models.deletion
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
|
@ -16,25 +16,22 @@
|
||||||
|
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from django.core import serializers
|
import pyproj
|
||||||
from django.core import validators
|
from django import forms
|
||||||
|
from django.conf import settings
|
||||||
|
from django.core import serializers, validators
|
||||||
from django.db import models
|
from django.db import models
|
||||||
|
from django.urls import reverse
|
||||||
from django.utils import six
|
from django.utils import six
|
||||||
from django.utils.encoding import python_2_unicode_compatible
|
from django.utils.encoding import python_2_unicode_compatible
|
||||||
from django.utils.html import escape
|
from django.utils.html import escape
|
||||||
from django.utils.text import slugify
|
from django.utils.text import slugify
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from django.urls import reverse
|
|
||||||
from django import forms
|
|
||||||
from django.conf import settings
|
|
||||||
|
|
||||||
import pyproj
|
|
||||||
from requests.models import PreparedRequest
|
from requests.models import PreparedRequest
|
||||||
|
|
||||||
from combo.data.models import CellBase
|
|
||||||
from combo.data.library import register_cell_class
|
from combo.data.library import register_cell_class
|
||||||
from combo.utils import requests, get_templated_url
|
from combo.data.models import CellBase
|
||||||
|
from combo.utils import get_templated_url, requests
|
||||||
|
|
||||||
KIND = [
|
KIND = [
|
||||||
('tiles', _('Tiles')),
|
('tiles', _('Tiles')),
|
||||||
|
|
|
@ -14,12 +14,11 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from django.conf.urls import url, include
|
from django.conf.urls import include, url
|
||||||
|
|
||||||
from combo.urls_utils import decorated_includes, manager_required
|
from combo.urls_utils import decorated_includes, manager_required
|
||||||
|
|
||||||
from . import manager_views
|
from . import manager_views
|
||||||
|
|
||||||
from .views import GeojsonView
|
from .views import GeojsonView
|
||||||
|
|
||||||
maps_manager_urls = [
|
maps_manager_urls = [
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
from django.utils.timezone import utc
|
from django.utils.timezone import utc
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -14,20 +14,19 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import logging
|
|
||||||
import json
|
import json
|
||||||
|
import logging
|
||||||
|
|
||||||
from requests.exceptions import RequestException, HTTPError
|
|
||||||
|
|
||||||
from django.db import models
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
|
||||||
from django.template.defaultfilters import slugify
|
|
||||||
from django.forms import models as model_forms
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
from django.db import models
|
||||||
|
from django.forms import models as model_forms
|
||||||
|
from django.template.defaultfilters import slugify
|
||||||
from django.utils.http import urlencode
|
from django.utils.http import urlencode
|
||||||
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
from requests.exceptions import HTTPError, RequestException
|
||||||
|
|
||||||
from combo.data.models import CellBase
|
|
||||||
from combo.data.library import register_cell_class
|
from combo.data.library import register_cell_class
|
||||||
|
from combo.data.models import CellBase
|
||||||
from combo.utils import requests
|
from combo.utils import requests
|
||||||
|
|
||||||
from .forms import NewslettersManageForm
|
from .forms import NewslettersManageForm
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
from django.contrib.auth.decorators import login_required
|
|
||||||
from django.conf.urls import url
|
from django.conf.urls import url
|
||||||
|
from django.contrib.auth.decorators import login_required
|
||||||
|
|
||||||
from .views import NewslettersView
|
from .views import NewslettersView
|
||||||
|
|
||||||
|
|
|
@ -14,10 +14,10 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from django.views.generic import FormView
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
|
||||||
from django.contrib import messages
|
from django.contrib import messages
|
||||||
from django.http import HttpResponseRedirect
|
from django.http import HttpResponseRedirect
|
||||||
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
from django.views.generic import FormView
|
||||||
|
|
||||||
from .forms import NewslettersManageForm
|
from .forms import NewslettersManageForm
|
||||||
from .models import NewslettersCell, SubscriptionsSaveError
|
from .models import NewslettersCell, SubscriptionsSaveError
|
||||||
|
|
|
@ -15,8 +15,7 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from django.utils.encoding import force_text
|
from django.utils.encoding import force_text
|
||||||
|
from rest_framework import authentication, permissions, serializers, status
|
||||||
from rest_framework import authentication, serializers, permissions, status
|
|
||||||
from rest_framework.generics import GenericAPIView
|
from rest_framework.generics import GenericAPIView
|
||||||
from rest_framework.response import Response
|
from rest_framework.response import Response
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
from django.utils.timezone import utc
|
from django.utils.timezone import utc
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -18,16 +18,15 @@ import re
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from django.utils.encoding import force_text, python_2_unicode_compatible
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
|
||||||
from django.utils.timezone import now, timedelta
|
|
||||||
from django.db.models import Q
|
from django.db.models import Q
|
||||||
from django.db.models.query import QuerySet
|
from django.db.models.query import QuerySet
|
||||||
|
from django.utils.encoding import force_text, python_2_unicode_compatible
|
||||||
from combo.data.models import CellBase
|
from django.utils.timezone import now, timedelta
|
||||||
from combo.data.library import register_cell_class
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from combo.apps.pwa.models import PwaSettings
|
from combo.apps.pwa.models import PwaSettings
|
||||||
|
from combo.data.library import register_cell_class
|
||||||
|
from combo.data.models import CellBase
|
||||||
|
|
||||||
|
|
||||||
class NotificationQuerySet(QuerySet):
|
class NotificationQuerySet(QuerySet):
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
from django.conf.urls import url
|
from django.conf.urls import url
|
||||||
|
|
||||||
from .api_views import add, ack, forget, count
|
from .api_views import ack, add, count, forget
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
url('^api/notification/add/$', add, name='api-notification-add'),
|
url('^api/notification/add/$', add, name='api-notification-add'),
|
||||||
|
|
|
@ -14,17 +14,17 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from django.urls import reverse_lazy
|
|
||||||
from django.db.models import Max
|
|
||||||
from django import forms
|
from django import forms
|
||||||
|
from django.db.models import Max
|
||||||
from django.http import JsonResponse
|
from django.http import JsonResponse
|
||||||
|
from django.urls import reverse_lazy
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from django.views.generic import CreateView, UpdateView, DeleteView
|
from django.views.generic import CreateView, DeleteView, UpdateView
|
||||||
|
|
||||||
from combo.data.forms import get_page_choices
|
from combo.data.forms import get_page_choices
|
||||||
|
|
||||||
from .models import PwaSettings, PwaNavigationEntry
|
|
||||||
from .forms import PwaSettingsForm
|
from .forms import PwaSettingsForm
|
||||||
|
from .models import PwaNavigationEntry, PwaSettings
|
||||||
|
|
||||||
|
|
||||||
class ManagerHomeView(UpdateView):
|
class ManagerHomeView(UpdateView):
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
# Generated by Django 1.11.12 on 2018-11-29 09:45
|
# Generated by Django 1.11.12 on 2018-11-29 09:45
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.conf import settings
|
|
||||||
from django.db import migrations, models
|
|
||||||
import django.db.models.deletion
|
import django.db.models.deletion
|
||||||
import jsonfield.fields
|
import jsonfield.fields
|
||||||
|
from django.conf import settings
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
|
@ -2,9 +2,10 @@
|
||||||
# Generated by Django 1.11.12 on 2018-12-27 08:44
|
# Generated by Django 1.11.12 on 2018-12-27 08:44
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import combo.data.fields
|
|
||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
import combo.data.fields
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
# Generated by Django 1.11.12 on 2018-12-27 14:27
|
# Generated by Django 1.11.12 on 2018-12-27 14:27
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
import django.db.models.deletion
|
import django.db.models.deletion
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
# Generated by Django 1.11.12 on 2019-06-28 08:42
|
# Generated by Django 1.11.12 on 2019-06-28 08:42
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
import jsonfield.fields
|
import jsonfield.fields
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
|
@ -25,15 +25,14 @@ from django.core.files.base import ContentFile
|
||||||
from django.core.files.storage import default_storage
|
from django.core.files.storage import default_storage
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from django.utils import six
|
from django.utils import six
|
||||||
from django.utils.encoding import force_text, force_bytes
|
from django.utils.encoding import force_bytes, force_text
|
||||||
from django.utils.six import BytesIO
|
from django.utils.six import BytesIO
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
from jsonfield import JSONField
|
||||||
from py_vapid import Vapid
|
from py_vapid import Vapid
|
||||||
|
|
||||||
from jsonfield import JSONField
|
|
||||||
from combo.data.fields import RichTextField
|
|
||||||
from combo import utils
|
from combo import utils
|
||||||
|
from combo.data.fields import RichTextField
|
||||||
|
|
||||||
|
|
||||||
class PwaSettings(models.Model):
|
class PwaSettings(models.Model):
|
||||||
|
|
|
@ -17,12 +17,11 @@
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
import pywebpush
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.db.models.signals import post_save
|
from django.db.models.signals import post_save
|
||||||
from django.dispatch import receiver
|
from django.dispatch import receiver
|
||||||
|
|
||||||
from py_vapid import Vapid
|
from py_vapid import Vapid
|
||||||
import pywebpush
|
|
||||||
|
|
||||||
from combo.apps.notifications.models import Notification
|
from combo.apps.notifications.models import Notification
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,6 @@ from django.conf import settings
|
||||||
|
|
||||||
from combo.apps.pwa.models import PwaNavigationEntry
|
from combo.apps.pwa.models import PwaNavigationEntry
|
||||||
|
|
||||||
|
|
||||||
register = template.Library()
|
register = template.Library()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -14,26 +14,25 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from django.conf.urls import url, include
|
from django.conf.urls import include, url
|
||||||
|
|
||||||
from combo.urls_utils import decorated_includes, manager_required
|
from combo.urls_utils import decorated_includes, manager_required
|
||||||
|
|
||||||
from .manager_views import (
|
from .manager_views import (
|
||||||
ManagerHomeView,
|
|
||||||
ManagerAddNavigationEntry,
|
ManagerAddNavigationEntry,
|
||||||
ManagerEditNavigationEntry,
|
|
||||||
ManagerDeleteNavigationEntry,
|
ManagerDeleteNavigationEntry,
|
||||||
|
ManagerEditNavigationEntry,
|
||||||
|
ManagerHomeView,
|
||||||
manager_navigation_order,
|
manager_navigation_order,
|
||||||
)
|
)
|
||||||
from .views import (
|
from .views import (
|
||||||
manifest_json,
|
manifest_json,
|
||||||
|
offline_page,
|
||||||
service_worker_js,
|
service_worker_js,
|
||||||
service_worker_registration_js,
|
service_worker_registration_js,
|
||||||
subscribe_push,
|
subscribe_push,
|
||||||
offline_page,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
pwa_manager_urls = [
|
pwa_manager_urls = [
|
||||||
url('^$', ManagerHomeView.as_view(), name='pwa-manager-homepage'),
|
url('^$', ManagerHomeView.as_view(), name='pwa-manager-homepage'),
|
||||||
url('^navigation/add/$', ManagerAddNavigationEntry.as_view(), name='pwa-manager-navigation-add'),
|
url('^navigation/add/$', ManagerAddNavigationEntry.as_view(), name='pwa-manager-navigation-add'),
|
||||||
|
|
|
@ -17,20 +17,19 @@
|
||||||
import base64
|
import base64
|
||||||
import json
|
import json
|
||||||
|
|
||||||
|
from cryptography.hazmat.primitives import serialization
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
from django.http import Http404, HttpResponse, HttpResponseBadRequest, HttpResponseForbidden, JsonResponse
|
||||||
from django.http import HttpResponse, HttpResponseForbidden, Http404, JsonResponse, HttpResponseBadRequest
|
from django.template.loader import TemplateDoesNotExist, get_template
|
||||||
from django.template.loader import get_template, TemplateDoesNotExist
|
from django.utils.encoding import force_bytes, force_text
|
||||||
from django.utils.encoding import force_text, force_bytes
|
|
||||||
from django.views.decorators.csrf import csrf_exempt
|
from django.views.decorators.csrf import csrf_exempt
|
||||||
from django.views.generic import TemplateView
|
from django.views.generic import TemplateView
|
||||||
|
|
||||||
from cryptography.hazmat.primitives import serialization
|
|
||||||
from py_vapid import Vapid
|
from py_vapid import Vapid
|
||||||
|
|
||||||
from .models import PushSubscription, PwaSettings
|
|
||||||
from combo import VERSION
|
from combo import VERSION
|
||||||
|
|
||||||
|
from .models import PushSubscription, PwaSettings
|
||||||
|
|
||||||
|
|
||||||
def manifest_json(request, *args, **kwargs):
|
def manifest_json(request, *args, **kwargs):
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -18,8 +18,9 @@ from django import forms
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from combo.data.models import Page
|
from combo.data.models import Page
|
||||||
from .models import SearchCell
|
|
||||||
from . import engines
|
from . import engines
|
||||||
|
from .models import SearchCell
|
||||||
|
|
||||||
|
|
||||||
class SearchCellForm(forms.ModelForm):
|
class SearchCellForm(forms.ModelForm):
|
||||||
|
|
|
@ -14,14 +14,12 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from django.http import HttpResponse
|
from django.http import HttpResponse, HttpResponseRedirect
|
||||||
from django.http import HttpResponseRedirect
|
from django.shortcuts import get_object_or_404, render
|
||||||
from django.shortcuts import get_object_or_404
|
|
||||||
from django.shortcuts import render
|
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from combo.apps.search.forms import TextEngineSettingsForm, CardsEngineSettingsForm
|
from combo.apps.search.forms import CardsEngineSettingsForm, TextEngineSettingsForm
|
||||||
from combo.apps.search.models import SearchCell
|
from combo.apps.search.models import SearchCell
|
||||||
from combo.data.models import PageSnapshot
|
from combo.data.models import PageSnapshot
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import migrations
|
|
||||||
import jsonfield.fields
|
import jsonfield.fields
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue