diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index bbf59cb1..8872da09 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -7,10 +7,10 @@ repos:
- id: pyupgrade
args: ['--keep-percent-format', '--py37-plus']
- repo: https://github.com/adamchainz/django-upgrade
- rev: 1.10.0
+ rev: 1.13.0
hooks:
- id: django-upgrade
- args: ['--target-version', '2.2']
+ args: ['--target-version', '3.2']
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
diff --git a/README b/README
index cadd522d..7b8017bf 100644
--- a/README
+++ b/README
@@ -110,7 +110,7 @@ djhtml is used to automatically indent html files, using those parameters:
django-upgrade is used to automatically upgrade Django syntax, using those parameters:
- django-upgrade --target-version 2.2
+ django-upgrade --target-version 3.2
There is .pre-commit-config.yaml to use pre-commit to automatically run these tools
before commits. (execute `pre-commit install` to install the git hook.)
diff --git a/combo/apps/assets/__init__.py b/combo/apps/assets/__init__.py
index 86c7cbbc..a1a1db19 100644
--- a/combo/apps/assets/__init__.py
+++ b/combo/apps/assets/__init__.py
@@ -30,6 +30,3 @@ class AppConfig(django.apps.AppConfig):
def get_extra_manager_actions(self):
return [{'href': reverse('combo-manager-assets'), 'text': _('Assets')}]
-
-
-default_app_config = 'combo.apps.assets.AppConfig'
diff --git a/combo/apps/calendar/__init__.py b/combo/apps/calendar/__init__.py
index e1948718..f6ff5296 100644
--- a/combo/apps/calendar/__init__.py
+++ b/combo/apps/calendar/__init__.py
@@ -26,6 +26,3 @@ class AppConfig(django.apps.AppConfig):
from . import urls
return urls.urlpatterns
-
-
-default_app_config = 'combo.apps.calendar.AppConfig'
diff --git a/combo/apps/dashboard/__init__.py b/combo/apps/dashboard/__init__.py
index abf21da6..de3d4194 100644
--- a/combo/apps/dashboard/__init__.py
+++ b/combo/apps/dashboard/__init__.py
@@ -34,6 +34,3 @@ class AppConfig(django.apps.AppConfig):
ConfigJsonCell.objects.filter(
placeholder='_auto_tile', last_update_timestamp__lte=now() - timedelta(days=2)
).delete()
-
-
-default_app_config = 'combo.apps.dashboard.AppConfig'
diff --git a/combo/apps/dataviz/__init__.py b/combo/apps/dataviz/__init__.py
index fbfc8484..cdacd097 100644
--- a/combo/apps/dataviz/__init__.py
+++ b/combo/apps/dataviz/__init__.py
@@ -34,6 +34,3 @@ class AppConfig(django.apps.AppConfig):
update_available_statistics()
for cell in ChartNgCell.objects.all():
cell.check_validity()
-
-
-default_app_config = 'combo.apps.dataviz.AppConfig'
diff --git a/combo/apps/dataviz/migrations/0010_auto_20190328_1111.py b/combo/apps/dataviz/migrations/0010_auto_20190328_1111.py
index a2d41f2e..83653730 100644
--- a/combo/apps/dataviz/migrations/0010_auto_20190328_1111.py
+++ b/combo/apps/dataviz/migrations/0010_auto_20190328_1111.py
@@ -1,8 +1,8 @@
# Generated by Django 1.11.12 on 2019-03-28 10:11
import django.db.models.deletion
-from django.contrib.postgres.fields import JSONField
from django.db import migrations, models
+from django.db.models import JSONField
class Migration(migrations.Migration):
diff --git a/combo/apps/dataviz/migrations/0015_auto_20201202_1424.py b/combo/apps/dataviz/migrations/0015_auto_20201202_1424.py
index 562c9bb9..b056f3f7 100644
--- a/combo/apps/dataviz/migrations/0015_auto_20201202_1424.py
+++ b/combo/apps/dataviz/migrations/0015_auto_20201202_1424.py
@@ -1,7 +1,7 @@
# Generated by Django 1.11.29 on 2020-12-02 13:24
-from django.contrib.postgres.fields import JSONField
from django.db import migrations
+from django.db.models import JSONField
class Migration(migrations.Migration):
diff --git a/combo/apps/dataviz/models.py b/combo/apps/dataviz/models.py
index 18948fea..1812d658 100644
--- a/combo/apps/dataviz/models.py
+++ b/combo/apps/dataviz/models.py
@@ -24,8 +24,8 @@ import pygal
import pygal.util
from dateutil.relativedelta import MO, relativedelta
from django.conf import settings
-from django.contrib.postgres.fields import JSONField
from django.db import models, transaction
+from django.db.models import JSONField
from django.template import RequestContext, Template, TemplateSyntaxError, VariableDoesNotExist
from django.template.defaultfilters import date as format_date
from django.urls import reverse
diff --git a/combo/apps/dataviz/widgets.py b/combo/apps/dataviz/widgets.py
index 4d62be75..98148612 100644
--- a/combo/apps/dataviz/widgets.py
+++ b/combo/apps/dataviz/widgets.py
@@ -1,4 +1,3 @@
-import django
from django import forms
@@ -23,15 +22,8 @@ class MultiSelectWidget(forms.MultiWidget):
self.widgets.append(forms.Select(attrs=self.attrs, choices=self.choices))
# all subwidgets must have the same name
- if django.VERSION >= (3, 1):
- self.widgets_names = [''] * len(self.widgets)
- return super().get_context(name, value, attrs)
- else:
- context = super().get_context(name, value, attrs)
- subwidgets = context['widget']['subwidgets']
- for widget in subwidgets:
- widget['name'] = widget['name'].rsplit('_', 1)[0]
- return context
+ self.widgets_names = [''] * len(self.widgets)
+ return super().get_context(name, value, attrs)
def decompress(self, value):
return value or []
diff --git a/combo/apps/family/__init__.py b/combo/apps/family/__init__.py
index 2a5df971..ef2d7c01 100644
--- a/combo/apps/family/__init__.py
+++ b/combo/apps/family/__init__.py
@@ -21,6 +21,3 @@ from django.utils.translation import gettext_lazy as _
class AppConfig(django.apps.AppConfig):
name = 'combo.apps.family'
verbose_name = _('Family')
-
-
-default_app_config = 'combo.apps.family.AppConfig'
diff --git a/combo/apps/fargo/__init__.py b/combo/apps/fargo/__init__.py
index 2cb64c5a..d9cf043f 100644
--- a/combo/apps/fargo/__init__.py
+++ b/combo/apps/fargo/__init__.py
@@ -21,6 +21,3 @@ from django.utils.translation import gettext_lazy as _
class AppConfig(django.apps.AppConfig):
name = 'combo.apps.fargo'
verbose_name = _('Portfolio')
-
-
-default_app_config = 'combo.apps.fargo.AppConfig'
diff --git a/combo/apps/gallery/__init__.py b/combo/apps/gallery/__init__.py
index 6d7fa885..a5b10e4b 100644
--- a/combo/apps/gallery/__init__.py
+++ b/combo/apps/gallery/__init__.py
@@ -26,6 +26,3 @@ class AppConfig(django.apps.AppConfig):
from . import urls
return urls.urlpatterns
-
-
-default_app_config = 'combo.apps.gallery.AppConfig'
diff --git a/combo/apps/kb/__init__.py b/combo/apps/kb/__init__.py
index b9f7a7ee..4d260d03 100644
--- a/combo/apps/kb/__init__.py
+++ b/combo/apps/kb/__init__.py
@@ -21,6 +21,3 @@ from django.utils.translation import gettext_lazy as _
class AppConfig(django.apps.AppConfig):
name = 'combo.apps.kb'
verbose_name = _('Knowledge Base')
-
-
-default_app_config = 'combo.apps.kb.AppConfig'
diff --git a/combo/apps/lingo/__init__.py b/combo/apps/lingo/__init__.py
index 1ff71f44..87bf8752 100644
--- a/combo/apps/lingo/__init__.py
+++ b/combo/apps/lingo/__init__.py
@@ -100,6 +100,3 @@ class AppConfig(django.apps.AppConfig):
item.notify_payment()
except Exception:
logger.exception('error in async notification for basket item %s', item.id)
-
-
-default_app_config = 'combo.apps.lingo.AppConfig'
diff --git a/combo/apps/lingo/admin.py b/combo/apps/lingo/admin.py
index 8e7fdaa0..bb072afb 100644
--- a/combo/apps/lingo/admin.py
+++ b/combo/apps/lingo/admin.py
@@ -19,8 +19,6 @@ from django.contrib import admin
from .models import Regie
+@admin.register(Regie)
class RegieAdmin(admin.ModelAdmin):
prepopulated_fields = {'slug': ('label',)}
-
-
-admin.site.register(Regie, RegieAdmin)
diff --git a/combo/apps/lingo/migrations/0001_initial.py b/combo/apps/lingo/migrations/0001_initial.py
index 8d154e5f..dbad9c19 100644
--- a/combo/apps/lingo/migrations/0001_initial.py
+++ b/combo/apps/lingo/migrations/0001_initial.py
@@ -1,6 +1,6 @@
from django.conf import settings
-from django.contrib.postgres.fields import JSONField
from django.db import migrations, models
+from django.db.models import JSONField
class Migration(migrations.Migration):
diff --git a/combo/apps/lingo/migrations/0002_transaction.py b/combo/apps/lingo/migrations/0002_transaction.py
index 9a6fccf5..2171c1c0 100644
--- a/combo/apps/lingo/migrations/0002_transaction.py
+++ b/combo/apps/lingo/migrations/0002_transaction.py
@@ -1,5 +1,5 @@
-from django.contrib.postgres.fields import JSONField
from django.db import migrations, models
+from django.db.models import JSONField
class Migration(migrations.Migration):
diff --git a/combo/apps/lingo/migrations/0021_transactionoperation.py b/combo/apps/lingo/migrations/0021_transactionoperation.py
index e3ac5594..645b2be2 100644
--- a/combo/apps/lingo/migrations/0021_transactionoperation.py
+++ b/combo/apps/lingo/migrations/0021_transactionoperation.py
@@ -1,5 +1,5 @@
-from django.contrib.postgres.fields import JSONField
from django.db import migrations, models
+from django.db.models import JSONField
class Migration(migrations.Migration):
diff --git a/combo/apps/lingo/migrations/0029_auto_20170528_1334.py b/combo/apps/lingo/migrations/0029_auto_20170528_1334.py
index 9c97ecc9..1231f055 100644
--- a/combo/apps/lingo/migrations/0029_auto_20170528_1334.py
+++ b/combo/apps/lingo/migrations/0029_auto_20170528_1334.py
@@ -1,5 +1,5 @@
-from django.contrib.postgres.fields import JSONField
from django.db import migrations, models
+from django.db.models import JSONField
class Migration(migrations.Migration):
diff --git a/combo/apps/lingo/migrations/0034_auto_20190426_1159.py b/combo/apps/lingo/migrations/0034_auto_20190426_1159.py
index 0b05603f..89994521 100644
--- a/combo/apps/lingo/migrations/0034_auto_20190426_1159.py
+++ b/combo/apps/lingo/migrations/0034_auto_20190426_1159.py
@@ -1,8 +1,8 @@
# Generated by Django 1.11.18 on 2019-04-26 09:59
import django.db.models.deletion
-from django.contrib.postgres.fields import JSONField
from django.db import migrations, models
+from django.db.models import JSONField
class Migration(migrations.Migration):
diff --git a/combo/apps/lingo/migrations/0037_regie_transaction_options.py b/combo/apps/lingo/migrations/0037_regie_transaction_options.py
index 9b0f7869..3b7f6a2e 100644
--- a/combo/apps/lingo/migrations/0037_regie_transaction_options.py
+++ b/combo/apps/lingo/migrations/0037_regie_transaction_options.py
@@ -1,7 +1,7 @@
# Generated by Django 1.11.18 on 2019-05-14 12:02
-from django.contrib.postgres.fields import JSONField
from django.db import migrations, models
+from django.db.models import JSONField
from combo.apps.lingo.models import SERVICES
diff --git a/combo/apps/lingo/models.py b/combo/apps/lingo/models.py
index 076d3a51..1be94b85 100644
--- a/combo/apps/lingo/models.py
+++ b/combo/apps/lingo/models.py
@@ -27,11 +27,11 @@ import eopayment
from dateutil import parser
from django import template
from django.conf import settings
-from django.contrib.postgres.fields import JSONField
from django.core import serializers
from django.core.exceptions import ObjectDoesNotExist, PermissionDenied
from django.core.mail import EmailMultiAlternatives
from django.db import models
+from django.db.models import JSONField
from django.db.transaction import atomic
from django.forms import Select
from django.forms import models as model_forms
diff --git a/combo/apps/maps/__init__.py b/combo/apps/maps/__init__.py
index f5052af2..96c3ae7a 100644
--- a/combo/apps/maps/__init__.py
+++ b/combo/apps/maps/__init__.py
@@ -30,6 +30,3 @@ class AppConfig(django.apps.AppConfig):
def get_extra_manager_actions(self):
return [{'href': reverse('maps-manager-homepage'), 'text': _('Maps')}]
-
-
-default_app_config = 'combo.apps.maps.AppConfig'
diff --git a/combo/apps/notifications/__init__.py b/combo/apps/notifications/__init__.py
index c64ca77b..c9ca34dc 100644
--- a/combo/apps/notifications/__init__.py
+++ b/combo/apps/notifications/__init__.py
@@ -26,6 +26,3 @@ class AppConfig(django.apps.AppConfig):
from . import urls
return urls.urlpatterns
-
-
-default_app_config = 'combo.apps.notifications.AppConfig'
diff --git a/combo/apps/publik/__init__.py b/combo/apps/publik/__init__.py
index 70d59bf8..b8975a08 100644
--- a/combo/apps/publik/__init__.py
+++ b/combo/apps/publik/__init__.py
@@ -24,6 +24,3 @@ class AppConfig(django.apps.AppConfig):
from . import urls
return urls.urlpatterns
-
-
-default_app_config = 'combo.apps.publik.AppConfig'
diff --git a/combo/apps/pwa/__init__.py b/combo/apps/pwa/__init__.py
index 46b5538d..bf1078ad 100644
--- a/combo/apps/pwa/__init__.py
+++ b/combo/apps/pwa/__init__.py
@@ -36,6 +36,3 @@ class AppConfig(django.apps.AppConfig):
if settings.TEMPLATE_VARS.get('pwa_display') == 'standalone':
return [{'href': reverse('pwa-manager-homepage'), 'text': _('Mobile Application (PWA)')}]
return []
-
-
-default_app_config = 'combo.apps.pwa.AppConfig'
diff --git a/combo/apps/pwa/migrations/0001_initial.py b/combo/apps/pwa/migrations/0001_initial.py
index 78645bfa..99ff41c8 100644
--- a/combo/apps/pwa/migrations/0001_initial.py
+++ b/combo/apps/pwa/migrations/0001_initial.py
@@ -2,8 +2,8 @@
import django.db.models.deletion
from django.conf import settings
-from django.contrib.postgres.fields import JSONField
from django.db import migrations, models
+from django.db.models import JSONField
class Migration(migrations.Migration):
diff --git a/combo/apps/pwa/migrations/0006_auto_20190628_1042.py b/combo/apps/pwa/migrations/0006_auto_20190628_1042.py
index 345c6571..4ccd029e 100644
--- a/combo/apps/pwa/migrations/0006_auto_20190628_1042.py
+++ b/combo/apps/pwa/migrations/0006_auto_20190628_1042.py
@@ -1,7 +1,7 @@
# Generated by Django 1.11.12 on 2019-06-28 08:42
-from django.contrib.postgres.fields import JSONField
from django.db import migrations, models
+from django.db.models import JSONField
class Migration(migrations.Migration):
diff --git a/combo/apps/pwa/models.py b/combo/apps/pwa/models.py
index d9aebdc8..acfd9d47 100644
--- a/combo/apps/pwa/models.py
+++ b/combo/apps/pwa/models.py
@@ -20,11 +20,11 @@ import json
import os
from django.conf import settings
-from django.contrib.postgres.fields import JSONField
from django.core import serializers
from django.core.files.base import ContentFile
from django.core.files.storage import default_storage
from django.db import models
+from django.db.models import JSONField
from django.utils.encoding import force_bytes, force_str
from django.utils.translation import gettext_lazy as _
from py_vapid import Vapid
diff --git a/combo/apps/search/__init__.py b/combo/apps/search/__init__.py
index e15981d9..5ddddf03 100644
--- a/combo/apps/search/__init__.py
+++ b/combo/apps/search/__init__.py
@@ -48,6 +48,3 @@ class AppConfig(django.apps.AppConfig):
'label': _('Page Contents'),
}
}
-
-
-default_app_config = 'combo.apps.search.AppConfig'
diff --git a/combo/apps/search/migrations/0002_auto_20180720_1511.py b/combo/apps/search/migrations/0002_auto_20180720_1511.py
index 1f89aa1c..cfbaee2a 100644
--- a/combo/apps/search/migrations/0002_auto_20180720_1511.py
+++ b/combo/apps/search/migrations/0002_auto_20180720_1511.py
@@ -1,5 +1,5 @@
-from django.contrib.postgres.fields import JSONField
from django.db import migrations
+from django.db.models import JSONField
class Migration(migrations.Migration):
diff --git a/combo/apps/search/models.py b/combo/apps/search/models.py
index 9d147f2e..f6b7bb59 100644
--- a/combo/apps/search/models.py
+++ b/combo/apps/search/models.py
@@ -18,9 +18,9 @@ from django import template
from django.contrib.auth.models import Group
from django.contrib.contenttypes import fields
from django.contrib.contenttypes.models import ContentType
-from django.contrib.postgres.fields import JSONField
from django.core.exceptions import PermissionDenied
from django.db import models
+from django.db.models import JSONField
from django.http import HttpResponse, HttpResponseBadRequest
from django.shortcuts import get_object_or_404
from django.template import RequestContext, Template
diff --git a/combo/apps/wcs/__init__.py b/combo/apps/wcs/__init__.py
index 6c5fe5e8..7a14bdaa 100644
--- a/combo/apps/wcs/__init__.py
+++ b/combo/apps/wcs/__init__.py
@@ -135,6 +135,3 @@ class AppConfig(django.apps.AppConfig):
]
for cell in CellBase.get_cells(cell_filter=lambda x: x in models_to_update):
cell.save()
-
-
-default_app_config = 'combo.apps.wcs.AppConfig'
diff --git a/combo/apps/wcs/migrations/0008_wcsformcell_cached_json.py b/combo/apps/wcs/migrations/0008_wcsformcell_cached_json.py
index 643da0fe..d75a46a6 100644
--- a/combo/apps/wcs/migrations/0008_wcsformcell_cached_json.py
+++ b/combo/apps/wcs/migrations/0008_wcsformcell_cached_json.py
@@ -1,5 +1,5 @@
-from django.contrib.postgres.fields import JSONField
from django.db import migrations
+from django.db.models import JSONField
class Migration(migrations.Migration):
diff --git a/combo/apps/wcs/migrations/0012_wcsformsofcategorycell_manual_order.py b/combo/apps/wcs/migrations/0012_wcsformsofcategorycell_manual_order.py
index 7e976009..dff639f1 100644
--- a/combo/apps/wcs/migrations/0012_wcsformsofcategorycell_manual_order.py
+++ b/combo/apps/wcs/migrations/0012_wcsformsofcategorycell_manual_order.py
@@ -1,5 +1,5 @@
-from django.contrib.postgres.fields import JSONField
from django.db import migrations, models
+from django.db.models import JSONField
class Migration(migrations.Migration):
diff --git a/combo/apps/wcs/migrations/0015_wcscurrentformscell_categories.py b/combo/apps/wcs/migrations/0015_wcscurrentformscell_categories.py
index 2c1d9429..6756f52e 100644
--- a/combo/apps/wcs/migrations/0015_wcscurrentformscell_categories.py
+++ b/combo/apps/wcs/migrations/0015_wcscurrentformscell_categories.py
@@ -1,7 +1,7 @@
# Generated by Django 1.11.8 on 2018-01-21 12:50
-from django.contrib.postgres.fields import JSONField
from django.db import migrations
+from django.db.models import JSONField
class Migration(migrations.Migration):
diff --git a/combo/apps/wcs/migrations/0018_wcscurrentdraftscell_categories.py b/combo/apps/wcs/migrations/0018_wcscurrentdraftscell_categories.py
index ca27dcb2..e1bb492a 100644
--- a/combo/apps/wcs/migrations/0018_wcscurrentdraftscell_categories.py
+++ b/combo/apps/wcs/migrations/0018_wcscurrentdraftscell_categories.py
@@ -1,5 +1,5 @@
-from django.contrib.postgres.fields import JSONField
from django.db import migrations
+from django.db.models import JSONField
class Migration(migrations.Migration):
diff --git a/combo/apps/wcs/migrations/0021_card.py b/combo/apps/wcs/migrations/0021_card.py
index a57d66c9..f6460642 100644
--- a/combo/apps/wcs/migrations/0021_card.py
+++ b/combo/apps/wcs/migrations/0021_card.py
@@ -1,6 +1,6 @@
import django.db.models.deletion
-from django.contrib.postgres.fields import JSONField
from django.db import migrations, models
+from django.db.models import JSONField
import combo.apps.wcs.models
diff --git a/combo/apps/wcs/migrations/0025_submission_categories.py b/combo/apps/wcs/migrations/0025_submission_categories.py
index 16675856..80fb4a2c 100644
--- a/combo/apps/wcs/migrations/0025_submission_categories.py
+++ b/combo/apps/wcs/migrations/0025_submission_categories.py
@@ -1,5 +1,5 @@
-from django.contrib.postgres.fields import JSONField
from django.db import migrations
+from django.db.models import JSONField
class Migration(migrations.Migration):
diff --git a/combo/apps/wcs/migrations/0027_careforms_categories.py b/combo/apps/wcs/migrations/0027_careforms_categories.py
index e17ca475..cb145ae9 100644
--- a/combo/apps/wcs/migrations/0027_careforms_categories.py
+++ b/combo/apps/wcs/migrations/0027_careforms_categories.py
@@ -1,5 +1,5 @@
-from django.contrib.postgres.fields import JSONField
from django.db import migrations
+from django.db.models import JSONField
class Migration(migrations.Migration):
diff --git a/combo/apps/wcs/models.py b/combo/apps/wcs/models.py
index 477f422f..ced9fc4c 100644
--- a/combo/apps/wcs/models.py
+++ b/combo/apps/wcs/models.py
@@ -20,8 +20,8 @@ import copy
import logging
from django.conf import settings
-from django.contrib.postgres.fields import JSONField
from django.db import models
+from django.db.models import JSONField
from django.forms import Select
from django.forms import models as model_forms
from django.template import Context, RequestContext, Template, TemplateSyntaxError, VariableDoesNotExist
diff --git a/combo/apps/wcs/views.py b/combo/apps/wcs/views.py
index aaa3967d..74eebe7e 100644
--- a/combo/apps/wcs/views.py
+++ b/combo/apps/wcs/views.py
@@ -16,13 +16,13 @@
import re
import urllib.parse
+from urllib.parse import quote
import ratelimit.utils
from django.conf import settings
from django.contrib import messages
from django.core.exceptions import DisallowedRedirect, PermissionDenied
from django.http import HttpResponseBadRequest, HttpResponseForbidden, HttpResponseRedirect, JsonResponse
-from django.utils.http import urlquote
from django.utils.translation import gettext_lazy as _
from django.views.decorators.csrf import csrf_exempt
from django.views.generic import View
@@ -63,7 +63,7 @@ class TrackingCodeView(View):
for wcs_site in wcs_sites:
if not wcs_site:
continue
- response = requests.get('/api/code/' + urlquote(code), remote_service=wcs_site, log_errors=False)
+ response = requests.get('/api/code/' + quote(code), remote_service=wcs_site, log_errors=False)
if response.status_code == 200 and response.json().get('err') == 0:
return response.json().get('load_url')
diff --git a/combo/data/__init__.py b/combo/data/__init__.py
index 24663bc6..e69de29b 100644
--- a/combo/data/__init__.py
+++ b/combo/data/__init__.py
@@ -1 +0,0 @@
-default_app_config = 'combo.data.apps.DataConfig'
diff --git a/combo/data/management/commands/ensure_jsonb.py b/combo/data/management/commands/ensure_jsonb.py
index 8d6738f2..17cef6ef 100644
--- a/combo/data/management/commands/ensure_jsonb.py
+++ b/combo/data/management/commands/ensure_jsonb.py
@@ -15,9 +15,9 @@
# along with this program. If not, see .
from django.apps import apps
-from django.contrib.postgres.fields import JSONField
from django.core.management.base import BaseCommand, CommandError
from django.db import connection
+from django.db.models import JSONField
class Command(BaseCommand):
diff --git a/combo/data/migrations/0013_parameterscell.py b/combo/data/migrations/0013_parameterscell.py
index a1f18d47..e6b8a3cf 100644
--- a/combo/data/migrations/0013_parameterscell.py
+++ b/combo/data/migrations/0013_parameterscell.py
@@ -1,5 +1,5 @@
-from django.contrib.postgres.fields import JSONField
from django.db import migrations, models
+from django.db.models import JSONField
class Migration(migrations.Migration):
diff --git a/combo/data/migrations/0024_configjsoncell.py b/combo/data/migrations/0024_configjsoncell.py
index a7847d4e..f4eb5a2a 100644
--- a/combo/data/migrations/0024_configjsoncell.py
+++ b/combo/data/migrations/0024_configjsoncell.py
@@ -1,5 +1,5 @@
-from django.contrib.postgres.fields import JSONField
from django.db import migrations, models
+from django.db.models import JSONField
class Migration(migrations.Migration):
diff --git a/combo/data/migrations/0033_auto_20180401_1300.py b/combo/data/migrations/0033_auto_20180401_1300.py
index 2a5cbfc6..e5020078 100644
--- a/combo/data/migrations/0033_auto_20180401_1300.py
+++ b/combo/data/migrations/0033_auto_20180401_1300.py
@@ -2,8 +2,8 @@
import django.db.models.deletion
from django.conf import settings
-from django.contrib.postgres.fields import JSONField
from django.db import migrations, models
+from django.db.models import JSONField
class Migration(migrations.Migration):
diff --git a/combo/data/migrations/0035_page_related_cells.py b/combo/data/migrations/0035_page_related_cells.py
index 5cd9a558..7f4417bb 100644
--- a/combo/data/migrations/0035_page_related_cells.py
+++ b/combo/data/migrations/0035_page_related_cells.py
@@ -1,7 +1,7 @@
# Generated by Django 1.11.12 on 2018-06-02 11:03
-from django.contrib.postgres.fields import JSONField
from django.db import migrations
+from django.db.models import JSONField
class Migration(migrations.Migration):
diff --git a/combo/data/models.py b/combo/data/models.py
index dc2a79be..0c0a3b9b 100644
--- a/combo/data/models.py
+++ b/combo/data/models.py
@@ -35,12 +35,11 @@ from django.contrib import messages
from django.contrib.auth.models import Group
from django.contrib.contenttypes.fields import GenericForeignKey, GenericRelation
from django.contrib.contenttypes.models import ContentType
-from django.contrib.postgres.fields import JSONField
from django.core import serializers
from django.core.cache import cache
from django.core.exceptions import ObjectDoesNotExist, PermissionDenied, ValidationError
from django.db import models, transaction
-from django.db.models import Max, Q
+from django.db.models import JSONField, Max, Q
from django.db.models.base import ModelBase
from django.db.models.signals import post_delete, post_save, pre_save
from django.dispatch import receiver
diff --git a/combo/manager/__init__.py b/combo/manager/__init__.py
index 056047e1..f6e18caf 100644
--- a/combo/manager/__init__.py
+++ b/combo/manager/__init__.py
@@ -13,5 +13,3 @@
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see .
-
-default_app_config = 'combo.manager.apps.ManagerAppConfig'
diff --git a/combo/profile/__init__.py b/combo/profile/__init__.py
index 2636dbd4..76a13eaa 100644
--- a/combo/profile/__init__.py
+++ b/combo/profile/__init__.py
@@ -76,6 +76,3 @@ class AppConfig(django.apps.AppConfig):
'hit_description_template': default_description_template,
}
}
-
-
-default_app_config = 'combo.profile.AppConfig'
diff --git a/combo/settings.py b/combo/settings.py
index eb72cc8b..89eb311c 100644
--- a/combo/settings.py
+++ b/combo/settings.py
@@ -141,7 +141,7 @@ WSGI_APPLICATION = 'combo.wsgi.application'
DATABASES = {
'default': {
- 'ENGINE': 'django.db.backends.postgresql_psycopg2',
+ 'ENGINE': 'django.db.backends.postgresql',
}
}
diff --git a/setup.py b/setup.py
index 76fbe98e..1dd3f8e9 100644
--- a/setup.py
+++ b/setup.py
@@ -1,9 +1,6 @@
#! /usr/bin/env python
-import glob
-import itertools
import os
-import re
import subprocess
import sys
from distutils.cmd import Command