...
 
Commits (93)
......@@ -51,6 +51,26 @@ py37-django-22:
script:
- tox -e py37-django22
py36-django-30:
stage: test
script:
- tox -e py36-django30
py37-django-30:
stage: test
script:
- tox -e py37-django30
py38-django-30:
stage: test
script:
- tox -e py38-django30
py38-django-22:
stage: test
script:
- tox -e py38-django22
coverage:
stage: test
script:
......@@ -92,3 +112,22 @@ upstream-django-mailman3:
only:
variables:
- $DJANGO_MAILMAN3_COMMIT_SHA
sast:
image: docker:stable
variables:
DOCKER_DRIVER: overlay2
allow_failure: true
services:
- docker:stable-dind
script:
- export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')
- docker run
--env SAST_CONFIDENCE_LEVEL="${SAST_CONFIDENCE_LEVEL:-3}"
--volume "$PWD:/code"
--volume /var/run/docker.sock:/var/run/docker.sock
"registry.gitlab.com/gitlab-org/security-products/sast:$SP_VERSION" /app/bin/run /code
artifacts:
reports:
sast: gl-sast-report.json
......@@ -5,6 +5,7 @@ prune src/postorius/doc/_build
graft src/postorius/static
include src/postorius/doc/Makefile
include tox.ini
include pytest.ini
recursive-include example_project *.py *.cfg *.rst *.txt
exclude example_project/settings_local.py
prune example_project/venv
......
......@@ -53,8 +53,8 @@ setup(
package_dir={'': 'src'},
include_package_data=True,
install_requires=[
'Django>=1.11,<2.3',
'django-mailman3>=1.2.0a1',
'Django>=1.11,<3.1',
'mailmanclient>=3.2.3a2',
'readme_renderer[md]',
],
......
......@@ -17,5 +17,5 @@
# Postorius. If not, see <http://www.gnu.org/licenses/>.
__version__ = '1.3.0'
__version__ = '1.3.1'
default_app_config = 'postorius.apps.PostoriusConfig'
......@@ -20,8 +20,6 @@
Authentication and authorization-related utilities.
"""
from django.utils import six
from allauth.account.models import EmailAddress
from postorius.models import Domain, List
......@@ -57,7 +55,7 @@ def set_list_access_props(user, mlist):
:param mlist: MailingList to check permissions for.
:type mlist: postorius.models.List
"""
if isinstance(mlist, six.string_types):
if isinstance(mlist, str):
mlist = List.objects.get_or_404(mlist)
if not hasattr(user, 'is_list_owner'):
user.is_list_owner = user_is_in_list_roster(
......@@ -78,7 +76,7 @@ def set_domain_access_props(user, domain):
# TODO: This is very slow as it involves first iterating over every domain
# owner and then each of their addresses. Create an API in Core to
# facilitate this.
if isinstance(domain, six.string_types):
if isinstance(domain, str):
domain = Domain.objects.get_or_404(domain)
owner_addresses = []
for owner in domain.owners:
......
......@@ -18,9 +18,33 @@ You should have received a copy of the GNU Lesser General Public License
along with Postorius. If not, see <http://www.gnu.org/licenses/>.
1.3.1
=====
(2019-12-08)
* Show templates' file names in selection list where admins can pick
individual templates for customization. (See !425)
* Make template short names more prominent on all email templates related
views. (See !425)
* Bind object attributes to local variables in {% blocktrans %} (See !439)
* Set the initial style in new list form as the default style. (Closes #310)
* Fix a bug where logged in users's index page view would cap the total number
of lists for a role to 50. (Closes #335)
* Fix a bug where handling non-existent held message can raise 500
exception. (Closes #349)
* Emit appropriate signals when Domain and MailingList is updated. (Closes
#385)
* Do not strip leading whitespaces in Email Templates. (Closes #301)
* Hold date for held messages are now displayed correctly. (Closes #312)
* Add support for Python 3.8.
* Add support for Django 3.0.
1.3.0
=====
(2019-09-04)
* Fix a string substitution bug which would cause un-substituted raw string to
be exposed as notification to admin. (Closes #327)
* Add support for ``FILTER_VHOST`` option to filter MalingLists based on
......@@ -47,6 +71,7 @@ along with Postorius. If not, see <http://www.gnu.org/licenses/>.
* Allow setting the visibility options for MailingList's member list.
* Make page titles localizable.
1.2.4
=====
(2019-02-09)
......
......@@ -22,7 +22,7 @@ from django.contrib.sites.models import Site
from django.core.exceptions import ValidationError
from django.core.validators import validate_email
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
from postorius.forms.fields import SiteModelChoiceField
......
......@@ -20,7 +20,7 @@
from django import forms
from django.utils.encoding import smart_text
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
class ListOfStringsField(forms.Field):
......
......@@ -22,12 +22,13 @@ import re
from django import forms
from django.core.exceptions import ValidationError
from django.core.validators import validate_email
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
from django_mailman3.lib.mailman import get_mailman_client
from postorius.forms.fields import ListOfStringsField
from postorius.languages import LANGUAGES
from postorius.models import EmailTemplate, _email_template_help_text
ACTION_CHOICES = (
......@@ -837,3 +838,16 @@ class ChangeSubscriptionForm(forms.Form):
required=False,
widget=forms.Select(),
choices=((address, address) for address in user_emails))
class TemplateUpdateForm(forms.ModelForm):
data = forms.CharField(
label=_('Data'),
required=False,
strip=False,
widget=forms.Textarea(),
help_text=_email_template_help_text)
class Meta:
model = EmailTemplate
fields = ['data']
......@@ -18,7 +18,7 @@
#
from django import forms
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
class MemberForm(forms.Form):
......
......@@ -19,7 +19,7 @@
from django import forms
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
from postorius.forms.fields import NullBooleanRadioSelect
......
......@@ -75,10 +75,9 @@ mr
ms
my
nb_NO
nn_NO
ne
nl
nn
nn_NO
oc
os
pa
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.