-DEBUG_TOOLBAR = True
-
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
# EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
# EMAIL_HOST = 'smtp.pilotsystems.net'
RECOVERY = True
-# disable to debug websocket and improve performance
DEBUG_TOOLBAR = False
-
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
warnings.showwarning = lambda *x: None
'django_user_agents.middleware.UserAgentMiddleware',
'mezzanine.core.middleware.SitePermissionMiddleware'
)
+print(MIDDLEWARE)
ROOT_URLCONF = 'urls'
TELEFORMA_ORGANIZATION = 'Pro-Barreau'
TELEFORMA_SUBJECTS = ('Barreau', 'e-learning')
TELEFORMA_DESCRIPTION = "E-learning Pro-Barreau"
-TELEFORMA_E_LEARNING_TYPE = 'Pro-Barreau'
+TELEFORMA_E_LEARNING_TYPE = 'AE'
EMAIL_HOST = 'angus.parisson.com'
DEFAULT_FROM_EMAIL = 'e-learning@pro-barreau.com'
class SeminarRevisionAdmin(admin.ModelAdmin):
search_fields = ['user__username', 'seminar__title']
date_hierarchy = 'date_modified'
+ readonly_fields=('date',)
+
actions = ['export_seminar_revisions']
#: templates/telemeta/login.html:29
msgid "Password forgotten"
-msgstr "Mot de passe oublié ?"
+msgstr "Mot de passe oublié"
#: templates/telemeta/login.html:30
msgid "Sign in"
msgid ""
"Forgotten your password? Enter your e-mail address below, and we'll e-mail "
"instructions for setting a new one."
-msgstr ""
+msgstr "Mot de passe perdu ? Saisissez votre adresse électronique ci-dessous et nous vous enverrons les instructions pour en créer un nouveau."
#: templates/telemeta/registration/password_reset_form.html:11
msgid "E-mail address:"
-msgstr ""
+msgstr "Adresse électronique"
#: templates/telemeta/registration/password_reset_form.html:11
msgid "Reset my password"
-msgstr ""
+msgstr "Réinitialiser mon mot de passe"
#: templatetags/telemeta_utils.py:259
#, python-format
class Command(BaseCommand):
help = "Send orders to avis-verifies ftp"
- args = 'days'
- option_list = BaseCommand.option_list + (
- make_option('--dry-run', action='store_true',
- help='Do not send to ftp / mail'),
- )
FTP_HOST = "global-ftp.netreviews.eu"
FTP_PORT = 22
FTP_LOGIN = "fr_pro-barreau.com"
FTP_PASSWORD = "pd8ExNC3"
FTP_PATH = "/orders/"
+ def add_arguments(self, parser):
+ parser.add_argument('days', type=int)
+ parser.add_argument(
+ '--dry-run',
+ action='store_true',
+ help='Do not send to ftp / mail',
+ )
def log(self, message):
print(message)
def handle(self, *args, **options):
self.logs = ""
- days = int(args[0])
+ days = options['days']
dry_run = options['dry_run']
print(dry_run)
logging.info('Generate csv file...')
--- /dev/null
+# Generated by Django 3.2.3 on 2022-01-17 17:56
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('teleforma', '0004_forms_builder'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='auditor',
+ name='init_password',
+ field=models.BooleanField(default=False, verbose_name='Password initialized'),
+ ),
+ migrations.AlterField(
+ model_name='auditor',
+ name='platform_only',
+ field=models.BooleanField(default=False, verbose_name='platform only'),
+ ),
+ ]
def is_webclass_running(self):
""" Is webclass currently running ? """
# print(self.get_webclass_info())
- return bbb.is_meeting_running(self.webclass_id).get_field('running').decode() == 'true' or False
+ return str(bbb.is_meeting_running(self.webclass_id).get_field('running')) == 'true' or False
def get_webclass_info(self):
""" """
for recording in recordings:
url = recording.get('playback', {}).get('format', {}).get('url')
if url:
- url = url.decode()
+ url = str(url)
data = {
- 'start': int(recording['startTime'].decode()),
- 'end': int(recording['endTime'].decode()),
+ 'start': int(str(recording['startTime'])),
+ 'end': int(str(recording['endTime'])),
'url': url,
- 'state': recording['state'].decode(),
+ 'state': str(recording['state']),
}
data['duration'] = data['end'] - data['start']
all_records.append(data)
verbose_name=_('conferences'),
blank=True)
- platform_only = models.BooleanField(_('platform only'))
+ platform_only = models.BooleanField(_('platform only'), default=False)
status = models.IntegerField(_('status'), choices=STATUS_CHOICES, default=2)
gender = models.CharField(_('gender'), choices=GENDER_CHOICES, max_length=8, blank=True)
company = models.CharField(_('Company'), max_length=255, blank=True)
block_fifpl = models.BooleanField(_('Block FIFPL'), default=False)
block_testimonials = models.BooleanField(_('Block attestations'), default=False)
expiration_date = models.DateField(_('Expiration_date'), blank=True, null=True)
- init_password = models.BooleanField(_('Password initialized'))
+ init_password = models.BooleanField(_('Password initialized'), default=False)
def __str__(self):
try:
-webkit-border-radius: 8px 0px 8px 8px;
border-radius: 8px 0px 8px 8px;
width: 97%;
+ max-height: 30vh
}
+++ /dev/null
-{% extends "admin/base_site.html" %}
-{% load i18n admin_static admin_list admin_urls suit_list suit_tags %}
-
-{% block extrastyle %}
- {{ block.super }}
- {# <link rel="stylesheet" type="text/css" href="{% static "admin/css/changelists.css" %}" />#}
- {% if cl.formset %}
- {# <link rel="stylesheet" type="text/css" href="{% static "admin/css/forms.css" %}" />#}
- {% endif %}
- {% if cl.formset or action_form %}
- {% url 'admin:jsi18n' as jsi18nurl %}
- <script type="text/javascript" src="{{ jsi18nurl|default:'../../jsi18n/' }}"></script>
- {% endif %}
- {{ media.css }}
- {% if not actions_on_top and not actions_on_bottom %}
- <style>
- {# #changelist table thead th:first-child {width: inherit}#}
- </style>
- {% endif %}
-{% endblock %}
-
-{% block extrahead %}
- {{ block.super }}
- {{ media.js }}
- {% if action_form %}{% if actions_on_top or actions_on_bottom %}
- <script type="text/javascript">
- (function ($) {
- $(document).ready(function ($) {
- $("tr input.action-select").actions();
- });
- })(django.jQuery);
- </script>
- {% endif %}{% endif %}
-{% endblock %}
-
-{% block bodyclass %}change-list{% endblock %}
-
-{% if not is_popup %}
- {% block breadcrumbs %}
- <ul class="breadcrumb">
- <li><a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
- <span class="divider">»</span></li>
- <li>
- <a href="{% url 'admin:app_list' app_label=cl.opts.app_label %}">{% firstof opts.app_config.verbose_name app_label|capfirst|escape %}</a>
- <span class="divider">»</span></li>
- <li class="active">{{ cl.opts.verbose_name_plural|capfirst }}</li>
- </ul>
- {% endblock %}
-{% endif %}
-
-{% block coltype %}flex{% endblock %}
-
-{% block content %}
-
- <div id="content-main">
-
- <div class="inner-center-column">
- <div class="module{% if cl.has_filters %} filtered{% endif %}" id="changelist">
-
- <div class="toolbar-content clearfix">
- {% block object-tools %}
- {% if has_add_permission %}
- <div class="object-tools">
- {% block object-tools-items %}
- <a href="{% url cl.opts|admin_urlname:'add' %}{% if is_popup %}?_popup=1{% endif %}" class="btn btn-success">
- <i class="icon-plus-sign icon-white"></i>
- {% blocktrans with cl.opts.verbose_name as name %}Add {{ name }}{% endblocktrans %}
- </a>
- {% endblock %}
- </div>
- {% endif %}
- {% endblock %}
-
- {% block search %}{% search_form cl %}{% endblock %}
- </div>
-
- {% block date_hierarchy %}
- {% if cl.date_hierarchy %}
- {% date_hierarchy cl %}
- {% endif %}
- {% endblock %}
-
- {% if cl.formset.errors %}
- <div class="alert alert-error errornote">
- {% blocktrans count cl.formset.errors|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}
- </div>
- {{ cl.formset.non_form_errors }}
- {% endif %}
-
- <form id="changelist-form" action="" method="post"
- {% if cl.formset.is_multipart %}
- enctype="multipart/form-data"{% endif %} class="form-inline">{% csrf_token %}
- {% if cl.formset %}
- <div>{{ cl.formset.management_form }}</div>
- {% endif %}
-
- {% block result_list %}
- {% if cl.result_count %}
- {% if action_form and actions_on_top and cl.full_result_count %}
- {% admin_actions %}{% endif %}
- {% result_list_with_context cl %}
-
- {% if action_form and actions_on_bottom and cl.full_result_count %}
- {% admin_actions %}{% endif %}
- {% else %}
- {% suit_bc_value 1.5 'pop' 1.6 '_popup' as POPUP_VAR %}
- <div class="alert alert-block alert-info">
- {% if cl.full_result_count %}
- <h4>{% trans 'Nothing found' %}!</h4>
- <br>
- <a href="?{% if cl.is_popup %}{{ POPUP_VAR }}=1{% endif %}">{% trans 'Reset search and filters' %}</a>
- {% else %}
- {% blocktrans with cl.opts.verbose_name_plural|capfirst as name_plural %}{{ name_plural }} are not created yet{% endblocktrans %}.
- {% if has_add_permission %}<a href="{% url cl.opts|admin_urlname:'add' %}{% if is_popup %}?{{ POPUP_VAR }}=1{% endif %}">
- {% blocktrans with cl.opts.verbose_name as name %}Add {{ name }}{% endblocktrans %}</a>{% endif %}
- {% endif %}
- </div>
- {% endif %}
- {% endblock %}
-
- {% block pagination %}
- {% if cl.result_count %}
- {% if action_form and actions_on_bottom and cl.full_result_count %}
- <div class="below-actions">
- {% endif %}
- {% pagination cl %}
- {% if action_form and actions_on_bottom and cl.full_result_count %}
- </div>
- {% endif %}
- {% endif %}
- {% endblock %}
- </form>
- </div>
- </div>
- </div>
-{% endblock %}
{% trans "Please go to the following page and choose a new password:" %}
{% block reset_link %}
-{{ protocol }}://{{ domain }}{% url 'teleforma-password-reset-confirm' uidb36=uid token=token %}
+{{ protocol }}://{{ domain }}{% url 'teleforma-password-reset-confirm' uidb64=uid token=token %}
{% endblock %}
{% trans "Your username, in case you've forgotten:" %} {{ user.username }}
def fancy_seconds(seconds):
time = ''
hours = int(seconds / 3600)
- minutes_int = (seconds % 3600) / 60
+ minutes_int = int((seconds % 3600) / 60)
if hours:
if minutes_int:
time += str(hours) + 'h'
import os.path
from django.conf.urls import url, include
+from django.urls import path
from jsonrpc import jsonrpc_site
from django.contrib.auth.views import (LoginView, LogoutView,
PasswordChangeDoneView,
email_template_name='registration/password_reset_email.html'), name="teleforma-password-reset"),
url(r'^accounts/password_reset_done/$', PasswordResetDoneView.as_view(
template_name='registration/password_reset_done.html'), name="password_reset_done"),
- url(r'accounts/password_reset_confirm/<uidb64>/<token>/', PasswordResetConfirmView.as_view(
+ path('accounts/password_reset_confirm/<uidb64>/<token>/', PasswordResetConfirmView.as_view(
template_name='registration/password_reset_confirm.html'), name="teleforma-password-reset-confirm"),
url(r'^accounts/password_reset_complete/$', PasswordResetCompleteView.as_view(template_name='registration/password_reset_complete.html'),
name="password_reset_complete"),
if date_order:
courses = sorted(courses, key=lambda k: k['date'], reverse=True)
if num_order:
- courses = sorted(courses, key=lambda k: k['number'])
+ courses = sorted(courses, key=lambda k: k['number'] or 0)
return courses
all_revisions = SeminarRevision.objects.filter(
user=user, date__gte=REVISION_DATE_FILTER, date_modified=None)
now = datetime.datetime.now()
- if seminar.expiry_date < now:
+ if not seminar.expiry_date or seminar.expiry_date < now:
return
if all_revisions:
if not all_revisions[0].seminar == seminar: