Merge branch 'dev' into 'master'

Fix latex and admins

See merge request animath/si/plateforme-tfjm!6
This commit is contained in:
Yohann D'ANELLO 2021-01-21 21:58:00 +00:00
commit 75db278a97
2 changed files with 5 additions and 2 deletions

View File

@ -3,8 +3,7 @@ FROM python:3.8-alpine
ENV PYTHONUNBUFFERED 1 ENV PYTHONUNBUFFERED 1
ENV DJANGO_ALLOW_ASYNC_UNSAFE 1 ENV DJANGO_ALLOW_ASYNC_UNSAFE 1
# Install LaTeX requirements RUN apk add --no-cache gettext nginx gcc libc-dev libffi-dev libxml2-dev libxslt-dev postgresql-dev libmagic texlive
RUN apk add --no-cache gettext nginx gcc libc-dev libffi-dev libxml2-dev libxslt-dev postgresql-dev libmagic
RUN apk add --no-cache bash RUN apk add --no-cache bash

View File

@ -136,6 +136,10 @@ class AddOrganizerView(VolunteerMixin, CreateView):
domain=site.domain)) domain=site.domain))
registration.user.email_user(subject, message, html_message=html) registration.user.email_user(subject, message, html_message=html)
if registration.is_admin:
registration.user.is_superuser = True
registration.user.save()
return ret return ret
def get_success_url(self): def get_success_url(self):