]> git.parisson.com Git - teleforma.git/commitdiff
Django 3 migration
authorYoan Le Clanche <yoanl@pilotsystems.net>
Thu, 23 Dec 2021 17:19:23 +0000 (18:19 +0100)
committerYoan Le Clanche <yoanl@pilotsystems.net>
Thu, 23 Dec 2021 17:19:23 +0000 (18:19 +0100)
app/settings.py
requirements.txt
teleforma/fields.py
teleforma/models/core.py
teleforma/templates/admin/teleforma/seminarrevision/change_list.html

index 11128011ff81390cdd1cf2cd70a33a1f6beb1993..216f7615d29414630fa40c18fc7958e995ecc03b 100644 (file)
@@ -39,8 +39,6 @@ ALLOWED_HOSTS = [
     'e-learning.pro-barreau.com',    
 ]
 
-ASGI_APPLICATION = "teleforma.ws.routing.application"
-
 DATABASES = {
     'default': {
         # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
@@ -137,7 +135,7 @@ STATICFILES_FINDERS = (
 )
 
 # Make this unique, and don't share it with anybody.
-SECRET_KEY = 'a8l7%06wr2k+3=%#*#@#rvop2mmzko)44%7k(zx%lls^ihm9^5'
+SECRET_KEY = "46a9a380-8a68-490f-86ce-e10730211dfb5a37d4a6-0b20-4ef4-85c4-c0ecac63af79cab06d89-3705-4271-8b20-9bca99b84c29"
 
 # List of callables that know how to import templates from various sources.
 TEMPLATE_LOADERS = (
@@ -196,8 +194,6 @@ INSTALLED_APPS = (
     # 'jqchat',
     'tinymce',
     'pbcart',
-    # 'telemeta',
-    # 'telecaster',
     'forms_builder.forms',
     'quiz',
     'multichoice',
@@ -220,7 +216,6 @@ TEMPLATES = [
                 'django.template.context_processors.request',
                 'django.contrib.auth.context_processors.auth',
                 'django.contrib.messages.context_processors.messages',
-                'postman.context_processors.inbox',
                 'django.template.context_processors.i18n',
                 'django.template.context_processors.media',
                 'django.template.context_processors.static',
@@ -252,15 +247,6 @@ TELEFORMA_ORGANIZATION = 'Pro-Barreau'
 TELEFORMA_SUBJECTS = ('Barreau', 'e-learning')
 TELEFORMA_DESCRIPTION = "E-learning Pro-Barreau"
 TELEFORMA_E_LEARNING_TYPE = 'Pro-Barreau'
-TELEFORMA_GLOBAL_TWEETER = False
-TELEFORMA_PERIOD_TWEETER = True
-TELEFORMA_EXAM_TOPIC_DEFAULT_DOC_TYPE_ID = 4
-TELEFORMA_EXAM_SCRIPT_UPLOAD = True
-TELEFORMA_REGISTER_DEFAULT_DOC_ID = 5506
-TELEFORMA_PERIOD_DEFAULT_ID = 21
-TELEFORMA_EXAM_MAX_SESSIONS = 99
-TELEFORMA_EXAM_SCRIPT_MAX_SIZE = 20480000
-TELEFORMA_EXAM_SCRIPT_SERVICE_URL = '/webviewer/teleforma.html'
 
 EMAIL_HOST = 'angus.parisson.com'
 DEFAULT_FROM_EMAIL = 'e-learning@pro-barreau.com'
@@ -269,20 +255,10 @@ REPORT_TO_EMAIL = ('kostya.rilov@pre-barreau.com', 'alexia.dcruz@pro-barreau.com
 ADMIN_USERNAME = 'Pro-Barreau'
 EMAIL_SUBJECT_PREFIX = '[' + TELEFORMA_ORGANIZATION + '] '
 
-TELECASTER_LIVE_STREAMING_PROTOCOL = 'https'
-TELECASTER_LIVE_STREAMING_SERVER = 'stream7.parisson.com'
-TELECASTER_LIVE_STREAMING_PORT = 443
-TELECASTER_LIVE_ICECAST_STREAMING_PORT = 443
-TELECASTER_LIVE_ICECAST_STREAMING_PATH = '/stream/audio/'
-TELECASTER_LIVE_STREAM_M_STREAMING_PORT = 443
-TELECASTER_LIVE_STREAM_M_STREAMING_PATH = '/stream/video/'
-
 PASSWORD_HASHERS = [
     'django.contrib.auth.hashers.PBKDF2PasswordHasher',
 ]
 
-BOX_API_TOKEN = 'D2pBaN8YqjGIfS0tKrgnMP93'
-
 FILE_UPLOAD_TEMP_DIR = '/tmp'
 
 SESSION_ENGINE = "django.contrib.sessions.backends.cached_db"
@@ -490,19 +466,6 @@ JAZZMIN_UI_TWEAKS = {
     },
     "actions_sticky_top": True
 }
-# Sherlock's online payment
-PAYMENT_SHERLOCKS_PATH='/srv/sherlocks'
-
-PAYMENT_PARAMETERS = { 'merchant_id' : { 'Semestrielle': "040109417200053",
-                                  'Annuelle': "040109417200053",
-                                  'Estivale': "040109417200054", },                                         
-                       'merchant_country': 'fr',
-                       'currency_code': '978',
-                       'language': 'fr'
-}
-
-
-ORAL_OPTION_PRICE = 250
 
 PACKAGE_NAME_FILEBROWSER = "filebrowser_safe"
 
index ee71213c0442faf87a85c53a724e23714f8ba1bb..b91e308b04426003f07f0ab8cf0c29b9dcfdf310 100644 (file)
@@ -1,10 +1,8 @@
 bigbluebutton-api-python==0.0.11
 docutils==0.17.1
 Django==3.2.3
-# south
 dj_pagination==2.5.0 # used by postman
 -e git+https://github.com/pilot-systems/django-forms-builder.git@master#egg=django-forms-builder       
-django-forms-builder==0.14.0
 django-jazzmin==2.4.7
 django-json-rpc==0.7.1
 django-nvd3==0.8.2
@@ -15,7 +13,6 @@ django-tinymce==3.3.0
 django-user-agents==0.4.0
 django-extensions==2.1.3
 -e git+https://github.com/pilot-systems/django-notes.git@master#egg=notes     
-# -e git+https://github.com/powellc/django-notes.git@master#egg=django-notes
 django-recaptcha==2.0.6
 dj_pagination==2.5.0 
 -e git+https://github.com/pilot-systems/Django-Quiz.git@master#egg=django-quiz-app
@@ -30,5 +27,4 @@ psycopg2==2.8.6
 uwsgi==2.0.19
 pymemcache==3.4.4
 ipython
-Mezzanine==5.0.0
-# south
+Mezzanine==5.0.0
\ No newline at end of file
index 30ca81b8b68cc97ca307655542216e6f984454dd..fedde5621d049186585444f5aa3d6b9b59ac499a 100644 (file)
@@ -43,7 +43,7 @@ class Duration(object):
         return self.__decorate(self._delta.__add__, other)
 
     def __bool__(self):
-        return self._delta.__nonzero__()
+        return bool(self._delta)
 
     def __str__(self):
         hours   = self._delta.days * 24 + self._delta.seconds / 3600
index a84ade4c9f1dd5af3cc9537843fff3f835d42dd3..0943e50cdfc6fa095825eaa2ba4e45919cab1340 100755 (executable)
@@ -156,7 +156,7 @@ class Department(Model):
 
     @property
     def slug(self):
-        return slugify(self.__unicode__())
+        return slugify(str(self))
 
     class Meta(MetaCore):
         db_table = app_label + '_' + 'department'
@@ -254,7 +254,7 @@ class Course(Model):
 
     @property
     def slug(self):
-        return slugify(self.__unicode__())
+        return slugify(str(self))
 
     def to_dict(self):
         dict = {'organization' : self.department.organization.name,
@@ -630,10 +630,10 @@ class Media(MediaBase):
 
 
 class SuggestionsMixin(Model):
-    suggested_seminars = models.ManyToManyField('Seminar', related_name="%(class)ss_related",
+    suggested_seminars = models.ManyToManyField('teleforma.Seminar', related_name="%(class)ss_related",
                                                 verbose_name=_('suggested seminars'),
                                                 blank=True)
-    suggested_conferences = models.ManyToManyField('Conference', related_name="%(class)ss_related",
+    suggested_conferences = models.ManyToManyField('teleforma.Conference', related_name="%(class)ss_related",
                                                    verbose_name=_('suggested conferences'),
                                                    blank=True)
                                                    
index 338a81ad33548cf5ec5037b1f8a50b58ba239aab..c5121c9843fc314e588c80c1b544169f63f04242 100644 (file)
@@ -1,6 +1,5 @@
 {% extends "admin/base_site.html" %}
 {% load i18n admin_static admin_list admin_urls suit_list suit_tags %}
-{% load url from future %}
 
 {% block extrastyle %}
   {{ block.super }}