diff --git a/README.md b/README.md index b280110c..e3770b20 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ already. You can check all of them with: ``` -sudo apt install libmysqlclient-dev libssl-dev libjpeg-dev zlib1g-dev python3-dev +sudo apt install libmysqlclient-dev libssl-dev libjpeg-dev zlib1g-dev python3-dev libffi-dev ``` The development is done with sqlite, but it is advised to set a more robust DBMS for production (Postgresql for example) diff --git a/forum/models.py b/forum/models.py index 44875ed9..4c2a15d9 100644 --- a/forum/models.py +++ b/forum/models.py @@ -166,5 +166,4 @@ class ForumUserInfo(models.Model): user = models.OneToOneField(User, related_name="_forum_infos") last_read_date = models.DateTimeField(_('last read date'), default=datetime(year=settings.SITH_SCHOOL_START_YEAR, month=1, day=1, tzinfo=pytz.UTC)) - # read_messages = models.ManyToManyField(ForumMessage, related_name="readers", verbose_name=_("read messages")) diff --git a/forum/templates/forum/main.jinja b/forum/templates/forum/main.jinja index 37786d14..ce304def 100644 --- a/forum/templates/forum/main.jinja +++ b/forum/templates/forum/main.jinja @@ -13,8 +13,6 @@

{% trans %}Forum{% endtrans %}

{% trans %}View last unread messages{% endtrans %} - {% trans %}Mark all as read{% endtrans %} - {% trans %}Refresh{% endtrans %}

{% if user.is_in_group(settings.SITH_GROUP_FORUM_ADMIN_ID) or user.is_in_group(settings.SITH_GROUP_COM_ADMIN_ID) %}

diff --git a/forum/templates/forum/topic.jinja b/forum/templates/forum/topic.jinja index 827e8907..9915f7fe 100644 --- a/forum/templates/forum/topic.jinja +++ b/forum/templates/forum/topic.jinja @@ -76,7 +76,7 @@ - {# m.mark_as_read(user) or "" #} + {{ m.mark_as_read(user) or "" }} {% endfor %} {% endblock %} diff --git a/forum/views.py b/forum/views.py index 6e6210d0..ead1ad65 100644 --- a/forum/views.py +++ b/forum/views.py @@ -12,7 +12,7 @@ from django.core.exceptions import PermissionDenied from core.views import CanViewMixin, CanEditMixin, CanEditPropMixin, CanCreateMixin, TabedViewMixin from forum.models import Forum, ForumMessage, ForumTopic -class ForumMainView(CanViewMixin, ListView): +class ForumMainView(ListView): queryset = Forum.objects.filter(parent=None) template_name = "forum/main.jinja" @@ -108,7 +108,7 @@ class ForumTopicCreateView(CanCreateMixin, CreateView): class ForumTopicEditView(CanEditMixin, UpdateView): model = ForumTopic - fields = ['title', 'forum'] + fields = ['forum'] pk_url_kwarg = "topic_id" template_name = "core/edit.jinja"