From 05cd50f0f1629cae0f884ab966eca6c79c773c60 Mon Sep 17 00:00:00 2001 From: Jonas 12t Date: Fri, 14 Jan 2022 11:00:36 +0400 Subject: [PATCH] maj to django 3.2 --- DjangoFiles/BaseBillet/models.py | 7 +++++-- DjangoFiles/TiBillet/settings.py | 10 +++++----- DjangoFiles/TiBillet/urls_public.py | 4 ++-- DjangoFiles/TiBillet/urls_tenants.py | 4 ++-- Docker/Dockerfile/dockerfile | 14 +++++++------- 5 files changed, 21 insertions(+), 18 deletions(-) diff --git a/DjangoFiles/BaseBillet/models.py b/DjangoFiles/BaseBillet/models.py index a26708b..316b002 100644 --- a/DjangoFiles/BaseBillet/models.py +++ b/DjangoFiles/BaseBillet/models.py @@ -12,7 +12,10 @@ from django.db.models.signals import post_save, pre_save from django.dispatch import receiver from django.urls import reverse from django.utils import timezone -from django.contrib.postgres.fields import JSONField + +# from django.contrib.postgres.fields import JSONField +from django.db.models import JSONField + from django.utils.text import slugify from solo.models import SingletonModel from django.utils.translation import ugettext_lazy as _ @@ -71,7 +74,7 @@ class Configuration(SingletonModel): adhesion_obligatoire = models.BooleanField(default=False) button_adhesion = models.BooleanField(default=False) - name_required_for_ticket = models.BooleanField(default=False, verbose_name=_("Billet nominatifs")) + name_required_for_ticket = models.BooleanField(default=True, verbose_name=_("Billet nominatifs")) map_img = StdImageField(upload_to='images/', null=True, blank=True, diff --git a/DjangoFiles/TiBillet/settings.py b/DjangoFiles/TiBillet/settings.py index 9ca15bd..f34dd66 100644 --- a/DjangoFiles/TiBillet/settings.py +++ b/DjangoFiles/TiBillet/settings.py @@ -29,13 +29,13 @@ else: DEBUG = False ALLOWED_HOSTS = ['*'] - +DEFAULT_AUTO_FIELD = 'django.db.models.AutoField' # Application definition SHARED_APPS = ( 'django_tenants', # mandatory - 'jet.dashboard', - 'jet', + # 'jet.dashboard', + # 'jet', 'Customers', # you must list the app where your tenant model resides in 'django.contrib.contenttypes', @@ -223,8 +223,8 @@ CELERY_RESULT_BACKEND=os.environ.get('CELERY_BACKEND', 'redis://redis:6379/0') # Jet Menu # -------------------------------------/ -JET_SIDE_MENU_COMPACT = True -JET_CHANGE_FORM_SIBLING_LINKS = False +# JET_SIDE_MENU_COMPACT = True +# JET_CHANGE_FORM_SIBLING_LINKS = False LOGGING = { 'version': 1, diff --git a/DjangoFiles/TiBillet/urls_public.py b/DjangoFiles/TiBillet/urls_public.py index ba5e7b5..b79a157 100644 --- a/DjangoFiles/TiBillet/urls_public.py +++ b/DjangoFiles/TiBillet/urls_public.py @@ -20,8 +20,8 @@ from Administration.admin_public import public_admin_site # from AuthBillet.views import TokenCreateView_custom urlpatterns = [ - path('jet/', include('jet.urls', 'jet')), # Django JET URLS - re_path(r'^jet/dashboard/', include('jet.dashboard.urls', 'jet-dashboard')), # Django JET dashboard URLS + # path('jet/', include('jet.urls', 'jet')), # Django JET URLS + # re_path(r'^jet/dashboard/', include('jet.dashboard.urls', 'jet-dashboard')), # Django JET dashboard URLS # on modifie la creation du token pour rajouter access_token dans la réponse pour Postman # re_path(r"^auth/token/login/?$", TokenCreateView_custom.as_view(), name="login"), re_path(r'^auth/', include('djoser.urls')), diff --git a/DjangoFiles/TiBillet/urls_tenants.py b/DjangoFiles/TiBillet/urls_tenants.py index 1291914..54ac0ea 100644 --- a/DjangoFiles/TiBillet/urls_tenants.py +++ b/DjangoFiles/TiBillet/urls_tenants.py @@ -23,8 +23,8 @@ from Administration.admin_tenant import staff_admin_site from AuthBillet.views import TokenCreateView_custom urlpatterns = [ - path('jet/', include('jet.urls', 'jet')), # Django JET URLS - re_path(r'^jet/dashboard/', include('jet.dashboard.urls', 'jet-dashboard')), # Django JET dashboard URLS + # path('jet/', include('jet.urls', 'jet')), # Django JET URLS + # re_path(r'^jet/dashboard/', include('jet.dashboard.urls', 'jet-dashboard')), # Django JET dashboard URLS # path('admin/', staff_admin_site.urls, name="staff_admin_site"), re_path(r'^admin\/{0,}', staff_admin_site.urls, name="staff_admin_site"), diff --git a/Docker/Dockerfile/dockerfile b/Docker/Dockerfile/dockerfile index 52a0104..141a22d 100644 --- a/Docker/Dockerfile/dockerfile +++ b/Docker/Dockerfile/dockerfile @@ -8,22 +8,22 @@ RUN apt install -y python3-pip RUN pip install pip --upgrade ## PYTHON -RUN pip install django==2.2 -RUN pip install django-admin-sortable2==1.0.2 +RUN pip install django==3.2 +# RUN pip install django-admin-sortable2==1.0.2 RUN pip install djangorestframework -RUN pip install django-jet +# RUN pip install django-jet RUN pip install requests RUN pip install gunicorn -RUN pip install django-admin-rangefilter +# RUN pip install django-admin-rangefilter RUN pip install sentry-sdk RUN pip install python-dateutil RUN pip install Werkzeug RUN pip install django-solo -RUN pip install admin-totals +# RUN pip install admin-totals RUN pip install django-tenants RUN pip install mollie-api-python RUN pip install markdown # Markdown support for the browsable API. -RUN pip install django-filter # Filtering support +# RUN pip install django-filter # Filtering support RUN pip install djoser RUN pip install djangorestframework_simplejwt RUN pip install social-auth-app-django @@ -45,7 +45,7 @@ RUN apt-get install -y --no-install-recommends postgresql-client ## LATER ? # RUN pip install mailchimp3 -RUN apt install cron -y +# RUN apt install cron -y # RUN apt install curl -y RUN apt install borgbackup -y # RUN pip install inotify