]> git.parisson.com Git - teleforma.git/commitdiff
limit usernama o 30 char, avoid professor link
authorGuillaume Pellerin <yomguy@parisson.com>
Mon, 4 Mar 2024 21:22:36 +0000 (22:22 +0100)
committerGuillaume Pellerin <yomguy@parisson.com>
Mon, 4 Mar 2024 21:22:36 +0000 (22:22 +0100)
teleforma/templates/teleforma/course_conference.html
teleforma/views/core.py

index e83b162b0bed9971f9319fdff0f735186b1576f0..eb8467113da180723bcc4538cf58e0d037ae4d65 100644 (file)
@@ -69,8 +69,7 @@
 {% if conference.professor %}
 <dt>{% trans "Course" %}</dt><dd><a href="{% url teleforma-desk-period-course period.id course.id %}">{{ conference.course.title }} - {{ conference.course_type }}</a></dd>
 <dt>{% trans "Session" %}</dt><dd>{{ conference.session }}</dd>
-<dt>{% trans "Professor" %}</dt>
-    <dd><a href="{% url telemeta-profile-detail conference.professor.user.username %}" target="_blank">{{ conference.professor }}</a></dd>
+<dt>{% trans "Professor" %}</dt>{{ conference.professor }}</dd>
 {% endif %}
 {% if conference.comment %}<dt>{% trans "Comment" %}</dt><dd>{{ conference.comment }}</dd>{% endif %}
 <dt>{% trans "Begin date" %}</dt><dd>{{ conference.date_begin }}</dd>
index d71341c06cc59c376478576aca7cf9b399b496ce..d0593bbf9abe4719043759200f3eef3752f9c86d 100644 (file)
@@ -729,7 +729,7 @@ class ProfessorListView(View):
             s = ServiceProxy(url)
             remote_list = s.teleforma.get_professor_list()
             for professor_dict in remote_list['result']:
-                user, c = User.objects.get_or_create(username=professor_dict['username'])
+                user, c = User.objects.get_or_create(username=professor_dict['username'][:30])
                 user.first_name = professor_dict['first_name']
                 user.last_name = professor_dict['last_name']
                 user.email = professor_dict['email']