diff --git a/.travis.yml b/.travis.yml index d0bb13ca..4a94cfaa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,7 @@ sudo: false language: python python: - "3.4" + - "3.5" services: - rabbitmq # will start rabbitmq-server cache: diff --git a/CHANGELOG.md b/CHANGELOG.md index 60a77eaf..465ef394 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,9 @@ ### Misc +- Made compatible with python 3.5. +- Migrated to django 1.8. +- Update the rest of requirements to the last version. - API: Mixin fields 'users', 'members' and 'memberships' in ProjectDetailSerializer. - API: Add stats/system resource with global server stats (total project, total users....) - API: Improve and fix some errors in issues/filters_data and userstories/filters_data. diff --git a/doc/source/conf.py b/doc/source/conf.py index 8fec513c..46770d5c 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/requirements-devel.txt b/requirements-devel.txt index df6cacac..bca12fc2 100644 --- a/requirements-devel.txt +++ b/requirements-devel.txt @@ -1,13 +1,13 @@ -r requirements.txt -factory_boy==2.4.1 -py==1.4.26 -pytest==2.6.4 -pytest-django==2.8.0 -pytest-pythonpath==0.6 +factory_boy==2.5.2 +py==1.4.30 +pytest==2.8.2 +pytest-django==2.9.1 +pytest-pythonpath==0.7 -coverage==3.7.1 -coveralls==0.4.2 +coverage==4.0 +coveralls==1.0 django-slowdown==0.0.1 transifex-client==0.11.1.beta diff --git a/requirements.txt b/requirements.txt index e116de5f..6d2df509 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,37 +1,35 @@ -Django==1.7.8 +Django==1.8.5 #djangorestframework==2.3.13 # It's not necessary since Taiga 1.7 -django-picklefield==0.3.1 -django-sampledatahelper==0.2.2 +django-picklefield==0.3.2 +django-sampledatahelper==0.3.0 gunicorn==19.3.0 -psycopg2==2.5.4 -pillow==2.5.3 -pytz==2014.4 -six==1.8.0 -amqp==1.4.6 +psycopg2==2.6.1 +Pillow==3.0.0 +pytz==2015.6 +six==1.10.0 +amqp==1.4.7 djmail==0.11 -django-pgjson==0.2.2 -djorm-pgarray==1.0.4 -django-jinja==1.0.4 -jinja2==2.7.2 -pygments==1.6 +django-pgjson==0.3.1 +djorm-pgarray==1.2 +django-jinja==1.4.1 +jinja2==2.8 +pygments==2.0.2 django-sites==0.8 -Markdown==2.4.1 -fn==0.2.13 +Markdown==2.6.2 +fn==0.4.3 diff-match-patch==20121119 -requests==2.4.1 +requests==2.8.0 django-sr==0.0.4 -easy-thumbnails==2.1 -celery==3.1.17 +easy-thumbnails==2.2 +celery==3.1.18 redis==2.10.3 -Unidecode==0.04.16 -raven==5.1.1 -bleach==1.4 -django-ipware==0.1.0 -premailer==2.8.1 +Unidecode==0.04.18 +raven==5.7.2 +bleach==1.4.2 +django-ipware==1.1.1 +premailer==2.9.6 +cssutils==1.0.1 # Compatible with python 3.5 django-transactional-cleanup==0.1.15 -lxml==3.4.1 +lxml==3.5.0b1 git+https://github.com/Xof/django-pglocks.git@dbb8d7375066859f897604132bd437832d2014ea -pyjwkest==1.0.3 - -# Comment it if you are using python >= 3.4 -enum34==1.0 +pyjwkest==1.0.5 diff --git a/settings/__init__.py b/settings/__init__.py index dd336c53..fb18d127 100644 --- a/settings/__init__.py +++ b/settings/__init__.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/settings/celery.py b/settings/celery.py index 59c8d51a..70cd1095 100644 --- a/settings/celery.py +++ b/settings/celery.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/settings/common.py b/settings/common.py index 9a256a45..544758d3 100644 --- a/settings/common.py +++ b/settings/common.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the @@ -25,6 +25,8 @@ ADMINS = ( ("Admin", "example@example.com"), ) +DEBUG = False + DATABASES = { "default": { "ENGINE": "transaction_hooks.backends.postgresql_psycopg2", @@ -215,11 +217,29 @@ DEFAULT_FILE_STORAGE = "taiga.base.storage.FileSystemStorage" SECRET_KEY = "aw3+t2r(8(0kkrhg8)gx6i96v5^kv%6cfep9wxfom0%7dy0m9e" -TEMPLATE_LOADERS = [ - "django_jinja.loaders.AppLoader", - "django_jinja.loaders.FileSystemLoader", +TEMPLATES = [ + { + "BACKEND": "django_jinja.backend.Jinja2", + "DIRS": [ + os.path.join(BASE_DIR, "templates"), + ], + "APP_DIRS": True, + "OPTIONS": { + 'context_processors': [ + "django.contrib.auth.context_processors.auth", + "django.template.context_processors.request", + "django.template.context_processors.i18n", + "django.template.context_processors.media", + "django.template.context_processors.static", + "django.template.context_processors.tz", + "django.contrib.messages.context_processors.messages", + ], + "match_extension": ".jinja", + } + }, ] + MIDDLEWARE_CLASSES = [ "taiga.base.middleware.cors.CoorsMiddleware", "taiga.events.middleware.SessionIDMiddleware", @@ -234,22 +254,9 @@ MIDDLEWARE_CLASSES = [ "django.contrib.messages.middleware.MessageMiddleware", ] -TEMPLATE_CONTEXT_PROCESSORS = [ - "django.contrib.auth.context_processors.auth", - "django.core.context_processors.request", - "django.core.context_processors.i18n", - "django.core.context_processors.media", - "django.core.context_processors.static", - "django.core.context_processors.tz", - "django.contrib.messages.context_processors.messages", -] ROOT_URLCONF = "taiga.urls" -TEMPLATE_DIRS = [ - os.path.join(BASE_DIR, "templates"), -] - INSTALLED_APPS = [ "django.contrib.auth", "django.contrib.contenttypes", diff --git a/settings/development.py b/settings/development.py index 008c128b..1a77df9d 100644 --- a/settings/development.py +++ b/settings/development.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the @@ -17,8 +17,5 @@ from .common import * DEBUG = True -TEMPLATE_DEBUG = DEBUG -TEMPLATE_CONTEXT_PROCESSORS += [ - "django.core.context_processors.debug", -] +TEMPLATES[0]["OPTIONS"]['context_processors'] += "django.template.context_processors.debug" diff --git a/settings/local.py.example b/settings/local.py.example index 95ce96fd..b6bcf2b9 100644 --- a/settings/local.py.example +++ b/settings/local.py.example @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the @@ -16,6 +16,8 @@ from .development import * +#DEBUG = False + #ADMINS = ( # ("Admin", "example@example.com"), #) diff --git a/settings/sr.py b/settings/sr.py index cd1bc113..9c523878 100644 --- a/settings/sr.py +++ b/settings/sr.py @@ -1,6 +1,6 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/settings/testing.py b/settings/testing.py index 9fb6ec74..01eff7c5 100644 --- a/settings/testing.py +++ b/settings/testing.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/settings/travis.py b/settings/travis.py index 6f27652f..20920546 100644 --- a/settings/travis.py +++ b/settings/travis.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/__init__.py b/taiga/__init__.py index b62e0bd0..721fcd42 100644 --- a/taiga/__init__.py +++ b/taiga/__init__.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/auth/api.py b/taiga/auth/api.py index a666dc2e..c70e7e7f 100644 --- a/taiga/auth/api.py +++ b/taiga/auth/api.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/auth/backends.py b/taiga/auth/backends.py index fe44544b..d2f71553 100644 --- a/taiga/auth/backends.py +++ b/taiga/auth/backends.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/auth/permissions.py b/taiga/auth/permissions.py index c0e457b3..7fe0d452 100644 --- a/taiga/auth/permissions.py +++ b/taiga/auth/permissions.py @@ -1,5 +1,5 @@ -# Copyright (C) 2014 Andrey Antukh # Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh # Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/auth/serializers.py b/taiga/auth/serializers.py index 2073e000..42b077e7 100644 --- a/taiga/auth/serializers.py +++ b/taiga/auth/serializers.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/auth/services.py b/taiga/auth/services.py index 952bf6a7..73b65b5d 100644 --- a/taiga/auth/services.py +++ b/taiga/auth/services.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the @@ -28,9 +28,8 @@ from django.db import transaction as tx from django.db import IntegrityError from django.utils.translation import ugettext as _ -from djmail.template_mail import MagicMailBuilder, InlineCSSTemplateMail - from taiga.base import exceptions as exc +from taiga.base.mails import mail_builder from taiga.users.serializers import UserAdminSerializer from taiga.users.services import get_and_validate_user @@ -57,8 +56,7 @@ def send_register_email(user) -> bool: """ cancel_token = get_token_for_user(user, "cancel_account") context = {"user": user, "cancel_token": cancel_token} - mbuilder = MagicMailBuilder(template_mail_cls=InlineCSSTemplateMail) - email = mbuilder.registered_user(user, context) + email = mail_builder.registered_user(user, context) return bool(email.send()) diff --git a/taiga/auth/signals.py b/taiga/auth/signals.py index 9c5b9ca0..2f674fe1 100644 --- a/taiga/auth/signals.py +++ b/taiga/auth/signals.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/auth/tokens.py b/taiga/auth/tokens.py index f113ba8a..a24b91e4 100644 --- a/taiga/auth/tokens.py +++ b/taiga/auth/tokens.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/__init__.py b/taiga/base/__init__.py index d6006178..6aa21c11 100644 --- a/taiga/base/__init__.py +++ b/taiga/base/__init__.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/api/__init__.py b/taiga/base/api/__init__.py index 8b2b6ad6..f8457cd1 100644 --- a/taiga/base/api/__init__.py +++ b/taiga/base/api/__init__.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/api/authentication.py b/taiga/base/api/authentication.py index 8343fa30..ad83bdbf 100644 --- a/taiga/base/api/authentication.py +++ b/taiga/base/api/authentication.py @@ -1,6 +1,6 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/api/fields.py b/taiga/base/api/fields.py index 942878f7..ad05e422 100644 --- a/taiga/base/api/fields.py +++ b/taiga/base/api/fields.py @@ -1,6 +1,6 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/api/generics.py b/taiga/base/api/generics.py index de834139..2315bfc1 100644 --- a/taiga/base/api/generics.py +++ b/taiga/base/api/generics.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/api/mixins.py b/taiga/base/api/mixins.py index 5576db90..371b44c7 100644 --- a/taiga/base/api/mixins.py +++ b/taiga/base/api/mixins.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/api/negotiation.py b/taiga/base/api/negotiation.py index 60278752..f4984a11 100644 --- a/taiga/base/api/negotiation.py +++ b/taiga/base/api/negotiation.py @@ -1,6 +1,6 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/api/pagination.py b/taiga/base/api/pagination.py index 028d8106..dbab110b 100644 --- a/taiga/base/api/pagination.py +++ b/taiga/base/api/pagination.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/api/parsers.py b/taiga/base/api/parsers.py index 1465f601..3b254633 100644 --- a/taiga/base/api/parsers.py +++ b/taiga/base/api/parsers.py @@ -1,6 +1,6 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/api/permissions.py b/taiga/base/api/permissions.py index c4e6917d..54e3be02 100644 --- a/taiga/base/api/permissions.py +++ b/taiga/base/api/permissions.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/api/relations.py b/taiga/base/api/relations.py index 87fbfb4c..4c02ec91 100644 --- a/taiga/base/api/relations.py +++ b/taiga/base/api/relations.py @@ -1,6 +1,6 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/api/renderers.py b/taiga/base/api/renderers.py index 2da7ed4c..c30cb074 100644 --- a/taiga/base/api/renderers.py +++ b/taiga/base/api/renderers.py @@ -1,6 +1,6 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/api/request.py b/taiga/base/api/request.py index c57d29fc..0e5fe48a 100644 --- a/taiga/base/api/request.py +++ b/taiga/base/api/request.py @@ -1,6 +1,6 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/api/reverse.py b/taiga/base/api/reverse.py index 71c7c047..1049388f 100644 --- a/taiga/base/api/reverse.py +++ b/taiga/base/api/reverse.py @@ -1,6 +1,6 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/api/serializers.py b/taiga/base/api/serializers.py index 8add00ba..3f33e180 100644 --- a/taiga/base/api/serializers.py +++ b/taiga/base/api/serializers.py @@ -1,6 +1,6 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the @@ -1005,7 +1005,7 @@ class ModelSerializer((six.with_metaclass(SerializerMetaclass, BaseSerializer))) m2m_data[field_name] = attrs.pop(field_name) # Forward m2m relations - for field in meta.many_to_many + meta.virtual_fields: + for field in list(meta.many_to_many) + meta.virtual_fields: if field.name in attrs: m2m_data[field.name] = attrs.pop(field.name) diff --git a/taiga/base/api/settings.py b/taiga/base/api/settings.py index 34dd9717..5eda4866 100644 --- a/taiga/base/api/settings.py +++ b/taiga/base/api/settings.py @@ -1,6 +1,6 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/api/static/api/css/bootstrap-tweaks.css b/taiga/base/api/static/api/css/bootstrap-tweaks.css index b1cd265b..98b0348f 100644 --- a/taiga/base/api/static/api/css/bootstrap-tweaks.css +++ b/taiga/base/api/static/api/css/bootstrap-tweaks.css @@ -1,7 +1,7 @@ /* - * Copyright (C) 2015 Andrey Antukh - * Copyright (C) 2015 Jesús Espino - * Copyright (C) 2015 David Barragán + * Copyright (C) 2014-2015 Andrey Antukh + * Copyright (C) 2014-2015 Jesús Espino + * Copyright (C) 2014-2015 David Barragán * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/api/static/api/css/default.css b/taiga/base/api/static/api/css/default.css index d7c5722e..cbd7191c 100644 --- a/taiga/base/api/static/api/css/default.css +++ b/taiga/base/api/static/api/css/default.css @@ -1,7 +1,7 @@ /* - * Copyright (C) 2015 Andrey Antukh - * Copyright (C) 2015 Jesús Espino - * Copyright (C) 2015 David Barragán + * Copyright (C) 2014-2015 Andrey Antukh + * Copyright (C) 2014-2015 Jesús Espino + * Copyright (C) 2014-2015 David Barragán * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/api/static/api/css/prettify.css b/taiga/base/api/static/api/css/prettify.css index c037439d..1511794c 100644 --- a/taiga/base/api/static/api/css/prettify.css +++ b/taiga/base/api/static/api/css/prettify.css @@ -1,7 +1,7 @@ /* - * Copyright (C) 2015 Andrey Antukh - * Copyright (C) 2015 Jesús Espino - * Copyright (C) 2015 David Barragán + * Copyright (C) 2014-2015 Andrey Antukh + * Copyright (C) 2014-2015 Jesús Espino + * Copyright (C) 2014-2015 David Barragán * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/api/static/api/js/default.js b/taiga/base/api/static/api/js/default.js index 3e9b9e3c..fc8563d2 100644 --- a/taiga/base/api/static/api/js/default.js +++ b/taiga/base/api/static/api/js/default.js @@ -1,7 +1,7 @@ /* - * Copyright (C) 2015 Andrey Antukh - * Copyright (C) 2015 Jesús Espino - * Copyright (C) 2015 David Barragán + * Copyright (C) 2014-2015 Andrey Antukh + * Copyright (C) 2014-2015 Jesús Espino + * Copyright (C) 2014-2015 David Barragán * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/api/static/api/js/prettify-min.js b/taiga/base/api/static/api/js/prettify-min.js index 54d16bac..c225269f 100644 --- a/taiga/base/api/static/api/js/prettify-min.js +++ b/taiga/base/api/static/api/js/prettify-min.js @@ -1,7 +1,7 @@ /* - * Copyright (C) 2015 Andrey Antukh - * Copyright (C) 2015 Jesús Espino - * Copyright (C) 2015 David Barragán + * Copyright (C) 2014-2015 Andrey Antukh + * Copyright (C) 2014-2015 Jesús Espino + * Copyright (C) 2014-2015 David Barragán * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/api/templatetags/api.py b/taiga/base/api/templatetags/api.py index 987cb90b..642b476d 100644 --- a/taiga/base/api/templatetags/api.py +++ b/taiga/base/api/templatetags/api.py @@ -1,6 +1,6 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/api/throttling.py b/taiga/base/api/throttling.py index bec43b87..89cf4c7d 100644 --- a/taiga/base/api/throttling.py +++ b/taiga/base/api/throttling.py @@ -1,6 +1,6 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/api/urlpatterns.py b/taiga/base/api/urlpatterns.py index a48fa572..4c67ad23 100644 --- a/taiga/base/api/urlpatterns.py +++ b/taiga/base/api/urlpatterns.py @@ -1,6 +1,6 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/api/urls.py b/taiga/base/api/urls.py index 0e1f61bf..e7e4af2b 100644 --- a/taiga/base/api/urls.py +++ b/taiga/base/api/urls.py @@ -1,6 +1,6 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/api/utils.py b/taiga/base/api/utils.py index 433e668a..8f803b0a 100644 --- a/taiga/base/api/utils.py +++ b/taiga/base/api/utils.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/api/utils/__init__.py b/taiga/base/api/utils/__init__.py index d215bf8f..a555ba83 100644 --- a/taiga/base/api/utils/__init__.py +++ b/taiga/base/api/utils/__init__.py @@ -1,6 +1,6 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/api/utils/breadcrumbs.py b/taiga/base/api/utils/breadcrumbs.py index 39fa383f..950fe710 100644 --- a/taiga/base/api/utils/breadcrumbs.py +++ b/taiga/base/api/utils/breadcrumbs.py @@ -1,6 +1,6 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/api/utils/encoders.py b/taiga/base/api/utils/encoders.py index 29dc36d3..cc998d24 100644 --- a/taiga/base/api/utils/encoders.py +++ b/taiga/base/api/utils/encoders.py @@ -1,6 +1,6 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/api/utils/formatting.py b/taiga/base/api/utils/formatting.py index c9940975..c8a1781e 100644 --- a/taiga/base/api/utils/formatting.py +++ b/taiga/base/api/utils/formatting.py @@ -1,6 +1,6 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/api/utils/mediatypes.py b/taiga/base/api/utils/mediatypes.py index dce7b06a..b049f166 100644 --- a/taiga/base/api/utils/mediatypes.py +++ b/taiga/base/api/utils/mediatypes.py @@ -1,6 +1,6 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/api/views.py b/taiga/base/api/views.py index 7a751eaf..0d5a60da 100644 --- a/taiga/base/api/views.py +++ b/taiga/base/api/views.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the @@ -447,7 +447,7 @@ class APIView(View): def api_server_error(request, *args, **kwargs): - if settings.DEBUG is False and request.META['CONTENT_TYPE'] == "application/json": + if settings.DEBUG is False and request.META.get('CONTENT_TYPE', None) == "application/json": return HttpResponse(json.dumps({"error": _("Server application error")}), status=status.HTTP_500_INTERNAL_SERVER_ERROR) return server_error(request, *args, **kwargs) diff --git a/taiga/base/api/viewsets.py b/taiga/base/api/viewsets.py index e587d4ab..9122972a 100644 --- a/taiga/base/api/viewsets.py +++ b/taiga/base/api/viewsets.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/apps.py b/taiga/base/apps.py index 7125cbe7..32ef371c 100644 --- a/taiga/base/apps.py +++ b/taiga/base/apps.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/connectors/exceptions.py b/taiga/base/connectors/exceptions.py index 1619abba..7173c757 100644 --- a/taiga/base/connectors/exceptions.py +++ b/taiga/base/connectors/exceptions.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/decorators.py b/taiga/base/decorators.py index d11b97f9..37912397 100644 --- a/taiga/base/decorators.py +++ b/taiga/base/decorators.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/exceptions.py b/taiga/base/exceptions.py index 7adb31f9..a6e3850f 100644 --- a/taiga/base/exceptions.py +++ b/taiga/base/exceptions.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/fields.py b/taiga/base/fields.py index 74b27c10..0c5d96aa 100644 --- a/taiga/base/fields.py +++ b/taiga/base/fields.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/filters.py b/taiga/base/filters.py index d662b47d..a6cf64e3 100644 --- a/taiga/base/filters.py +++ b/taiga/base/filters.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/formats/en/formats.py b/taiga/base/formats/en/formats.py index 959dba6d..6f5a83d4 100644 --- a/taiga/base/formats/en/formats.py +++ b/taiga/base/formats/en/formats.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/formats/es/formats.py b/taiga/base/formats/es/formats.py index 8fc0d277..a6c8e8f5 100644 --- a/taiga/base/formats/es/formats.py +++ b/taiga/base/formats/es/formats.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/mails.py b/taiga/base/mails.py new file mode 100644 index 00000000..ac0517e0 --- /dev/null +++ b/taiga/base/mails.py @@ -0,0 +1,42 @@ +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + +from django.conf import settings + +from djmail import template_mail +import premailer + +import logging + + +# Hide CSS warnings messages if debug mode is disable +if not getattr(settings, "DEBUG", False): + premailer.premailer.cssutils.log.setLevel(logging.CRITICAL) + + +class InlineCSSTemplateMail(template_mail.TemplateMail): + def _render_message_body_as_html(self, context): + html = super()._render_message_body_as_html(context) + + # Transform CSS into line style attributes + return premailer.transform(html) + + +class MagicMailBuilder(template_mail.MagicMailBuilder): + pass + + +mail_builder = MagicMailBuilder(template_mail_cls=InlineCSSTemplateMail) diff --git a/taiga/base/management/commands/test_emails.py b/taiga/base/management/commands/test_emails.py index da535c7f..c6d20a7d 100644 --- a/taiga/base/management/commands/test_emails.py +++ b/taiga/base/management/commands/test_emails.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the @@ -22,7 +22,7 @@ from django.db.models.loading import get_model from django.core.management.base import BaseCommand from django.utils import timezone -from djmail.template_mail import MagicMailBuilder, InlineCSSTemplateMail +from taiga.base.mails import mail_builder from taiga.projects.models import Project, Membership from taiga.projects.history.models import HistoryEntry @@ -47,11 +47,12 @@ class Command(BaseCommand): locale = options.get('locale') test_email = args[0] - mbuilder = MagicMailBuilder(template_mail_cls=InlineCSSTemplateMail) - # Register email - context = {"lang": locale, "user": User.objects.all().order_by("?").first(), "cancel_token": "cancel-token"} - email = mbuilder.registered_user(test_email, context) + context = {"lang": locale, + "user": User.objects.all().order_by("?").first(), + "cancel_token": "cancel-token"} + + email = mail_builder.registered_user(test_email, context) email.send() # Membership invitation @@ -60,12 +61,13 @@ class Command(BaseCommand): membership.invitation_extra_text = "Text example, Text example,\nText example,\n\nText example" context = {"lang": locale, "membership": membership} - email = mbuilder.membership_invitation(test_email, context) + email = mail_builder.membership_invitation(test_email, context) email.send() # Membership notification - context = {"lang": locale, "membership": Membership.objects.order_by("?").filter(user__isnull=False).first()} - email = mbuilder.membership_notification(test_email, context) + context = {"lang": locale, + "membership": Membership.objects.order_by("?").filter(user__isnull=False).first()} + email = mail_builder.membership_notification(test_email, context) email.send() # Feedback @@ -81,17 +83,17 @@ class Command(BaseCommand): "key2": "value2", }, } - email = mbuilder.feedback_notification(test_email, context) + email = mail_builder.feedback_notification(test_email, context) email.send() # Password recovery context = {"lang": locale, "user": User.objects.all().order_by("?").first()} - email = mbuilder.password_recovery(test_email, context) + email = mail_builder.password_recovery(test_email, context) email.send() # Change email context = {"lang": locale, "user": User.objects.all().order_by("?").first()} - email = mbuilder.change_email(test_email, context) + email = mail_builder.change_email(test_email, context) email.send() # Export/Import emails @@ -102,7 +104,7 @@ class Command(BaseCommand): "error_subject": "Error generating project dump", "error_message": "Error generating project dump", } - email = mbuilder.export_error(test_email, context) + email = mail_builder.export_error(test_email, context) email.send() context = { "lang": locale, @@ -110,7 +112,7 @@ class Command(BaseCommand): "error_subject": "Error importing project dump", "error_message": "Error importing project dump", } - email = mbuilder.import_error(test_email, context) + email = mail_builder.import_error(test_email, context) email.send() deletion_date = timezone.now() + datetime.timedelta(seconds=60*60*24) @@ -121,7 +123,7 @@ class Command(BaseCommand): "project": Project.objects.all().order_by("?").first(), "deletion_date": deletion_date, } - email = mbuilder.dump_project(test_email, context) + email = mail_builder.dump_project(test_email, context) email.send() context = { @@ -129,7 +131,7 @@ class Command(BaseCommand): "user": User.objects.all().order_by("?").first(), "project": Project.objects.all().order_by("?").first(), } - email = mbuilder.load_dump(test_email, context) + email = mail_builder.load_dump(test_email, context) email.send() # Notification emails diff --git a/taiga/base/middleware/cors.py b/taiga/base/middleware/cors.py index 3d6aed10..b4ed438f 100644 --- a/taiga/base/middleware/cors.py +++ b/taiga/base/middleware/cors.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/neighbors.py b/taiga/base/neighbors.py index 4e77c9cc..0a23f2d6 100644 --- a/taiga/base/neighbors.py +++ b/taiga/base/neighbors.py @@ -1,7 +1,7 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán -# Copyright (C) 2014 Anler Hernández +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Anler Hernández # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the @@ -43,7 +43,7 @@ def get_neighbors(obj, results_set=None): query = """ SELECT * FROM - (SELECT "id" as id, ROW_NUMBER() OVER() + (SELECT "col1" as id, ROW_NUMBER() OVER() FROM (%s) as ID_AND_ROW) AS SELECTED_ID_AND_ROW """ % (base_sql) diff --git a/taiga/base/response.py b/taiga/base/response.py index 47fc6641..458411c7 100644 --- a/taiga/base/response.py +++ b/taiga/base/response.py @@ -1,7 +1,7 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán -# Copyright (C) 2014 Anler Hernández +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Anler Hernández # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/routers.py b/taiga/base/routers.py index c792771c..6b72826c 100644 --- a/taiga/base/routers.py +++ b/taiga/base/routers.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/status.py b/taiga/base/status.py index 5fb0a4cf..0000145c 100644 --- a/taiga/base/status.py +++ b/taiga/base/status.py @@ -1,6 +1,6 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/storage.py b/taiga/base/storage.py index 35e234df..ad79c9fd 100644 --- a/taiga/base/storage.py +++ b/taiga/base/storage.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/tags.py b/taiga/base/tags.py index 4b7c6409..9af3cfe6 100644 --- a/taiga/base/tags.py +++ b/taiga/base/tags.py @@ -1,7 +1,7 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán -# Copyright (C) 2014 Anler Hernández +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Anler Hernández # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/throttling.py b/taiga/base/throttling.py index 268a397d..edc1fa14 100644 --- a/taiga/base/throttling.py +++ b/taiga/base/throttling.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/utils/contenttypes.py b/taiga/base/utils/contenttypes.py new file mode 100644 index 00000000..a475b352 --- /dev/null +++ b/taiga/base/utils/contenttypes.py @@ -0,0 +1,23 @@ +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + +from django.apps import apps +from django.contrib.contenttypes.management import update_contenttypes + + +def update_all_contenttypes(**kwargs): + for app_config in apps.get_app_configs(): + update_contenttypes(app_config, **kwargs) diff --git a/taiga/base/utils/db.py b/taiga/base/utils/db.py index 2762833e..f71b10f3 100644 --- a/taiga/base/utils/db.py +++ b/taiga/base/utils/db.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/utils/dicts.py b/taiga/base/utils/dicts.py index 512a044d..4a3c1ce6 100644 --- a/taiga/base/utils/dicts.py +++ b/taiga/base/utils/dicts.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/utils/diff.py b/taiga/base/utils/diff.py index 7c8ea034..27f1281e 100644 --- a/taiga/base/utils/diff.py +++ b/taiga/base/utils/diff.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/utils/functions.py b/taiga/base/utils/functions.py index d20f824a..3570a59a 100644 --- a/taiga/base/utils/functions.py +++ b/taiga/base/utils/functions.py @@ -1,7 +1,7 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán -# Copyright (C) 2014 Anler Hernández +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Anler Hernández # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/utils/iterators.py b/taiga/base/utils/iterators.py index fff3a9de..f7249112 100644 --- a/taiga/base/utils/iterators.py +++ b/taiga/base/utils/iterators.py @@ -1,7 +1,7 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán -# Copyright (C) 2014 Anler Hernández +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Anler Hernández # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/utils/json.py b/taiga/base/utils/json.py index 40132b34..d9e54132 100644 --- a/taiga/base/utils/json.py +++ b/taiga/base/utils/json.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/utils/sequence.py b/taiga/base/utils/sequence.py index 18af3e2f..da50953a 100644 --- a/taiga/base/utils/sequence.py +++ b/taiga/base/utils/sequence.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/utils/signals.py b/taiga/base/utils/signals.py index 1fe9c071..d2700790 100644 --- a/taiga/base/utils/signals.py +++ b/taiga/base/utils/signals.py @@ -1,7 +1,7 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán -# Copyright (C) 2014 Anler Hernández +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Anler Hernández # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/utils/slug.py b/taiga/base/utils/slug.py index 03b95767..48776ac3 100644 --- a/taiga/base/utils/slug.py +++ b/taiga/base/utils/slug.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/utils/text.py b/taiga/base/utils/text.py index df9b0259..b8de6aef 100644 --- a/taiga/base/utils/text.py +++ b/taiga/base/utils/text.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/base/utils/urls.py b/taiga/base/utils/urls.py index 2cd5f067..e13d783e 100644 --- a/taiga/base/utils/urls.py +++ b/taiga/base/utils/urls.py @@ -1,7 +1,7 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán -# Copyright (C) 2014 Anler Hernández +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Anler Hernández # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/celery.py b/taiga/celery.py index ef9b7d06..8084290b 100644 --- a/taiga/celery.py +++ b/taiga/celery.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/contrib_routers.py b/taiga/contrib_routers.py index 311f96c3..129d56b6 100644 --- a/taiga/contrib_routers.py +++ b/taiga/contrib_routers.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/deferred.py b/taiga/deferred.py index 62080a77..084a16f0 100644 --- a/taiga/deferred.py +++ b/taiga/deferred.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/events/__init__.py b/taiga/events/__init__.py index bc6d8fa2..b2d6c236 100644 --- a/taiga/events/__init__.py +++ b/taiga/events/__init__.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/events/apps.py b/taiga/events/apps.py index 40b51834..1081d6db 100644 --- a/taiga/events/apps.py +++ b/taiga/events/apps.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/events/backends/__init__.py b/taiga/events/backends/__init__.py index f72b8c5b..da0d1ba3 100644 --- a/taiga/events/backends/__init__.py +++ b/taiga/events/backends/__init__.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/events/backends/base.py b/taiga/events/backends/base.py index 4eefcb55..16189070 100644 --- a/taiga/events/backends/base.py +++ b/taiga/events/backends/base.py @@ -1,4 +1,4 @@ -# Copyright (C) 2014 Andrey Antukh +# Copyright (C) 2014-2015 Andrey Antukh # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/events/backends/postgresql.py b/taiga/events/backends/postgresql.py index 696a0813..beaf04ee 100644 --- a/taiga/events/backends/postgresql.py +++ b/taiga/events/backends/postgresql.py @@ -1,4 +1,4 @@ -# Copyright (C) 2014 Andrey Antukh +# Copyright (C) 2014-2015 Andrey Antukh # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/events/backends/rabbitmq.py b/taiga/events/backends/rabbitmq.py index 182d2548..18b573b1 100644 --- a/taiga/events/backends/rabbitmq.py +++ b/taiga/events/backends/rabbitmq.py @@ -1,4 +1,4 @@ -# Copyright (C) 2014 Andrey Antukh +# Copyright (C) 2014-2015 Andrey Antukh # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/events/events.py b/taiga/events/events.py index 26343694..3bd29173 100644 --- a/taiga/events/events.py +++ b/taiga/events/events.py @@ -1,4 +1,4 @@ -# Copyright (C) 2014 Andrey Antukh +# Copyright (C) 2014-2015 Andrey Antukh # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/events/middleware.py b/taiga/events/middleware.py index 9dbfb103..6fdbe3ef 100644 --- a/taiga/events/middleware.py +++ b/taiga/events/middleware.py @@ -1,4 +1,4 @@ -# Copyright (C) 2014 Andrey Antukh +# Copyright (C) 2014-2015 Andrey Antukh # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/events/signal_handlers.py b/taiga/events/signal_handlers.py index 7f938f15..e50b0f4c 100644 --- a/taiga/events/signal_handlers.py +++ b/taiga/events/signal_handlers.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the @@ -27,6 +27,8 @@ from . import events def on_save_any_model(sender, instance, created, **kwargs): # Ignore any object that can not have project_id + if not hasattr(instance, "project_id"): + return content_type = get_typename_for_model_instance(instance) # Ignore any other events diff --git a/taiga/export_import/api.py b/taiga/export_import/api.py index 6fabb96d..e9da52c0 100644 --- a/taiga/export_import/api.py +++ b/taiga/export_import/api.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/export_import/dump_service.py b/taiga/export_import/dump_service.py index 013e93e9..e09783a9 100644 --- a/taiga/export_import/dump_service.py +++ b/taiga/export_import/dump_service.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/export_import/management/commands/dump_project.py b/taiga/export_import/management/commands/dump_project.py index 9728d01c..6126a04a 100644 --- a/taiga/export_import/management/commands/dump_project.py +++ b/taiga/export_import/management/commands/dump_project.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/export_import/management/commands/load_dump.py b/taiga/export_import/management/commands/load_dump.py index 14016c6e..5afee1b8 100644 --- a/taiga/export_import/management/commands/load_dump.py +++ b/taiga/export_import/management/commands/load_dump.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/export_import/mixins.py b/taiga/export_import/mixins.py index bc5504fa..89a625e6 100644 --- a/taiga/export_import/mixins.py +++ b/taiga/export_import/mixins.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/export_import/permissions.py b/taiga/export_import/permissions.py index 2f63d272..23516de9 100644 --- a/taiga/export_import/permissions.py +++ b/taiga/export_import/permissions.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/export_import/renderers.py b/taiga/export_import/renderers.py index 30bf8d5f..7f7a2a28 100644 --- a/taiga/export_import/renderers.py +++ b/taiga/export_import/renderers.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/export_import/serializers.py b/taiga/export_import/serializers.py index 02334510..7b329e60 100644 --- a/taiga/export_import/serializers.py +++ b/taiga/export_import/serializers.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/export_import/service.py b/taiga/export_import/service.py index ef0b8a22..27d88d33 100644 --- a/taiga/export_import/service.py +++ b/taiga/export_import/service.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/export_import/tasks.py b/taiga/export_import/tasks.py index f833aef4..a33d2518 100644 --- a/taiga/export_import/tasks.py +++ b/taiga/export_import/tasks.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the @@ -25,8 +25,7 @@ from django.utils import timezone from django.conf import settings from django.utils.translation import ugettext as _ -from djmail.template_mail import MagicMailBuilder, InlineCSSTemplateMail - +from taiga.base.mails import mail_builder from taiga.celery import app from .service import render_project @@ -40,7 +39,6 @@ import resource @app.task(bind=True) def dump_project(self, user, project): - mbuilder = MagicMailBuilder(template_mail_cls=InlineCSSTemplateMail) path = "exports/{}/{}-{}.json".format(project.pk, project.slug, self.request.id) storage_path = default_storage.path(path) @@ -56,7 +54,7 @@ def dump_project(self, user, project): "error_message": _("Error generating project dump"), "project": project } - email = mbuilder.export_error(user, ctx) + email = mail_builder.export_error(user, ctx) email.send() logger.error('Error generating dump %s (by %s)', project.slug, user, exc_info=sys.exc_info()) return @@ -68,7 +66,7 @@ def dump_project(self, user, project): "user": user, "deletion_date": deletion_date } - email = mbuilder.dump_project(user, ctx) + email = mail_builder.dump_project(user, ctx) email.send() @@ -79,8 +77,6 @@ def delete_project_dump(project_id, project_slug, task_id): @app.task def load_project_dump(user, dump): - mbuilder = MagicMailBuilder(template_mail_cls=InlineCSSTemplateMail) - try: project = dict_to_project(dump, user.email) except Exception: @@ -89,11 +85,11 @@ def load_project_dump(user, dump): "error_subject": _("Error loading project dump"), "error_message": _("Error loading project dump"), } - email = mbuilder.import_error(user, ctx) + email = mail_builder.import_error(user, ctx) email.send() logger.error('Error loading dump %s (by %s)', project.slug, user, exc_info=sys.exc_info()) return ctx = {"user": user, "project": project} - email = mbuilder.load_dump(user, ctx) + email = mail_builder.load_dump(user, ctx) email.send() diff --git a/taiga/export_import/throttling.py b/taiga/export_import/throttling.py index a59d7e33..8a772520 100644 --- a/taiga/export_import/throttling.py +++ b/taiga/export_import/throttling.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/external_apps/admin.py b/taiga/external_apps/admin.py index 62efaafd..c1efa854 100644 --- a/taiga/external_apps/admin.py +++ b/taiga/external_apps/admin.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/external_apps/api.py b/taiga/external_apps/api.py index 092a9dfd..8da1ca9a 100644 --- a/taiga/external_apps/api.py +++ b/taiga/external_apps/api.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/external_apps/auth_backends.py b/taiga/external_apps/auth_backends.py index ff86e70e..6ab025bd 100644 --- a/taiga/external_apps/auth_backends.py +++ b/taiga/external_apps/auth_backends.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/external_apps/encryption.py b/taiga/external_apps/encryption.py index 1df1bda7..523c49d1 100644 --- a/taiga/external_apps/encryption.py +++ b/taiga/external_apps/encryption.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/external_apps/models.py b/taiga/external_apps/models.py index 29eb981c..b1ffed26 100644 --- a/taiga/external_apps/models.py +++ b/taiga/external_apps/models.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/external_apps/permissions.py b/taiga/external_apps/permissions.py index 88604e23..2132ea2a 100644 --- a/taiga/external_apps/permissions.py +++ b/taiga/external_apps/permissions.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/external_apps/serializers.py b/taiga/external_apps/serializers.py index fe472d8c..bc3cc0fc 100644 --- a/taiga/external_apps/serializers.py +++ b/taiga/external_apps/serializers.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/external_apps/services.py b/taiga/external_apps/services.py index 14ae8b73..7e1f78a4 100644 --- a/taiga/external_apps/services.py +++ b/taiga/external_apps/services.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/feedback/__init__.py b/taiga/feedback/__init__.py index 17e45261..69fa6d10 100644 --- a/taiga/feedback/__init__.py +++ b/taiga/feedback/__init__.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/feedback/admin.py b/taiga/feedback/admin.py index 512abb16..0c6f5e0c 100644 --- a/taiga/feedback/admin.py +++ b/taiga/feedback/admin.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/feedback/api.py b/taiga/feedback/api.py index c0efb23d..46dc31bd 100644 --- a/taiga/feedback/api.py +++ b/taiga/feedback/api.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/feedback/apps.py b/taiga/feedback/apps.py index 7ae2c1af..8d8ec510 100644 --- a/taiga/feedback/apps.py +++ b/taiga/feedback/apps.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/feedback/models.py b/taiga/feedback/models.py index a56de2b9..f60aee92 100644 --- a/taiga/feedback/models.py +++ b/taiga/feedback/models.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/feedback/permissions.py b/taiga/feedback/permissions.py index 6b755975..bbb53bdb 100644 --- a/taiga/feedback/permissions.py +++ b/taiga/feedback/permissions.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/feedback/routers.py b/taiga/feedback/routers.py index a3486b52..06d8988b 100644 --- a/taiga/feedback/routers.py +++ b/taiga/feedback/routers.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/feedback/serializers.py b/taiga/feedback/serializers.py index 872bad90..647c0e96 100644 --- a/taiga/feedback/serializers.py +++ b/taiga/feedback/serializers.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/feedback/services.py b/taiga/feedback/services.py index e5f92c3c..6fee5c79 100644 --- a/taiga/feedback/services.py +++ b/taiga/feedback/services.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the @@ -16,7 +16,7 @@ from django.conf import settings -from djmail.template_mail import MagicMailBuilder, InlineCSSTemplateMail +from taiga.base.mails import mail_builder def send_feedback(feedback_entry, extra, reply_to=[]): @@ -30,7 +30,6 @@ def send_feedback(feedback_entry, extra, reply_to=[]): "extra": extra } - mbuilder = MagicMailBuilder(template_mail_cls=InlineCSSTemplateMail) - email = mbuilder.feedback_notification(support_email, ctx) + email = mail_builder.feedback_notification(support_email, ctx) email.extra_headers["Reply-To"] = ", ".join(reply_to) email.send() diff --git a/taiga/front/sitemaps/__init__.py b/taiga/front/sitemaps/__init__.py index ba5da7bd..e07dd928 100644 --- a/taiga/front/sitemaps/__init__.py +++ b/taiga/front/sitemaps/__init__.py @@ -1,5 +1,5 @@ -# Copyright (C) 2015 David Barragán -# Copyright (C) 2015 Taiga Agile LLC +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Taiga Agile LLC # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/taiga/front/sitemaps/base.py b/taiga/front/sitemaps/base.py index 83967f4d..418ed739 100644 --- a/taiga/front/sitemaps/base.py +++ b/taiga/front/sitemaps/base.py @@ -1,5 +1,5 @@ -# Copyright (C) 2015 David Barragán -# Copyright (C) 2015 Taiga Agile LLC +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Taiga Agile LLC # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/taiga/front/sitemaps/generics.py b/taiga/front/sitemaps/generics.py index 27fbc075..41479a61 100644 --- a/taiga/front/sitemaps/generics.py +++ b/taiga/front/sitemaps/generics.py @@ -1,5 +1,5 @@ -# Copyright (C) 2015 David Barragán -# Copyright (C) 2015 Taiga Agile LLC +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Taiga Agile LLC # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/taiga/front/sitemaps/issues.py b/taiga/front/sitemaps/issues.py index e4404138..912712fc 100644 --- a/taiga/front/sitemaps/issues.py +++ b/taiga/front/sitemaps/issues.py @@ -1,5 +1,5 @@ -# Copyright (C) 2015 David Barragán -# Copyright (C) 2015 Taiga Agile LLC +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Taiga Agile LLC # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/taiga/front/sitemaps/milestones.py b/taiga/front/sitemaps/milestones.py index 7dde324b..049d3c9c 100644 --- a/taiga/front/sitemaps/milestones.py +++ b/taiga/front/sitemaps/milestones.py @@ -1,5 +1,5 @@ -# Copyright (C) 2015 David Barragán -# Copyright (C) 2015 Taiga Agile LLC +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Taiga Agile LLC # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/taiga/front/sitemaps/projects.py b/taiga/front/sitemaps/projects.py index f9ad82f8..fc56adca 100644 --- a/taiga/front/sitemaps/projects.py +++ b/taiga/front/sitemaps/projects.py @@ -1,5 +1,5 @@ -# Copyright (C) 2015 David Barragán -# Copyright (C) 2015 Taiga Agile LLC +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Taiga Agile LLC # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/taiga/front/sitemaps/tasks.py b/taiga/front/sitemaps/tasks.py index 264be4de..fa066a3b 100644 --- a/taiga/front/sitemaps/tasks.py +++ b/taiga/front/sitemaps/tasks.py @@ -1,5 +1,5 @@ -# Copyright (C) 2015 David Barragán -# Copyright (C) 2015 Taiga Agile LLC +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Taiga Agile LLC # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/taiga/front/sitemaps/users.py b/taiga/front/sitemaps/users.py index c29420e0..0cd2c2ed 100644 --- a/taiga/front/sitemaps/users.py +++ b/taiga/front/sitemaps/users.py @@ -1,5 +1,5 @@ -# Copyright (C) 2015 David Barragán -# Copyright (C) 2015 Taiga Agile LLC +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Taiga Agile LLC # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/taiga/front/sitemaps/userstories.py b/taiga/front/sitemaps/userstories.py index da16d19b..669db7ed 100644 --- a/taiga/front/sitemaps/userstories.py +++ b/taiga/front/sitemaps/userstories.py @@ -1,5 +1,5 @@ -# Copyright (C) 2015 David Barragán -# Copyright (C) 2015 Taiga Agile LLC +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Taiga Agile LLC # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/taiga/front/sitemaps/wiki.py b/taiga/front/sitemaps/wiki.py index eeb96a58..33c0cf0e 100644 --- a/taiga/front/sitemaps/wiki.py +++ b/taiga/front/sitemaps/wiki.py @@ -1,5 +1,5 @@ -# Copyright (C) 2015 David Barragán -# Copyright (C) 2015 Taiga Agile LLC +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Taiga Agile LLC # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/taiga/front/templatetags/functions.py b/taiga/front/templatetags/functions.py index 9a510d50..1c2fdaea 100644 --- a/taiga/front/templatetags/functions.py +++ b/taiga/front/templatetags/functions.py @@ -1,6 +1,6 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the @@ -21,10 +21,7 @@ from django_sites import get_by_id as get_site_by_id from taiga.front.urls import urls -register = library.Library() - - -@register.global_function(name="resolve_front_url") +@library.global_function(name="resolve_front_url") def resolve(type, *args): site = get_site_by_id("front") url_tmpl = "{scheme}//{domain}{url}" diff --git a/taiga/front/urls.py b/taiga/front/urls.py index b377f655..5987e5af 100644 --- a/taiga/front/urls.py +++ b/taiga/front/urls.py @@ -1,6 +1,6 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/hooks/api.py b/taiga/hooks/api.py index d4345cbc..d807f19d 100644 --- a/taiga/hooks/api.py +++ b/taiga/hooks/api.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/hooks/bitbucket/api.py b/taiga/hooks/bitbucket/api.py index 0b304ac8..781eca96 100644 --- a/taiga/hooks/bitbucket/api.py +++ b/taiga/hooks/bitbucket/api.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/hooks/bitbucket/event_hooks.py b/taiga/hooks/bitbucket/event_hooks.py index 73008a3e..3ee7c92b 100644 --- a/taiga/hooks/bitbucket/event_hooks.py +++ b/taiga/hooks/bitbucket/event_hooks.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/hooks/bitbucket/services.py b/taiga/hooks/bitbucket/services.py index ddd4af79..2bb9e574 100644 --- a/taiga/hooks/bitbucket/services.py +++ b/taiga/hooks/bitbucket/services.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/hooks/event_hooks.py b/taiga/hooks/event_hooks.py index 0d26be38..eebc45a0 100644 --- a/taiga/hooks/event_hooks.py +++ b/taiga/hooks/event_hooks.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/hooks/exceptions.py b/taiga/hooks/exceptions.py index 697674d4..1a214ab0 100644 --- a/taiga/hooks/exceptions.py +++ b/taiga/hooks/exceptions.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/hooks/github/api.py b/taiga/hooks/github/api.py index 8251858f..9082a2e6 100644 --- a/taiga/hooks/github/api.py +++ b/taiga/hooks/github/api.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/hooks/github/event_hooks.py b/taiga/hooks/github/event_hooks.py index 3dbd0417..20bbf11c 100644 --- a/taiga/hooks/github/event_hooks.py +++ b/taiga/hooks/github/event_hooks.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/hooks/github/services.py b/taiga/hooks/github/services.py index bc16c380..cbd63ef6 100644 --- a/taiga/hooks/github/services.py +++ b/taiga/hooks/github/services.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/hooks/gitlab/api.py b/taiga/hooks/gitlab/api.py index 03ae3a06..4cc71fd9 100644 --- a/taiga/hooks/gitlab/api.py +++ b/taiga/hooks/gitlab/api.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/hooks/gitlab/event_hooks.py b/taiga/hooks/gitlab/event_hooks.py index 83760d25..4c1f7dd3 100644 --- a/taiga/hooks/gitlab/event_hooks.py +++ b/taiga/hooks/gitlab/event_hooks.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/hooks/gitlab/services.py b/taiga/hooks/gitlab/services.py index 2d99969a..c7bfe5b9 100644 --- a/taiga/hooks/gitlab/services.py +++ b/taiga/hooks/gitlab/services.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/locale/api.py b/taiga/locale/api.py index 9a35be0b..03f11d56 100644 --- a/taiga/locale/api.py +++ b/taiga/locale/api.py @@ -1,6 +1,6 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/locale/ca/LC_MESSAGES/django.po b/taiga/locale/ca/LC_MESSAGES/django.po index 364fd824..8422123a 100644 --- a/taiga/locale/ca/LC_MESSAGES/django.po +++ b/taiga/locale/ca/LC_MESSAGES/django.po @@ -1,5 +1,5 @@ # taiga-back.taiga. -# Copyright (C) 2015 Taiga Dev Team +# Copyright (C) 2014-2015 Taiga Dev Team # This file is distributed under the same license as the taiga-back package. # # Translators: diff --git a/taiga/locale/de/LC_MESSAGES/django.po b/taiga/locale/de/LC_MESSAGES/django.po index d64b20e4..a7fd30ca 100644 --- a/taiga/locale/de/LC_MESSAGES/django.po +++ b/taiga/locale/de/LC_MESSAGES/django.po @@ -1,5 +1,5 @@ # taiga-back.taiga. -# Copyright (C) 2015 Taiga Dev Team +# Copyright (C) 2014-2015 Taiga Dev Team # This file is distributed under the same license as the taiga-back package. # # Translators: diff --git a/taiga/locale/en/LC_MESSAGES/django.po b/taiga/locale/en/LC_MESSAGES/django.po index 785176f5..f3f60e36 100644 --- a/taiga/locale/en/LC_MESSAGES/django.po +++ b/taiga/locale/en/LC_MESSAGES/django.po @@ -1,5 +1,5 @@ # taiga-back.taiga. -# Copyright (C) 2015 Taiga Dev Team +# Copyright (C) 2014-2015 Taiga Dev Team # This file is distributed under the same license as the taiga-back package. # FIRST AUTHOR , YEAR. # diff --git a/taiga/locale/es/LC_MESSAGES/django.po b/taiga/locale/es/LC_MESSAGES/django.po index d779fa5c..d8536c66 100644 --- a/taiga/locale/es/LC_MESSAGES/django.po +++ b/taiga/locale/es/LC_MESSAGES/django.po @@ -1,5 +1,5 @@ # taiga-back.taiga. -# Copyright (C) 2015 Taiga Dev Team +# Copyright (C) 2014-2015 Taiga Dev Team # This file is distributed under the same license as the taiga-back package. # # Translators: diff --git a/taiga/locale/fi/LC_MESSAGES/django.po b/taiga/locale/fi/LC_MESSAGES/django.po index 8c0149b5..13df40c5 100644 --- a/taiga/locale/fi/LC_MESSAGES/django.po +++ b/taiga/locale/fi/LC_MESSAGES/django.po @@ -1,5 +1,5 @@ # taiga-back.taiga. -# Copyright (C) 2015 Taiga Dev Team +# Copyright (C) 2014-2015 Taiga Dev Team # This file is distributed under the same license as the taiga-back package. # # Translators: diff --git a/taiga/locale/fr/LC_MESSAGES/django.po b/taiga/locale/fr/LC_MESSAGES/django.po index 59d43e20..2f77501a 100644 --- a/taiga/locale/fr/LC_MESSAGES/django.po +++ b/taiga/locale/fr/LC_MESSAGES/django.po @@ -1,5 +1,5 @@ # taiga-back.taiga. -# Copyright (C) 2015 Taiga Dev Team +# Copyright (C) 2014-2015 Taiga Dev Team # This file is distributed under the same license as the taiga-back package. # # Translators: diff --git a/taiga/locale/it/LC_MESSAGES/django.po b/taiga/locale/it/LC_MESSAGES/django.po index 7ce2d8bb..51da3973 100644 --- a/taiga/locale/it/LC_MESSAGES/django.po +++ b/taiga/locale/it/LC_MESSAGES/django.po @@ -1,5 +1,5 @@ # taiga-back.taiga. -# Copyright (C) 2015 Taiga Dev Team +# Copyright (C) 2014-2015 Taiga Dev Team # This file is distributed under the same license as the taiga-back package. # # Translators: diff --git a/taiga/locale/nl/LC_MESSAGES/django.po b/taiga/locale/nl/LC_MESSAGES/django.po index 1f1b87f4..8c7e29a7 100644 --- a/taiga/locale/nl/LC_MESSAGES/django.po +++ b/taiga/locale/nl/LC_MESSAGES/django.po @@ -1,5 +1,5 @@ # taiga-back.taiga. -# Copyright (C) 2015 Taiga Dev Team +# Copyright (C) 2014-2015 Taiga Dev Team # This file is distributed under the same license as the taiga-back package. # # Translators: diff --git a/taiga/locale/permissions.py b/taiga/locale/permissions.py index 406a4285..1c14c352 100644 --- a/taiga/locale/permissions.py +++ b/taiga/locale/permissions.py @@ -1,6 +1,6 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/locale/pl/LC_MESSAGES/django.po b/taiga/locale/pl/LC_MESSAGES/django.po index 330d4285..bbc893c3 100644 --- a/taiga/locale/pl/LC_MESSAGES/django.po +++ b/taiga/locale/pl/LC_MESSAGES/django.po @@ -1,5 +1,5 @@ # taiga-back.taiga. -# Copyright (C) 2015 Taiga Dev Team +# Copyright (C) 2014-2015 Taiga Dev Team # This file is distributed under the same license as the taiga-back package. # # Translators: diff --git a/taiga/locale/pt_BR/LC_MESSAGES/django.po b/taiga/locale/pt_BR/LC_MESSAGES/django.po index 1f252bea..6b644639 100644 --- a/taiga/locale/pt_BR/LC_MESSAGES/django.po +++ b/taiga/locale/pt_BR/LC_MESSAGES/django.po @@ -1,5 +1,5 @@ # taiga-back.taiga. -# Copyright (C) 2015 Taiga Dev Team +# Copyright (C) 2014-2015 Taiga Dev Team # This file is distributed under the same license as the taiga-back package. # # Translators: diff --git a/taiga/locale/ru/LC_MESSAGES/django.po b/taiga/locale/ru/LC_MESSAGES/django.po index dabfc39a..d79db4bb 100644 --- a/taiga/locale/ru/LC_MESSAGES/django.po +++ b/taiga/locale/ru/LC_MESSAGES/django.po @@ -1,5 +1,5 @@ # taiga-back.taiga. -# Copyright (C) 2015 Taiga Dev Team +# Copyright (C) 2014-2015 Taiga Dev Team # This file is distributed under the same license as the taiga-back package. # # Translators: diff --git a/taiga/locale/zh-Hant/LC_MESSAGES/django.po b/taiga/locale/zh-Hant/LC_MESSAGES/django.po index 089f07cd..1bf09ea4 100644 --- a/taiga/locale/zh-Hant/LC_MESSAGES/django.po +++ b/taiga/locale/zh-Hant/LC_MESSAGES/django.po @@ -1,5 +1,5 @@ # taiga-back.taiga. -# Copyright (C) 2015 Taiga Dev Team +# Copyright (C) 2014-2015 Taiga Dev Team # This file is distributed under the same license as the taiga-back package. # # Translators: diff --git a/taiga/mdrender/__init__.py b/taiga/mdrender/__init__.py index 8cef3795..abec3c69 100644 --- a/taiga/mdrender/__init__.py +++ b/taiga/mdrender/__init__.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/mdrender/extensions/target_link.py b/taiga/mdrender/extensions/target_link.py index 992399ea..7754d94b 100644 --- a/taiga/mdrender/extensions/target_link.py +++ b/taiga/mdrender/extensions/target_link.py @@ -1,7 +1,7 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán -# Copyright (C) 2015 Alejandro Alonso +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Alejandro Alonso # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/mdrender/extensions/wikilinks.py b/taiga/mdrender/extensions/wikilinks.py index 1fd703b3..9d106d82 100644 --- a/taiga/mdrender/extensions/wikilinks.py +++ b/taiga/mdrender/extensions/wikilinks.py @@ -1,7 +1,7 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán -# Copyright (C) 2014 Anler Hernández +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Anler Hernández # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/mdrender/service.py b/taiga/mdrender/service.py index 077c0c63..326f4b2c 100644 --- a/taiga/mdrender/service.py +++ b/taiga/mdrender/service.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the @@ -75,11 +75,11 @@ def _make_extensions_list(project=None): MentionsExtension(), TaigaReferencesExtension(project), TargetBlankLinkExtension(), - "extra", - "codehilite", - "sane_lists", - "toc", - "nl2br"] + "markdown.extensions.extra", + "markdown.extensions.codehilite", + "markdown.extensions.sane_lists", + "markdown.extensions.toc", + "markdown.extensions.nl2br"] import diff_match_patch diff --git a/taiga/mdrender/templatetags/functions.py b/taiga/mdrender/templatetags/functions.py index 7608f553..fc15c39f 100644 --- a/taiga/mdrender/templatetags/functions.py +++ b/taiga/mdrender/templatetags/functions.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the @@ -18,10 +18,8 @@ from django_jinja import library from jinja2 import Markup from taiga.mdrender.service import render -register = library.Library() - -@register.global_function +@library.global_function def mdrender(project, text) -> str: if text: return Markup(render(project, text)) diff --git a/taiga/permissions/permissions.py b/taiga/permissions/permissions.py index 37cd32de..7761abbf 100644 --- a/taiga/permissions/permissions.py +++ b/taiga/permissions/permissions.py @@ -1,7 +1,7 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán -# Copyright (C) 2014 Anler Hernández +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Anler Hernández # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/permissions/service.py b/taiga/permissions/service.py index 3a79b6ee..90ed3050 100644 --- a/taiga/permissions/service.py +++ b/taiga/permissions/service.py @@ -1,7 +1,7 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán -# Copyright (C) 2014 Anler Hernández +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Anler Hernández # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/__init__.py b/taiga/projects/__init__.py index 48278e73..c8c59bf3 100644 --- a/taiga/projects/__init__.py +++ b/taiga/projects/__init__.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/admin.py b/taiga/projects/admin.py index 5dcc9758..0dee8cde 100644 --- a/taiga/projects/admin.py +++ b/taiga/projects/admin.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/api.py b/taiga/projects/api.py index 78993322..efec71c1 100644 --- a/taiga/projects/api.py +++ b/taiga/projects/api.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/apps.py b/taiga/projects/apps.py index 06b42de8..07938210 100644 --- a/taiga/projects/apps.py +++ b/taiga/projects/apps.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/attachments/__init__.py b/taiga/projects/attachments/__init__.py index fcc59d48..17882254 100644 --- a/taiga/projects/attachments/__init__.py +++ b/taiga/projects/attachments/__init__.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/attachments/admin.py b/taiga/projects/attachments/admin.py index e8d78de6..c30b4f52 100644 --- a/taiga/projects/attachments/admin.py +++ b/taiga/projects/attachments/admin.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/attachments/api.py b/taiga/projects/attachments/api.py index a369a5cb..0a40f8b7 100644 --- a/taiga/projects/attachments/api.py +++ b/taiga/projects/attachments/api.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/attachments/apps.py b/taiga/projects/attachments/apps.py index a4497463..c52458b9 100644 --- a/taiga/projects/attachments/apps.py +++ b/taiga/projects/attachments/apps.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/attachments/models.py b/taiga/projects/attachments/models.py index 30fa5c22..f5c089fa 100644 --- a/taiga/projects/attachments/models.py +++ b/taiga/projects/attachments/models.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/attachments/permissions.py b/taiga/projects/attachments/permissions.py index f709c378..603d4f98 100644 --- a/taiga/projects/attachments/permissions.py +++ b/taiga/projects/attachments/permissions.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/attachments/serializers.py b/taiga/projects/attachments/serializers.py index f255fa8e..549acabd 100644 --- a/taiga/projects/attachments/serializers.py +++ b/taiga/projects/attachments/serializers.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/choices.py b/taiga/projects/choices.py index 4cf2c843..0e443847 100644 --- a/taiga/projects/choices.py +++ b/taiga/projects/choices.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/custom_attributes/admin.py b/taiga/projects/custom_attributes/admin.py index 201a31f0..fe0e3c6b 100644 --- a/taiga/projects/custom_attributes/admin.py +++ b/taiga/projects/custom_attributes/admin.py @@ -1,6 +1,6 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/custom_attributes/api.py b/taiga/projects/custom_attributes/api.py index c93bb790..bb490d4e 100644 --- a/taiga/projects/custom_attributes/api.py +++ b/taiga/projects/custom_attributes/api.py @@ -1,6 +1,6 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/custom_attributes/models.py b/taiga/projects/custom_attributes/models.py index 6d05121c..e75a34e1 100644 --- a/taiga/projects/custom_attributes/models.py +++ b/taiga/projects/custom_attributes/models.py @@ -1,6 +1,6 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/custom_attributes/permissions.py b/taiga/projects/custom_attributes/permissions.py index 14307d1a..7a780a57 100644 --- a/taiga/projects/custom_attributes/permissions.py +++ b/taiga/projects/custom_attributes/permissions.py @@ -1,6 +1,6 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/custom_attributes/serializers.py b/taiga/projects/custom_attributes/serializers.py index 71a5ff5f..4b82a189 100644 --- a/taiga/projects/custom_attributes/serializers.py +++ b/taiga/projects/custom_attributes/serializers.py @@ -1,6 +1,6 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/custom_attributes/services.py b/taiga/projects/custom_attributes/services.py index 7cbea6c4..1e5795cb 100644 --- a/taiga/projects/custom_attributes/services.py +++ b/taiga/projects/custom_attributes/services.py @@ -1,6 +1,6 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/custom_attributes/signals.py b/taiga/projects/custom_attributes/signals.py index fa90bb10..1e0e96e3 100644 --- a/taiga/projects/custom_attributes/signals.py +++ b/taiga/projects/custom_attributes/signals.py @@ -1,6 +1,6 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/history/api.py b/taiga/projects/history/api.py index 2d6c365b..9e7bef23 100644 --- a/taiga/projects/history/api.py +++ b/taiga/projects/history/api.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/history/choices.py b/taiga/projects/history/choices.py index 0895ca8c..1c38af8f 100644 --- a/taiga/projects/history/choices.py +++ b/taiga/projects/history/choices.py @@ -1,4 +1,4 @@ -# Copyright (C) 2014 Andrey Antukh +# Copyright (C) 2014-2015 Andrey Antukh # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/history/freeze_impl.py b/taiga/projects/history/freeze_impl.py index 77a81423..a51d3011 100644 --- a/taiga/projects/history/freeze_impl.py +++ b/taiga/projects/history/freeze_impl.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/history/mixins.py b/taiga/projects/history/mixins.py index 45a7c97e..27fa7632 100644 --- a/taiga/projects/history/mixins.py +++ b/taiga/projects/history/mixins.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/history/models.py b/taiga/projects/history/models.py index 4cfcaccc..cea42ae4 100644 --- a/taiga/projects/history/models.py +++ b/taiga/projects/history/models.py @@ -1,4 +1,4 @@ -# Copyright (C) 2014 Andrey Antukh +# Copyright (C) 2014-2015 Andrey Antukh # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/history/permissions.py b/taiga/projects/history/permissions.py index c0adf8d6..636fe6a9 100644 --- a/taiga/projects/history/permissions.py +++ b/taiga/projects/history/permissions.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/history/serializers.py b/taiga/projects/history/serializers.py index ac6cf0d2..eab06fa7 100644 --- a/taiga/projects/history/serializers.py +++ b/taiga/projects/history/serializers.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/history/services.py b/taiga/projects/history/services.py index 317a9374..a199f7ad 100644 --- a/taiga/projects/history/services.py +++ b/taiga/projects/history/services.py @@ -1,4 +1,4 @@ -# Copyright (C) 2014 Andrey Antukh +# Copyright (C) 2014-2015 Andrey Antukh # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/history/templatetags/functions.py b/taiga/projects/history/templatetags/functions.py index 8d616b73..b5118c3a 100644 --- a/taiga/projects/history/templatetags/functions.py +++ b/taiga/projects/history/templatetags/functions.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the @@ -18,8 +18,6 @@ from django.utils.translation import ugettext_lazy as _ from django_jinja import library -register = library.Library() - EXTRA_FIELD_VERBOSE_NAMES = { "description_diff": _("description"), @@ -29,7 +27,7 @@ EXTRA_FIELD_VERBOSE_NAMES = { } -@register.global_function +@library.global_function def verbose_name(obj_class, field_name): if field_name in EXTRA_FIELD_VERBOSE_NAMES: return EXTRA_FIELD_VERBOSE_NAMES[field_name] @@ -39,6 +37,7 @@ def verbose_name(obj_class, field_name): except Exception: return field_name -@register.global_function + +@library.global_function def lists_diff(list1, list2): return (list(set(list1) - set(list2))) diff --git a/taiga/projects/issues/__init__.py b/taiga/projects/issues/__init__.py index aff90c37..b6be563e 100644 --- a/taiga/projects/issues/__init__.py +++ b/taiga/projects/issues/__init__.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/issues/admin.py b/taiga/projects/issues/admin.py index fe891719..7da02b5b 100644 --- a/taiga/projects/issues/admin.py +++ b/taiga/projects/issues/admin.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/issues/api.py b/taiga/projects/issues/api.py index e187c3df..1df9875e 100644 --- a/taiga/projects/issues/api.py +++ b/taiga/projects/issues/api.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/issues/apps.py b/taiga/projects/issues/apps.py index cc68fb73..485513f0 100644 --- a/taiga/projects/issues/apps.py +++ b/taiga/projects/issues/apps.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/issues/migrations/0006_remove_issue_watchers.py b/taiga/projects/issues/migrations/0006_remove_issue_watchers.py index 915ce22e..c612acb1 100644 --- a/taiga/projects/issues/migrations/0006_remove_issue_watchers.py +++ b/taiga/projects/issues/migrations/0006_remove_issue_watchers.py @@ -4,7 +4,7 @@ from __future__ import unicode_literals from django.db import connection from django.db import models, migrations from django.contrib.contenttypes.models import ContentType -from django.contrib.contenttypes.management import update_all_contenttypes +from taiga.base.utils.contenttypes import update_all_contenttypes def create_notifications(apps, schema_editor): update_all_contenttypes(verbosity=0) diff --git a/taiga/projects/issues/models.py b/taiga/projects/issues/models.py index 943509b3..81745d4a 100644 --- a/taiga/projects/issues/models.py +++ b/taiga/projects/issues/models.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/issues/permissions.py b/taiga/projects/issues/permissions.py index 91f988ca..8c8ddd4d 100644 --- a/taiga/projects/issues/permissions.py +++ b/taiga/projects/issues/permissions.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/issues/serializers.py b/taiga/projects/issues/serializers.py index f7978861..fac4ba30 100644 --- a/taiga/projects/issues/serializers.py +++ b/taiga/projects/issues/serializers.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/issues/services.py b/taiga/projects/issues/services.py index d1156227..2929aef1 100644 --- a/taiga/projects/issues/services.py +++ b/taiga/projects/issues/services.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/issues/signals.py b/taiga/projects/issues/signals.py index 9389d410..1a50a911 100644 --- a/taiga/projects/issues/signals.py +++ b/taiga/projects/issues/signals.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/management/commands/sample_data.py b/taiga/projects/management/commands/sample_data.py index 26950c60..84a941e1 100644 --- a/taiga/projects/management/commands/sample_data.py +++ b/taiga/projects/management/commands/sample_data.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the @@ -21,7 +21,6 @@ from django.core.management.base import BaseCommand from django.db import transaction from django.utils.timezone import now from django.conf import settings -from django.contrib.webdesign import lorem_ipsum from django.contrib.contenttypes.models import ContentType from sampledatahelper.helper import SampleDataHelper diff --git a/taiga/projects/milestones/admin.py b/taiga/projects/milestones/admin.py index 52919e87..378928ce 100644 --- a/taiga/projects/milestones/admin.py +++ b/taiga/projects/milestones/admin.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/milestones/api.py b/taiga/projects/milestones/api.py index e2e62363..d9e044be 100644 --- a/taiga/projects/milestones/api.py +++ b/taiga/projects/milestones/api.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/milestones/migrations/0002_remove_milestone_watchers.py b/taiga/projects/milestones/migrations/0002_remove_milestone_watchers.py index 162b6c1c..0d8a3a61 100644 --- a/taiga/projects/milestones/migrations/0002_remove_milestone_watchers.py +++ b/taiga/projects/milestones/migrations/0002_remove_milestone_watchers.py @@ -4,7 +4,7 @@ from __future__ import unicode_literals from django.db import connection from django.db import models, migrations from django.contrib.contenttypes.models import ContentType -from django.contrib.contenttypes.management import update_all_contenttypes +from taiga.base.utils.contenttypes import update_all_contenttypes def create_notifications(apps, schema_editor): update_all_contenttypes(verbosity=0) diff --git a/taiga/projects/milestones/models.py b/taiga/projects/milestones/models.py index 7e18048e..0e380c9b 100644 --- a/taiga/projects/milestones/models.py +++ b/taiga/projects/milestones/models.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/milestones/permissions.py b/taiga/projects/milestones/permissions.py index 843c0c8a..c088d9a9 100644 --- a/taiga/projects/milestones/permissions.py +++ b/taiga/projects/milestones/permissions.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/milestones/serializers.py b/taiga/projects/milestones/serializers.py index 471b9546..50e90a49 100644 --- a/taiga/projects/milestones/serializers.py +++ b/taiga/projects/milestones/serializers.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/milestones/services.py b/taiga/projects/milestones/services.py index a94be521..f852403f 100644 --- a/taiga/projects/milestones/services.py +++ b/taiga/projects/milestones/services.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/mixins/blocked.py b/taiga/projects/mixins/blocked.py index 43ce45e7..34db95b1 100644 --- a/taiga/projects/mixins/blocked.py +++ b/taiga/projects/mixins/blocked.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/mixins/on_destroy.py b/taiga/projects/mixins/on_destroy.py index 6fe69c7b..6ba1c40f 100644 --- a/taiga/projects/mixins/on_destroy.py +++ b/taiga/projects/mixins/on_destroy.py @@ -1,6 +1,6 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/mixins/ordering.py b/taiga/projects/mixins/ordering.py index b180bc1f..29723fd3 100644 --- a/taiga/projects/mixins/ordering.py +++ b/taiga/projects/mixins/ordering.py @@ -1,6 +1,6 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/models.py b/taiga/projects/models.py index fe89fac8..c0455e4b 100644 --- a/taiga/projects/models.py +++ b/taiga/projects/models.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/notifications/admin.py b/taiga/projects/notifications/admin.py index 2dc22d61..a2278932 100644 --- a/taiga/projects/notifications/admin.py +++ b/taiga/projects/notifications/admin.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/notifications/api.py b/taiga/projects/notifications/api.py index d4b92c96..0d497be4 100644 --- a/taiga/projects/notifications/api.py +++ b/taiga/projects/notifications/api.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/notifications/choices.py b/taiga/projects/notifications/choices.py index 04e28d89..651d5909 100644 --- a/taiga/projects/notifications/choices.py +++ b/taiga/projects/notifications/choices.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/notifications/management/commands/send_notifications.py b/taiga/projects/notifications/management/commands/send_notifications.py index 4f2e4643..5aac7558 100644 --- a/taiga/projects/notifications/management/commands/send_notifications.py +++ b/taiga/projects/notifications/management/commands/send_notifications.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/notifications/migrations/0005_auto_20151005_1357.py b/taiga/projects/notifications/migrations/0005_auto_20151005_1357.py new file mode 100644 index 00000000..3d38d5e6 --- /dev/null +++ b/taiga/projects/notifications/migrations/0005_auto_20151005_1357.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +from django.conf import settings + + +class Migration(migrations.Migration): + + dependencies = [ + ('notifications', '0004_watched'), + ] + + operations = [ + migrations.AlterField( + model_name='historychangenotification', + name='history_entries', + field=models.ManyToManyField(verbose_name='history entries', to='history.HistoryEntry', related_name='+'), + ), + migrations.AlterField( + model_name='historychangenotification', + name='notify_users', + field=models.ManyToManyField(verbose_name='notify users', to=settings.AUTH_USER_MODEL, related_name='+'), + ), + ] diff --git a/taiga/projects/notifications/mixins.py b/taiga/projects/notifications/mixins.py index fe1812f4..f62d1157 100644 --- a/taiga/projects/notifications/mixins.py +++ b/taiga/projects/notifications/mixins.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/notifications/models.py b/taiga/projects/notifications/models.py index 603bdd85..6ce2356b 100644 --- a/taiga/projects/notifications/models.py +++ b/taiga/projects/notifications/models.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the @@ -61,10 +61,10 @@ class HistoryChangeNotification(models.Model): verbose_name=_("created date time")) updated_datetime = models.DateTimeField(null=False, blank=False, auto_now_add=True, verbose_name=_("updated date time")) - history_entries = models.ManyToManyField("history.HistoryEntry", null=True, blank=True, + history_entries = models.ManyToManyField("history.HistoryEntry", verbose_name=_("history entries"), related_name="+") - notify_users = models.ManyToManyField("users.User", null=True, blank=True, + notify_users = models.ManyToManyField("users.User", verbose_name=_("notify users"), related_name="+") project = models.ForeignKey("projects.Project", null=False, blank=False, diff --git a/taiga/projects/notifications/permissions.py b/taiga/projects/notifications/permissions.py index a89b9caf..699e0a4a 100644 --- a/taiga/projects/notifications/permissions.py +++ b/taiga/projects/notifications/permissions.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/notifications/serializers.py b/taiga/projects/notifications/serializers.py index 9b0b99cd..e0c988b5 100644 --- a/taiga/projects/notifications/serializers.py +++ b/taiga/projects/notifications/serializers.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/notifications/services.py b/taiga/projects/notifications/services.py index e4bd8a3f..be6dc949 100644 --- a/taiga/projects/notifications/services.py +++ b/taiga/projects/notifications/services.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the @@ -28,9 +28,8 @@ from django.utils import timezone from django.conf import settings from django.utils.translation import ugettext as _ -from djmail import template_mail - from taiga.base import exceptions as exc +from taiga.base.mails import InlineCSSTemplateMail from taiga.projects.notifications.choices import NotifyLevel from taiga.projects.history.choices import HistoryType from taiga.projects.history.services import (make_key_from_model_object, @@ -202,7 +201,7 @@ def _make_template_mail(name:str): of it. """ cls = type("InlineCSSTemplateMail", - (template_mail.InlineCSSTemplateMail,), + (InlineCSSTemplateMail,), {"name": name}) return cls() diff --git a/taiga/projects/notifications/utils.py b/taiga/projects/notifications/utils.py index 510ab76a..3df08851 100644 --- a/taiga/projects/notifications/utils.py +++ b/taiga/projects/notifications/utils.py @@ -1,7 +1,7 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán -# Copyright (C) 2014 Anler Hernández +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Anler Hernández # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/notifications/validators.py b/taiga/projects/notifications/validators.py index b28e0712..a79cb8b7 100644 --- a/taiga/projects/notifications/validators.py +++ b/taiga/projects/notifications/validators.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/occ/__init__.py b/taiga/projects/occ/__init__.py index 34a54708..a25f77db 100644 --- a/taiga/projects/occ/__init__.py +++ b/taiga/projects/occ/__init__.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/occ/mixins.py b/taiga/projects/occ/mixins.py index 777a59b4..b473eb2b 100644 --- a/taiga/projects/occ/mixins.py +++ b/taiga/projects/occ/mixins.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/permissions.py b/taiga/projects/permissions.py index 140faddc..0925ce8a 100644 --- a/taiga/projects/permissions.py +++ b/taiga/projects/permissions.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/references/api.py b/taiga/projects/references/api.py index 97b41de4..c515f6d1 100644 --- a/taiga/projects/references/api.py +++ b/taiga/projects/references/api.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/references/models.py b/taiga/projects/references/models.py index 583c69c8..6e141c8d 100644 --- a/taiga/projects/references/models.py +++ b/taiga/projects/references/models.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/references/permissions.py b/taiga/projects/references/permissions.py index 251e0f88..aa818c49 100644 --- a/taiga/projects/references/permissions.py +++ b/taiga/projects/references/permissions.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/references/sequences.py b/taiga/projects/references/sequences.py index 6c90abaa..ca6a4f62 100644 --- a/taiga/projects/references/sequences.py +++ b/taiga/projects/references/sequences.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/references/serializers.py b/taiga/projects/references/serializers.py index 6fb27432..ad9b5def 100644 --- a/taiga/projects/references/serializers.py +++ b/taiga/projects/references/serializers.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/references/services.py b/taiga/projects/references/services.py index c40ca311..203cd4e2 100644 --- a/taiga/projects/references/services.py +++ b/taiga/projects/references/services.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/serializers.py b/taiga/projects/serializers.py index 5443c0c3..7a3380a8 100644 --- a/taiga/projects/serializers.py +++ b/taiga/projects/serializers.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/services/__init__.py b/taiga/projects/services/__init__.py index 8a7284d9..d63cbe79 100644 --- a/taiga/projects/services/__init__.py +++ b/taiga/projects/services/__init__.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/services/bulk_update_order.py b/taiga/projects/services/bulk_update_order.py index 40499346..83b38a90 100644 --- a/taiga/projects/services/bulk_update_order.py +++ b/taiga/projects/services/bulk_update_order.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/services/filters.py b/taiga/projects/services/filters.py index 5a2d1ff3..e9c3f28e 100644 --- a/taiga/projects/services/filters.py +++ b/taiga/projects/services/filters.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/services/invitations.py b/taiga/projects/services/invitations.py index 4196612c..50e1e01e 100644 --- a/taiga/projects/services/invitations.py +++ b/taiga/projects/services/invitations.py @@ -1,17 +1,16 @@ from django.apps import apps from django.conf import settings -from djmail.template_mail import MagicMailBuilder, InlineCSSTemplateMail +from taiga.base.mails import mail_builder def send_invitation(invitation): """Send an invitation email""" - mbuilder = MagicMailBuilder(template_mail_cls=InlineCSSTemplateMail) if invitation.user: - template = mbuilder.membership_notification + template = mail_builder.membership_notification email = template(invitation.user, {"membership": invitation}) else: - template = mbuilder.membership_invitation + template = mail_builder.membership_invitation email = template(invitation.email, {"membership": invitation}) email.send() diff --git a/taiga/projects/services/modules_config.py b/taiga/projects/services/modules_config.py index 4b1cbae8..c0b92d77 100644 --- a/taiga/projects/services/modules_config.py +++ b/taiga/projects/services/modules_config.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/services/stats.py b/taiga/projects/services/stats.py index 88b2a47c..2a4753c4 100644 --- a/taiga/projects/services/stats.py +++ b/taiga/projects/services/stats.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/services/tags_colors.py b/taiga/projects/services/tags_colors.py index 52ac61ff..14d1dbce 100644 --- a/taiga/projects/services/tags_colors.py +++ b/taiga/projects/services/tags_colors.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/signals.py b/taiga/projects/signals.py index 6cfb0ddf..b4652a8b 100644 --- a/taiga/projects/signals.py +++ b/taiga/projects/signals.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/tasks/__init__.py b/taiga/projects/tasks/__init__.py index 0af24e1d..6e63190e 100644 --- a/taiga/projects/tasks/__init__.py +++ b/taiga/projects/tasks/__init__.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/tasks/admin.py b/taiga/projects/tasks/admin.py index 5295e7ca..4c451c17 100644 --- a/taiga/projects/tasks/admin.py +++ b/taiga/projects/tasks/admin.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/tasks/api.py b/taiga/projects/tasks/api.py index 812458f1..d48791e2 100644 --- a/taiga/projects/tasks/api.py +++ b/taiga/projects/tasks/api.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/tasks/apps.py b/taiga/projects/tasks/apps.py index 8d9a112d..d495c964 100644 --- a/taiga/projects/tasks/apps.py +++ b/taiga/projects/tasks/apps.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/tasks/migrations/0008_remove_task_watchers.py b/taiga/projects/tasks/migrations/0008_remove_task_watchers.py index 5a8b0618..639e12b1 100644 --- a/taiga/projects/tasks/migrations/0008_remove_task_watchers.py +++ b/taiga/projects/tasks/migrations/0008_remove_task_watchers.py @@ -4,7 +4,7 @@ from __future__ import unicode_literals from django.db import connection from django.db import models, migrations from django.contrib.contenttypes.models import ContentType -from django.contrib.contenttypes.management import update_all_contenttypes +from taiga.base.utils.contenttypes import update_all_contenttypes def create_notifications(apps, schema_editor): update_all_contenttypes(verbosity=0) diff --git a/taiga/projects/tasks/models.py b/taiga/projects/tasks/models.py index 37176fab..c43869cb 100644 --- a/taiga/projects/tasks/models.py +++ b/taiga/projects/tasks/models.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/tasks/permissions.py b/taiga/projects/tasks/permissions.py index cf12a283..7a12cd13 100644 --- a/taiga/projects/tasks/permissions.py +++ b/taiga/projects/tasks/permissions.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/tasks/serializers.py b/taiga/projects/tasks/serializers.py index 81964367..deb9af68 100644 --- a/taiga/projects/tasks/serializers.py +++ b/taiga/projects/tasks/serializers.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/tasks/services.py b/taiga/projects/tasks/services.py index 8864d893..46cbedfd 100644 --- a/taiga/projects/tasks/services.py +++ b/taiga/projects/tasks/services.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/tasks/signals.py b/taiga/projects/tasks/signals.py index bdc622e9..07a7738d 100644 --- a/taiga/projects/tasks/signals.py +++ b/taiga/projects/tasks/signals.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/translations.py b/taiga/projects/translations.py index 74b4b53e..b0b32671 100644 --- a/taiga/projects/translations.py +++ b/taiga/projects/translations.py @@ -1,6 +1,6 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/userstories/__init__.py b/taiga/projects/userstories/__init__.py index 572f9d9a..13d664b6 100644 --- a/taiga/projects/userstories/__init__.py +++ b/taiga/projects/userstories/__init__.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/userstories/admin.py b/taiga/projects/userstories/admin.py index 9cb3e667..2887e836 100644 --- a/taiga/projects/userstories/admin.py +++ b/taiga/projects/userstories/admin.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/userstories/api.py b/taiga/projects/userstories/api.py index 9fce8fb0..710e4461 100644 --- a/taiga/projects/userstories/api.py +++ b/taiga/projects/userstories/api.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/userstories/apps.py b/taiga/projects/userstories/apps.py index 948e7c08..240e0375 100644 --- a/taiga/projects/userstories/apps.py +++ b/taiga/projects/userstories/apps.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/userstories/migrations/0010_remove_userstory_watchers.py b/taiga/projects/userstories/migrations/0010_remove_userstory_watchers.py index e2ff7538..e3b94599 100644 --- a/taiga/projects/userstories/migrations/0010_remove_userstory_watchers.py +++ b/taiga/projects/userstories/migrations/0010_remove_userstory_watchers.py @@ -4,7 +4,7 @@ from __future__ import unicode_literals from django.db import connection from django.db import models, migrations from django.contrib.contenttypes.models import ContentType -from django.contrib.contenttypes.management import update_all_contenttypes +from taiga.base.utils.contenttypes import update_all_contenttypes def create_notifications(apps, schema_editor): update_all_contenttypes(verbosity=0) diff --git a/taiga/projects/userstories/models.py b/taiga/projects/userstories/models.py index 5424cb7f..2b29a275 100644 --- a/taiga/projects/userstories/models.py +++ b/taiga/projects/userstories/models.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/userstories/permissions.py b/taiga/projects/userstories/permissions.py index fb9361ab..95a8e622 100644 --- a/taiga/projects/userstories/permissions.py +++ b/taiga/projects/userstories/permissions.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/userstories/serializers.py b/taiga/projects/userstories/serializers.py index 35801ba0..c3f93d67 100644 --- a/taiga/projects/userstories/serializers.py +++ b/taiga/projects/userstories/serializers.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/userstories/services.py b/taiga/projects/userstories/services.py index c06309be..d1e54394 100644 --- a/taiga/projects/userstories/services.py +++ b/taiga/projects/userstories/services.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/userstories/signals.py b/taiga/projects/userstories/signals.py index 8764b60d..ce452992 100644 --- a/taiga/projects/userstories/signals.py +++ b/taiga/projects/userstories/signals.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/userstories/validators.py b/taiga/projects/userstories/validators.py index 3efd7b8f..f8e2440d 100644 --- a/taiga/projects/userstories/validators.py +++ b/taiga/projects/userstories/validators.py @@ -1,6 +1,6 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/validators.py b/taiga/projects/validators.py index b6ed0509..11cd9f38 100644 --- a/taiga/projects/validators.py +++ b/taiga/projects/validators.py @@ -1,6 +1,6 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/votes/admin.py b/taiga/projects/votes/admin.py index 4e06ae8f..3ab238aa 100644 --- a/taiga/projects/votes/admin.py +++ b/taiga/projects/votes/admin.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/votes/mixins/serializers.py b/taiga/projects/votes/mixins/serializers.py index c7f2eb5a..ed17d8a3 100644 --- a/taiga/projects/votes/mixins/serializers.py +++ b/taiga/projects/votes/mixins/serializers.py @@ -1,6 +1,6 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/votes/mixins/viewsets.py b/taiga/projects/votes/mixins/viewsets.py index 8567b3d0..5148af7f 100644 --- a/taiga/projects/votes/mixins/viewsets.py +++ b/taiga/projects/votes/mixins/viewsets.py @@ -1,6 +1,6 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/votes/models.py b/taiga/projects/votes/models.py index a1af1ff7..6f5abbe5 100644 --- a/taiga/projects/votes/models.py +++ b/taiga/projects/votes/models.py @@ -1,7 +1,7 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán -# Copyright (C) 2014 Anler Hernández +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Anler Hernández # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/votes/serializers.py b/taiga/projects/votes/serializers.py index b6ab72a8..210c6057 100644 --- a/taiga/projects/votes/serializers.py +++ b/taiga/projects/votes/serializers.py @@ -1,7 +1,7 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán -# Copyright (C) 2014 Anler Hernández +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Anler Hernández # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/votes/services.py b/taiga/projects/votes/services.py index 8a6749dc..093b685e 100644 --- a/taiga/projects/votes/services.py +++ b/taiga/projects/votes/services.py @@ -1,7 +1,7 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán -# Copyright (C) 2014 Anler Hernández +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Anler Hernández # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/votes/utils.py b/taiga/projects/votes/utils.py index bc7d9d14..dd703bcf 100644 --- a/taiga/projects/votes/utils.py +++ b/taiga/projects/votes/utils.py @@ -1,7 +1,7 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán -# Copyright (C) 2014 Anler Hernández +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Anler Hernández # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/wiki/admin.py b/taiga/projects/wiki/admin.py index ca929fb3..ed90f65c 100644 --- a/taiga/projects/wiki/admin.py +++ b/taiga/projects/wiki/admin.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/wiki/api.py b/taiga/projects/wiki/api.py index dba3ccb0..60cfe8c0 100644 --- a/taiga/projects/wiki/api.py +++ b/taiga/projects/wiki/api.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/wiki/migrations/0002_remove_wikipage_watchers.py b/taiga/projects/wiki/migrations/0002_remove_wikipage_watchers.py index 7d7af0b6..44d6d5ac 100644 --- a/taiga/projects/wiki/migrations/0002_remove_wikipage_watchers.py +++ b/taiga/projects/wiki/migrations/0002_remove_wikipage_watchers.py @@ -4,7 +4,7 @@ from __future__ import unicode_literals from django.db import connection from django.db import models, migrations from django.contrib.contenttypes.models import ContentType -from django.contrib.contenttypes.management import update_all_contenttypes +from taiga.base.utils.contenttypes import update_all_contenttypes def create_notifications(apps, schema_editor): update_all_contenttypes(verbosity=0) diff --git a/taiga/projects/wiki/models.py b/taiga/projects/wiki/models.py index 4f8c6f4c..0cff1b21 100644 --- a/taiga/projects/wiki/models.py +++ b/taiga/projects/wiki/models.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/wiki/permissions.py b/taiga/projects/wiki/permissions.py index c64ac985..c1dd1e74 100644 --- a/taiga/projects/wiki/permissions.py +++ b/taiga/projects/wiki/permissions.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/projects/wiki/serializers.py b/taiga/projects/wiki/serializers.py index 22c9b8bd..43db324c 100644 --- a/taiga/projects/wiki/serializers.py +++ b/taiga/projects/wiki/serializers.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/routers.py b/taiga/routers.py index be507983..5e972b83 100644 --- a/taiga/routers.py +++ b/taiga/routers.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/searches/api.py b/taiga/searches/api.py index 9fec9bb8..5a985664 100644 --- a/taiga/searches/api.py +++ b/taiga/searches/api.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/searches/serializers.py b/taiga/searches/serializers.py index ee713fff..3ec5f289 100644 --- a/taiga/searches/serializers.py +++ b/taiga/searches/serializers.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/searches/services.py b/taiga/searches/services.py index dcac7f33..d2f84798 100644 --- a/taiga/searches/services.py +++ b/taiga/searches/services.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/stats/__init__.py b/taiga/stats/__init__.py index 92ed9d3d..28eceffa 100644 --- a/taiga/stats/__init__.py +++ b/taiga/stats/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015 Taiga Agile LLC +# Copyright (C) 2014-2015 Taiga Agile LLC # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/stats/api.py b/taiga/stats/api.py index bb2948e4..ab765ed9 100644 --- a/taiga/stats/api.py +++ b/taiga/stats/api.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015 Taiga Agile LLC +# Copyright (C) 2014-2015 Taiga Agile LLC # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/stats/apps.py b/taiga/stats/apps.py index e8b8e63a..dc893e5c 100644 --- a/taiga/stats/apps.py +++ b/taiga/stats/apps.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015 Taiga Agile LLC +# Copyright (C) 2014-2015 Taiga Agile LLC # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/stats/permissions.py b/taiga/stats/permissions.py index 0eb1a362..16fb72a8 100644 --- a/taiga/stats/permissions.py +++ b/taiga/stats/permissions.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015 Taiga Agile LLC +# Copyright (C) 2014-2015 Taiga Agile LLC # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/stats/routers.py b/taiga/stats/routers.py index 7257b473..dcab7819 100644 --- a/taiga/stats/routers.py +++ b/taiga/stats/routers.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015 Taiga Agile LLC +# Copyright (C) 2014-2015 Taiga Agile LLC # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/stats/services.py b/taiga/stats/services.py index 3e4fac83..61e30c51 100644 --- a/taiga/stats/services.py +++ b/taiga/stats/services.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015 Taiga Agile LLC +# Copyright (C) 2014-2015 Taiga Agile LLC # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/timeline/__init__.py b/taiga/timeline/__init__.py index 5e6960c6..21c6a821 100644 --- a/taiga/timeline/__init__.py +++ b/taiga/timeline/__init__.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/timeline/api.py b/taiga/timeline/api.py index 851a693f..49504499 100644 --- a/taiga/timeline/api.py +++ b/taiga/timeline/api.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/timeline/apps.py b/taiga/timeline/apps.py index cbdea045..7b926f9e 100644 --- a/taiga/timeline/apps.py +++ b/taiga/timeline/apps.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/timeline/management/commands/_clear_unnecessary_new_membership_entries.py b/taiga/timeline/management/commands/_clear_unnecessary_new_membership_entries.py index 7790b753..b4233923 100644 --- a/taiga/timeline/management/commands/_clear_unnecessary_new_membership_entries.py +++ b/taiga/timeline/management/commands/_clear_unnecessary_new_membership_entries.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/timeline/management/commands/_rebuild_timeline_for_user_creation.py b/taiga/timeline/management/commands/_rebuild_timeline_for_user_creation.py index 78e637d1..bac46080 100644 --- a/taiga/timeline/management/commands/_rebuild_timeline_for_user_creation.py +++ b/taiga/timeline/management/commands/_rebuild_timeline_for_user_creation.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/timeline/management/commands/_update_timeline_for_updated_tasks.py b/taiga/timeline/management/commands/_update_timeline_for_updated_tasks.py index 1d145d30..ab1e4047 100644 --- a/taiga/timeline/management/commands/_update_timeline_for_updated_tasks.py +++ b/taiga/timeline/management/commands/_update_timeline_for_updated_tasks.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/timeline/management/commands/rebuild_timeline.py b/taiga/timeline/management/commands/rebuild_timeline.py index 5d95d4e4..a7a72955 100644 --- a/taiga/timeline/management/commands/rebuild_timeline.py +++ b/taiga/timeline/management/commands/rebuild_timeline.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/timeline/management/commands/rebuild_timeline_iterating_per_projects.py b/taiga/timeline/management/commands/rebuild_timeline_iterating_per_projects.py index 527a85bf..008da7b8 100644 --- a/taiga/timeline/management/commands/rebuild_timeline_iterating_per_projects.py +++ b/taiga/timeline/management/commands/rebuild_timeline_iterating_per_projects.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/timeline/models.py b/taiga/timeline/models.py index ac181842..c92a87c8 100644 --- a/taiga/timeline/models.py +++ b/taiga/timeline/models.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/timeline/permissions.py b/taiga/timeline/permissions.py index f07ee929..5aae5df4 100644 --- a/taiga/timeline/permissions.py +++ b/taiga/timeline/permissions.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/timeline/serializers.py b/taiga/timeline/serializers.py index 85a8c77f..f5defc56 100644 --- a/taiga/timeline/serializers.py +++ b/taiga/timeline/serializers.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/timeline/service.py b/taiga/timeline/service.py index a86965a1..cc03d676 100644 --- a/taiga/timeline/service.py +++ b/taiga/timeline/service.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/timeline/signals.py b/taiga/timeline/signals.py index 1a379f13..0aafb831 100644 --- a/taiga/timeline/signals.py +++ b/taiga/timeline/signals.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/timeline/timeline_implementations.py b/taiga/timeline/timeline_implementations.py index 2b911607..8d85652c 100644 --- a/taiga/timeline/timeline_implementations.py +++ b/taiga/timeline/timeline_implementations.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/urls.py b/taiga/urls.py index 416da685..33407f0f 100644 --- a/taiga/urls.py +++ b/taiga/urls.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/users/admin.py b/taiga/users/admin.py index b2cd50cf..57055b2c 100644 --- a/taiga/users/admin.py +++ b/taiga/users/admin.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/users/api.py b/taiga/users/api.py index 1d41d5e3..4c44422c 100644 --- a/taiga/users/api.py +++ b/taiga/users/api.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the @@ -33,13 +33,11 @@ from taiga.base.api import ModelCrudViewSet from taiga.base.filters import PermissionBasedFilterBackend from taiga.base.api.utils import get_object_or_404 from taiga.base.filters import MembersFilterBackend +from taiga.base.mails import mail_builder from taiga.projects.votes import services as votes_service from easy_thumbnails.source_generators import pil_image -from djmail.template_mail import MagicMailBuilder -from djmail.template_mail import InlineCSSTemplateMail - from . import models from . import serializers from . import permissions @@ -189,8 +187,7 @@ class UsersViewSet(ModelCrudViewSet): user.token = str(uuid.uuid1()) user.save(update_fields=["token"]) - mbuilder = MagicMailBuilder(template_mail_cls=InlineCSSTemplateMail) - email = mbuilder.password_recovery(user, {"user": user}) + email = mail_builder.password_recovery(user, {"user": user}) email.send() return response.Ok({"detail": _("Mail sended successful!")}) @@ -314,8 +311,7 @@ class UsersViewSet(ModelCrudViewSet): request.user.email_token = str(uuid.uuid1()) request.user.new_email = new_email request.user.save(update_fields=["email_token", "new_email"]) - mbuilder = MagicMailBuilder(template_mail_cls=InlineCSSTemplateMail) - email = mbuilder.change_email(request.user.new_email, {"user": request.user, + email = mail_builder.change_email(request.user.new_email, {"user": request.user, "lang": request.user.lang}) email.send() diff --git a/taiga/users/filters.py b/taiga/users/filters.py index df7f04ae..8d2704b3 100644 --- a/taiga/users/filters.py +++ b/taiga/users/filters.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/users/forms.py b/taiga/users/forms.py index 1e7bb7ab..7d9521a6 100644 --- a/taiga/users/forms.py +++ b/taiga/users/forms.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the @@ -41,4 +41,4 @@ class UserCreationForm(DjangoUserCreationForm): class UserChangeForm(DjangoUserChangeForm): class Meta: model = User - + fields = '__all__' diff --git a/taiga/users/gravatar.py b/taiga/users/gravatar.py index aaae895f..f26fde9d 100644 --- a/taiga/users/gravatar.py +++ b/taiga/users/gravatar.py @@ -1,7 +1,7 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán -# Copyright (C) 2014 Anler Hernández +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Anler Hernández # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/users/migrations/0014_auto_20151005_1357.py b/taiga/users/migrations/0014_auto_20151005_1357.py new file mode 100644 index 00000000..ee24e169 --- /dev/null +++ b/taiga/users/migrations/0014_auto_20151005_1357.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +import django.contrib.auth.models + + +class Migration(migrations.Migration): + + dependencies = [ + ('users', '0013_auto_20150901_1600'), + ] + + operations = [ + migrations.AlterModelManagers( + name='user', + managers=[ + ('objects', django.contrib.auth.models.UserManager()), + ], + ), + migrations.AlterField( + model_name='user', + name='last_login', + field=models.DateTimeField(verbose_name='last login', blank=True, null=True), + ), + migrations.AlterField( + model_name='user', + name='new_email', + field=models.EmailField(verbose_name='new email address', blank=True, null=True, max_length=254), + ), + ] diff --git a/taiga/users/models.py b/taiga/users/models.py index 38b34559..b2828912 100644 --- a/taiga/users/models.py +++ b/taiga/users/models.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/users/permissions.py b/taiga/users/permissions.py index d5600d88..5426d3f5 100644 --- a/taiga/users/permissions.py +++ b/taiga/users/permissions.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/users/serializers.py b/taiga/users/serializers.py index f5e5c6d8..24e5eb82 100644 --- a/taiga/users/serializers.py +++ b/taiga/users/serializers.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/users/services.py b/taiga/users/services.py index d7f498d0..534b9b6e 100644 --- a/taiga/users/services.py +++ b/taiga/users/services.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/users/signals.py b/taiga/users/signals.py index e61cec01..f1bac392 100644 --- a/taiga/users/signals.py +++ b/taiga/users/signals.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/users/validators.py b/taiga/users/validators.py index 6989e739..bc3a5a0c 100644 --- a/taiga/users/validators.py +++ b/taiga/users/validators.py @@ -1,7 +1,7 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán -# Copyright (C) 2014 Anler Hernández +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Anler Hernández # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/userstorage/api.py b/taiga/userstorage/api.py index 6755f3ac..b767e5d9 100644 --- a/taiga/userstorage/api.py +++ b/taiga/userstorage/api.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/userstorage/filters.py b/taiga/userstorage/filters.py index a46b1e61..31e1062c 100644 --- a/taiga/userstorage/filters.py +++ b/taiga/userstorage/filters.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/userstorage/models.py b/taiga/userstorage/models.py index 70dfb9ab..31be0aae 100644 --- a/taiga/userstorage/models.py +++ b/taiga/userstorage/models.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/userstorage/permissions.py b/taiga/userstorage/permissions.py index 24c1693d..e3a049cb 100644 --- a/taiga/userstorage/permissions.py +++ b/taiga/userstorage/permissions.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/userstorage/serializers.py b/taiga/userstorage/serializers.py index 92e01c3f..ecbac6a2 100644 --- a/taiga/userstorage/serializers.py +++ b/taiga/userstorage/serializers.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/webhooks/__init__.py b/taiga/webhooks/__init__.py index 4f9173d3..57095ae0 100644 --- a/taiga/webhooks/__init__.py +++ b/taiga/webhooks/__init__.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/webhooks/api.py b/taiga/webhooks/api.py index cda88dd7..8b254d10 100644 --- a/taiga/webhooks/api.py +++ b/taiga/webhooks/api.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/webhooks/apps.py b/taiga/webhooks/apps.py index f0444d68..589afa48 100644 --- a/taiga/webhooks/apps.py +++ b/taiga/webhooks/apps.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/webhooks/models.py b/taiga/webhooks/models.py index 0704b77b..94e253aa 100644 --- a/taiga/webhooks/models.py +++ b/taiga/webhooks/models.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/webhooks/permissions.py b/taiga/webhooks/permissions.py index 40463642..a2ef0207 100644 --- a/taiga/webhooks/permissions.py +++ b/taiga/webhooks/permissions.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/webhooks/serializers.py b/taiga/webhooks/serializers.py index 3b0c90c8..9ea5a120 100644 --- a/taiga/webhooks/serializers.py +++ b/taiga/webhooks/serializers.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/webhooks/signal_handlers.py b/taiga/webhooks/signal_handlers.py index 6d31e2bd..193b100b 100644 --- a/taiga/webhooks/signal_handlers.py +++ b/taiga/webhooks/signal_handlers.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/taiga/webhooks/tasks.py b/taiga/webhooks/tasks.py index d905167f..1933ed63 100644 --- a/taiga/webhooks/tasks.py +++ b/taiga/webhooks/tasks.py @@ -1,6 +1,6 @@ # Copyright (C) 2013 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/tests/conftest.py b/tests/conftest.py index ed81ee80..fa3ae01f 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,7 +1,7 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán -# Copyright (C) 2014 Anler Hernández +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Anler Hernández # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/tests/factories.py b/tests/factories.py index 2cb676b5..532faefe 100644 --- a/tests/factories.py +++ b/tests/factories.py @@ -1,7 +1,7 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán -# Copyright (C) 2014 Anler Hernández +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Anler Hernández # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/tests/fixtures.py b/tests/fixtures.py index 97cbea87..96d6a8fc 100644 --- a/tests/fixtures.py +++ b/tests/fixtures.py @@ -1,7 +1,7 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán -# Copyright (C) 2014 Anler Hernández +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Anler Hernández # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/tests/integration/resources_permissions/test_issues_custom_attributes_resource.py b/tests/integration/resources_permissions/test_issues_custom_attributes_resource.py index e8e87048..4dcdfa7f 100644 --- a/tests/integration/resources_permissions/test_issues_custom_attributes_resource.py +++ b/tests/integration/resources_permissions/test_issues_custom_attributes_resource.py @@ -1,6 +1,6 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/tests/integration/resources_permissions/test_tasks_custom_attributes_resource.py b/tests/integration/resources_permissions/test_tasks_custom_attributes_resource.py index 773c44cb..da70bd4e 100644 --- a/tests/integration/resources_permissions/test_tasks_custom_attributes_resource.py +++ b/tests/integration/resources_permissions/test_tasks_custom_attributes_resource.py @@ -1,6 +1,6 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/tests/integration/resources_permissions/test_userstories_custom_attributes_resource.py b/tests/integration/resources_permissions/test_userstories_custom_attributes_resource.py index 17a30bc8..766bae97 100644 --- a/tests/integration/resources_permissions/test_userstories_custom_attributes_resource.py +++ b/tests/integration/resources_permissions/test_userstories_custom_attributes_resource.py @@ -1,6 +1,6 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/tests/integration/test_auth_api.py b/tests/integration/test_auth_api.py index e776b569..e7a7805a 100644 --- a/tests/integration/test_auth_api.py +++ b/tests/integration/test_auth_api.py @@ -1,7 +1,7 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán -# Copyright (C) 2014 Anler Hernández +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Anler Hernández # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/tests/integration/test_custom_attributes_issues.py b/tests/integration/test_custom_attributes_issues.py index 65152aa5..a29c5d45 100644 --- a/tests/integration/test_custom_attributes_issues.py +++ b/tests/integration/test_custom_attributes_issues.py @@ -1,6 +1,6 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/tests/integration/test_custom_attributes_tasks.py b/tests/integration/test_custom_attributes_tasks.py index fee38830..6ffaf3b5 100644 --- a/tests/integration/test_custom_attributes_tasks.py +++ b/tests/integration/test_custom_attributes_tasks.py @@ -1,6 +1,6 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/tests/integration/test_custom_attributes_user_stories.py b/tests/integration/test_custom_attributes_user_stories.py index 6e602269..4b1f5079 100644 --- a/tests/integration/test_custom_attributes_user_stories.py +++ b/tests/integration/test_custom_attributes_user_stories.py @@ -1,6 +1,6 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/tests/integration/test_exporter_api.py b/tests/integration/test_exporter_api.py index dee2f5bb..69f58c32 100644 --- a/tests/integration/test_exporter_api.py +++ b/tests/integration/test_exporter_api.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/tests/integration/test_history.py b/tests/integration/test_history.py index 4ea8efbd..1b5c4f48 100644 --- a/tests/integration/test_history.py +++ b/tests/integration/test_history.py @@ -1,7 +1,7 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán -# Copyright (C) 2014 Anler Hernández +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Anler Hernández # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/tests/integration/test_importer_api.py b/tests/integration/test_importer_api.py index d8fe6f50..8deb7975 100644 --- a/tests/integration/test_importer_api.py +++ b/tests/integration/test_importer_api.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/tests/integration/test_mdrender.py b/tests/integration/test_mdrender.py index 6710a014..cd075845 100644 --- a/tests/integration/test_mdrender.py +++ b/tests/integration/test_mdrender.py @@ -1,7 +1,7 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán -# Copyright (C) 2014 Anler Hernández +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Anler Hernández # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/tests/integration/test_milestones.py b/tests/integration/test_milestones.py index 932da487..d5675399 100644 --- a/tests/integration/test_milestones.py +++ b/tests/integration/test_milestones.py @@ -1,7 +1,7 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán -# Copyright (C) 2014 Anler Hernández +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Anler Hernández # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/tests/integration/test_neighbors.py b/tests/integration/test_neighbors.py index 33ee8d06..92a532dd 100644 --- a/tests/integration/test_neighbors.py +++ b/tests/integration/test_neighbors.py @@ -1,7 +1,7 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán -# Copyright (C) 2014 Anler Hernández +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Anler Hernández # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/tests/integration/test_notifications.py b/tests/integration/test_notifications.py index d183a9ef..4fafc80b 100644 --- a/tests/integration/test_notifications.py +++ b/tests/integration/test_notifications.py @@ -1,7 +1,7 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán -# Copyright (C) 2014 Anler Hernández +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Anler Hernández # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the @@ -355,7 +355,7 @@ def test_watching_users_to_notify_on_issue_modification_6(): assert users == {watching_user, issue.owner} -def test_send_notifications_using_services_method(settings, mail): +def test_send_notifications_using_services_method_for_user_stories(settings, mail): settings.CHANGE_NOTIFICATIONS_MIN_INTERVAL = 1 project = f.ProjectFactory.create() @@ -363,38 +363,34 @@ def test_send_notifications_using_services_method(settings, mail): member1 = f.MembershipFactory.create(project=project, role=role) member2 = f.MembershipFactory.create(project=project, role=role) - history_change = MagicMock() - history_change.user = {"pk": member1.user.pk} - history_change.comment = "" - history_change.type = HistoryType.change - history_change.is_hidden = False - - history_create = MagicMock() - history_create.user = {"pk": member1.user.pk} - history_create.comment = "" - history_create.type = HistoryType.create - history_create.is_hidden = False - - history_delete = MagicMock() - history_delete.user = {"pk": member1.user.pk} - history_delete.comment = "" - history_delete.type = HistoryType.delete - history_delete.is_hidden = False - - # Issues - issue = f.IssueFactory.create(project=project, owner=member2.user) - take_snapshot(issue, user=issue.owner) - services.send_notifications(issue, - history=history_create) - - services.send_notifications(issue, - history=history_change) - - services.send_notifications(issue, - history=history_delete) - - # Userstories us = f.UserStoryFactory.create(project=project, owner=member2.user) + history_change = f.HistoryEntryFactory.create( + user={"pk": member1.user.id}, + comment="", + type=HistoryType.change, + key="userstories.userstory:{}".format(us.id), + is_hidden=False, + diff=[] + ) + + history_create = f.HistoryEntryFactory.create( + user={"pk": member1.user.id}, + comment="", + type=HistoryType.create, + key="userstories.userstory:{}".format(us.id), + is_hidden=False, + diff=[] + ) + + history_delete = f.HistoryEntryFactory.create( + user={"pk": member1.user.id}, + comment="test:delete", + type=HistoryType.delete, + key="userstories.userstory:{}".format(us.id), + is_hidden=False, + diff=[] + ) + take_snapshot(us, user=us.owner) services.send_notifications(us, history=history_create) @@ -405,63 +401,25 @@ def test_send_notifications_using_services_method(settings, mail): services.send_notifications(us, history=history_delete) - # Tasks - task = f.TaskFactory.create(project=project, owner=member2.user) - take_snapshot(task, user=task.owner) - services.send_notifications(task, - history=history_create) - - services.send_notifications(task, - history=history_change) - - services.send_notifications(task, - history=history_delete) - - # Wiki pages - wiki = f.WikiPageFactory.create(project=project, owner=member2.user) - take_snapshot(wiki, user=wiki.owner) - services.send_notifications(wiki, - history=history_create) - - services.send_notifications(wiki, - history=history_change) - - services.send_notifications(wiki, - history=history_delete) - - assert models.HistoryChangeNotification.objects.count() == 12 + assert models.HistoryChangeNotification.objects.count() == 3 assert len(mail.outbox) == 0 time.sleep(1) services.process_sync_notifications() - assert len(mail.outbox) == 12 + assert len(mail.outbox) == 3 # test headers - events = [issue, us, task, wiki] domain = settings.SITES["api"]["domain"].split(":")[0] or settings.SITES["api"]["domain"] - i = 0 for msg in mail.outbox: - # each event has 3 msgs - event = events[math.floor(i / 3)] + m_id = "{project_slug}/{msg_id}".format( + project_slug=project.slug, + msg_id=us.ref + ) - # each set of 3 should have the same headers - if i % 3 == 0: - if hasattr(event, 'ref'): - e_slug = event.ref - elif hasattr(event, 'slug'): - e_slug = event.slug - else: - e_slug = 'taiga-system' - - m_id = "{project_slug}/{msg_id}".format( - project_slug=project.slug, - msg_id=e_slug - ) - - message_id = "<{m_id}/".format(m_id=m_id) - message_id_domain = "@{domain}>".format(domain=domain) - in_reply_to = "<{m_id}@{domain}>".format(m_id=m_id, domain=domain) - list_id = "Taiga/{p_name} " \ - .format(p_name=project.name, p_slug=project.slug, domain=domain) + message_id = "<{m_id}/".format(m_id=m_id) + message_id_domain = "@{domain}>".format(domain=domain) + in_reply_to = "<{m_id}@{domain}>".format(m_id=m_id, domain=domain) + list_id = "Taiga/{p_name} " \ + .format(p_name=project.name, p_slug=project.slug, domain=domain) assert msg.extra_headers headers = msg.extra_headers @@ -490,7 +448,286 @@ def test_send_notifications_using_services_method(settings, mail): msg_ts = datetime.datetime.fromtimestamp(int(msg_time)) assert services.make_ms_thread_index(in_reply_to, msg_ts) == headers.get('Thread-Index') - i += 1 + +def test_send_notifications_using_services_method_for_tasks(settings, mail): + settings.CHANGE_NOTIFICATIONS_MIN_INTERVAL = 1 + + project = f.ProjectFactory.create() + role = f.RoleFactory.create(project=project, permissions=['view_issues', 'view_us', 'view_tasks', 'view_wiki_pages']) + member1 = f.MembershipFactory.create(project=project, role=role) + member2 = f.MembershipFactory.create(project=project, role=role) + + task = f.TaskFactory.create(project=project, owner=member2.user) + history_change = f.HistoryEntryFactory.create( + user={"pk": member1.user.id}, + comment="", + type=HistoryType.change, + key="tasks.task:{}".format(task.id), + is_hidden=False, + diff=[] + ) + + history_create = f.HistoryEntryFactory.create( + user={"pk": member1.user.id}, + comment="", + type=HistoryType.create, + key="tasks.task:{}".format(task.id), + is_hidden=False, + diff=[] + ) + + history_delete = f.HistoryEntryFactory.create( + user={"pk": member1.user.id}, + comment="test:delete", + type=HistoryType.delete, + key="tasks.task:{}".format(task.id), + is_hidden=False, + diff=[] + ) + + take_snapshot(task, user=task.owner) + services.send_notifications(task, + history=history_create) + + services.send_notifications(task, + history=history_change) + + services.send_notifications(task, + history=history_delete) + + assert models.HistoryChangeNotification.objects.count() == 3 + assert len(mail.outbox) == 0 + time.sleep(1) + services.process_sync_notifications() + assert len(mail.outbox) == 3 + + # test headers + domain = settings.SITES["api"]["domain"].split(":")[0] or settings.SITES["api"]["domain"] + for msg in mail.outbox: + m_id = "{project_slug}/{msg_id}".format( + project_slug=project.slug, + msg_id=task.ref + ) + + message_id = "<{m_id}/".format(m_id=m_id) + message_id_domain = "@{domain}>".format(domain=domain) + in_reply_to = "<{m_id}@{domain}>".format(m_id=m_id, domain=domain) + list_id = "Taiga/{p_name} " \ + .format(p_name=project.name, p_slug=project.slug, domain=domain) + + assert msg.extra_headers + headers = msg.extra_headers + + # can't test the time part because it's set when sending + # check what we can + assert 'Message-ID' in headers + assert message_id in headers.get('Message-ID') + assert message_id_domain in headers.get('Message-ID') + + assert 'In-Reply-To' in headers + assert in_reply_to == headers.get('In-Reply-To') + assert 'References' in headers + assert in_reply_to == headers.get('References') + + assert 'List-ID' in headers + assert list_id == headers.get('List-ID') + + assert 'Thread-Index' in headers + # always is b64 encoded 22 bytes + assert len(base64.b64decode(headers.get('Thread-Index'))) == 22 + + # hashes should match for identical ids and times + # we check the actual method in test_ms_thread_id() + msg_time = headers.get('Message-ID').split('/')[2].split('@')[0] + msg_ts = datetime.datetime.fromtimestamp(int(msg_time)) + assert services.make_ms_thread_index(in_reply_to, msg_ts) == headers.get('Thread-Index') + + +def test_send_notifications_using_services_method_for_issues(settings, mail): + settings.CHANGE_NOTIFICATIONS_MIN_INTERVAL = 1 + + project = f.ProjectFactory.create() + role = f.RoleFactory.create(project=project, permissions=['view_issues', 'view_us', 'view_tasks', 'view_wiki_pages']) + member1 = f.MembershipFactory.create(project=project, role=role) + member2 = f.MembershipFactory.create(project=project, role=role) + + issue = f.IssueFactory.create(project=project, owner=member2.user) + history_change = f.HistoryEntryFactory.create( + user={"pk": member1.user.id}, + comment="", + type=HistoryType.change, + key="issues.issue:{}".format(issue.id), + is_hidden=False, + diff=[] + ) + + history_create = f.HistoryEntryFactory.create( + user={"pk": member1.user.id}, + comment="", + type=HistoryType.create, + key="issues.issue:{}".format(issue.id), + is_hidden=False, + diff=[] + ) + + history_delete = f.HistoryEntryFactory.create( + user={"pk": member1.user.id}, + comment="test:delete", + type=HistoryType.delete, + key="issues.issue:{}".format(issue.id), + is_hidden=False, + diff=[] + ) + + take_snapshot(issue, user=issue.owner) + services.send_notifications(issue, + history=history_create) + + services.send_notifications(issue, + history=history_change) + + services.send_notifications(issue, + history=history_delete) + + assert models.HistoryChangeNotification.objects.count() == 3 + assert len(mail.outbox) == 0 + time.sleep(1) + services.process_sync_notifications() + assert len(mail.outbox) == 3 + + # test headers + domain = settings.SITES["api"]["domain"].split(":")[0] or settings.SITES["api"]["domain"] + for msg in mail.outbox: + m_id = "{project_slug}/{msg_id}".format( + project_slug=project.slug, + msg_id=issue.ref + ) + + message_id = "<{m_id}/".format(m_id=m_id) + message_id_domain = "@{domain}>".format(domain=domain) + in_reply_to = "<{m_id}@{domain}>".format(m_id=m_id, domain=domain) + list_id = "Taiga/{p_name} " \ + .format(p_name=project.name, p_slug=project.slug, domain=domain) + + assert msg.extra_headers + headers = msg.extra_headers + + # can't test the time part because it's set when sending + # check what we can + assert 'Message-ID' in headers + assert message_id in headers.get('Message-ID') + assert message_id_domain in headers.get('Message-ID') + + assert 'In-Reply-To' in headers + assert in_reply_to == headers.get('In-Reply-To') + assert 'References' in headers + assert in_reply_to == headers.get('References') + + assert 'List-ID' in headers + assert list_id == headers.get('List-ID') + + assert 'Thread-Index' in headers + # always is b64 encoded 22 bytes + assert len(base64.b64decode(headers.get('Thread-Index'))) == 22 + + # hashes should match for identical ids and times + # we check the actual method in test_ms_thread_id() + msg_time = headers.get('Message-ID').split('/')[2].split('@')[0] + msg_ts = datetime.datetime.fromtimestamp(int(msg_time)) + assert services.make_ms_thread_index(in_reply_to, msg_ts) == headers.get('Thread-Index') + + +def test_send_notifications_using_services_method_for_wiki_pages(settings, mail): + settings.CHANGE_NOTIFICATIONS_MIN_INTERVAL = 1 + + project = f.ProjectFactory.create() + role = f.RoleFactory.create(project=project, permissions=['view_issues', 'view_us', 'view_tasks', 'view_wiki_pages']) + member1 = f.MembershipFactory.create(project=project, role=role) + member2 = f.MembershipFactory.create(project=project, role=role) + + wiki = f.WikiPageFactory.create(project=project, owner=member2.user) + history_change = f.HistoryEntryFactory.create( + user={"pk": member1.user.id}, + comment="", + type=HistoryType.change, + key="wiki.wikipage:{}".format(wiki.id), + is_hidden=False, + diff=[] + ) + + history_create = f.HistoryEntryFactory.create( + user={"pk": member1.user.id}, + comment="", + type=HistoryType.create, + key="wiki.wikipage:{}".format(wiki.id), + is_hidden=False, + diff=[] + ) + + history_delete = f.HistoryEntryFactory.create( + user={"pk": member1.user.id}, + comment="test:delete", + type=HistoryType.delete, + key="wiki.wikipage:{}".format(wiki.id), + is_hidden=False, + diff=[] + ) + take_snapshot(wiki, user=wiki.owner) + services.send_notifications(wiki, + history=history_create) + + services.send_notifications(wiki, + history=history_change) + + services.send_notifications(wiki, + history=history_delete) + + assert models.HistoryChangeNotification.objects.count() == 3 + assert len(mail.outbox) == 0 + time.sleep(1) + services.process_sync_notifications() + assert len(mail.outbox) == 3 + + # test headers + domain = settings.SITES["api"]["domain"].split(":")[0] or settings.SITES["api"]["domain"] + for msg in mail.outbox: + m_id = "{project_slug}/{msg_id}".format( + project_slug=project.slug, + msg_id=wiki.slug + ) + + message_id = "<{m_id}/".format(m_id=m_id) + message_id_domain = "@{domain}>".format(domain=domain) + in_reply_to = "<{m_id}@{domain}>".format(m_id=m_id, domain=domain) + list_id = "Taiga/{p_name} " \ + .format(p_name=project.name, p_slug=project.slug, domain=domain) + + assert msg.extra_headers + headers = msg.extra_headers + + # can't test the time part because it's set when sending + # check what we can + assert 'Message-ID' in headers + assert message_id in headers.get('Message-ID') + assert message_id_domain in headers.get('Message-ID') + + assert 'In-Reply-To' in headers + assert in_reply_to == headers.get('In-Reply-To') + assert 'References' in headers + assert in_reply_to == headers.get('References') + + assert 'List-ID' in headers + assert list_id == headers.get('List-ID') + + assert 'Thread-Index' in headers + # always is b64 encoded 22 bytes + assert len(base64.b64decode(headers.get('Thread-Index'))) == 22 + + # hashes should match for identical ids and times + # we check the actual method in test_ms_thread_id() + msg_time = headers.get('Message-ID').split('/')[2].split('@')[0] + msg_ts = datetime.datetime.fromtimestamp(int(msg_time)) + assert services.make_ms_thread_index(in_reply_to, msg_ts) == headers.get('Thread-Index') def test_resource_notification_test(client, settings, mail): diff --git a/tests/integration/test_occ.py b/tests/integration/test_occ.py index 2244750d..2cbdaced 100644 --- a/tests/integration/test_occ.py +++ b/tests/integration/test_occ.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/tests/integration/test_references_sequences.py b/tests/integration/test_references_sequences.py index f384791e..0ec9d35f 100644 --- a/tests/integration/test_references_sequences.py +++ b/tests/integration/test_references_sequences.py @@ -1,7 +1,7 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán -# Copyright (C) 2014 Anler Hernández +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Anler Hernández # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/tests/integration/test_roles.py b/tests/integration/test_roles.py index 70665aff..0bc773e7 100644 --- a/tests/integration/test_roles.py +++ b/tests/integration/test_roles.py @@ -1,7 +1,7 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán -# Copyright (C) 2014 Anler Hernández +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Anler Hernández # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/tests/integration/test_searches.py b/tests/integration/test_searches.py index db026a2a..c191682f 100644 --- a/tests/integration/test_searches.py +++ b/tests/integration/test_searches.py @@ -1,7 +1,7 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán -# Copyright (C) 2014 Anler Hernández +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Anler Hernández # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/tests/integration/test_throwttling.py b/tests/integration/test_throwttling.py index ce36d0c4..93c3a26d 100644 --- a/tests/integration/test_throwttling.py +++ b/tests/integration/test_throwttling.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/tests/integration/test_timeline.py b/tests/integration/test_timeline.py index 582c3667..c96760e9 100644 --- a/tests/integration/test_timeline.py +++ b/tests/integration/test_timeline.py @@ -1,7 +1,7 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán -# Copyright (C) 2014 Anler Hernández +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Anler Hernández # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the @@ -200,7 +200,6 @@ def test_update_project_timeline(): project = factories.ProjectFactory.create(name="test project timeline") history_services.take_snapshot(project, user=project.owner) project.add_watcher(user_watcher) - print("PPPP") project.name = "test project timeline updated" project.save() history_services.take_snapshot(project, user=project.owner) diff --git a/tests/integration/test_us_autoclosing.py b/tests/integration/test_us_autoclosing.py index e2205bb0..a3b43c12 100644 --- a/tests/integration/test_us_autoclosing.py +++ b/tests/integration/test_us_autoclosing.py @@ -1,7 +1,7 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán -# Copyright (C) 2014 Anler Hernández +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Anler Hernández # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/tests/integration/test_users.py b/tests/integration/test_users.py index 302a51a3..a9d4c1cd 100644 --- a/tests/integration/test_users.py +++ b/tests/integration/test_users.py @@ -483,9 +483,6 @@ def test_get_voted_list_valid_info_for_project(): assert project_vote_info["is_private"] == project.is_private - import pprint - pprint.pprint(project_vote_info) - assert project_vote_info["is_fan"] == False assert project_vote_info["is_watcher"] == False assert project_vote_info["total_watchers"] == 0 diff --git a/tests/integration/test_userstorage_api.py b/tests/integration/test_userstorage_api.py index 1b642de2..d4050232 100644 --- a/tests/integration/test_userstorage_api.py +++ b/tests/integration/test_userstorage_api.py @@ -1,7 +1,7 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán -# Copyright (C) 2014 Anler Hernández +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Anler Hernández # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/tests/integration/test_userstories.py b/tests/integration/test_userstories.py index 6506f70f..4ddaece0 100644 --- a/tests/integration/test_userstories.py +++ b/tests/integration/test_userstories.py @@ -57,7 +57,7 @@ def test_create_userstory_with_watchers(client): data = {"subject": "Test user story", "project": project.id, "watchers": [user_watcher.id]} client.login(user) response = client.json.post(url, json.dumps(data)) - print(response.data) + assert response.status_code == 201 assert response.data["watchers"] == [] diff --git a/tests/integration/test_vote_issues.py b/tests/integration/test_vote_issues.py index 5076b227..9b880d36 100644 --- a/tests/integration/test_vote_issues.py +++ b/tests/integration/test_vote_issues.py @@ -1,7 +1,7 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán -# Copyright (C) 2015 Anler Hernández +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Anler Hernández # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/tests/integration/test_vote_tasks.py b/tests/integration/test_vote_tasks.py index 7d71eff4..8b1a3605 100644 --- a/tests/integration/test_vote_tasks.py +++ b/tests/integration/test_vote_tasks.py @@ -1,7 +1,7 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán -# Copyright (C) 2015 Anler Hernández +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Anler Hernández # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/tests/integration/test_vote_userstories.py b/tests/integration/test_vote_userstories.py index 492f8121..ae118db1 100644 --- a/tests/integration/test_vote_userstories.py +++ b/tests/integration/test_vote_userstories.py @@ -1,7 +1,7 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán -# Copyright (C) 2015 Anler Hernández +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Anler Hernández # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/tests/integration/test_votes.py b/tests/integration/test_votes.py index cb7f3660..0408529e 100644 --- a/tests/integration/test_votes.py +++ b/tests/integration/test_votes.py @@ -1,7 +1,7 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán -# Copyright (C) 2014 Anler Hernández +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Anler Hernández # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/tests/integration/test_watch_issues.py b/tests/integration/test_watch_issues.py index 91c64ec8..764bf6fd 100644 --- a/tests/integration/test_watch_issues.py +++ b/tests/integration/test_watch_issues.py @@ -1,7 +1,7 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán -# Copyright (C) 2015 Anler Hernández +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Anler Hernández # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/tests/integration/test_watch_milestones.py b/tests/integration/test_watch_milestones.py index f744086c..acbbe85a 100644 --- a/tests/integration/test_watch_milestones.py +++ b/tests/integration/test_watch_milestones.py @@ -1,7 +1,7 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán -# Copyright (C) 2015 Anler Hernández +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Anler Hernández # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/tests/integration/test_watch_projects.py b/tests/integration/test_watch_projects.py index 8b1bf4da..724c5106 100644 --- a/tests/integration/test_watch_projects.py +++ b/tests/integration/test_watch_projects.py @@ -1,7 +1,7 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán -# Copyright (C) 2015 Anler Hernández +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Anler Hernández # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/tests/integration/test_watch_tasks.py b/tests/integration/test_watch_tasks.py index 449cba88..a23af44d 100644 --- a/tests/integration/test_watch_tasks.py +++ b/tests/integration/test_watch_tasks.py @@ -1,7 +1,7 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán -# Copyright (C) 2015 Anler Hernández +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Anler Hernández # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/tests/integration/test_watch_userstories.py b/tests/integration/test_watch_userstories.py index 86ae3ef0..4b42ddb6 100644 --- a/tests/integration/test_watch_userstories.py +++ b/tests/integration/test_watch_userstories.py @@ -1,7 +1,7 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán -# Copyright (C) 2015 Anler Hernández +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Anler Hernández # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/tests/integration/test_watch_wikipages.py b/tests/integration/test_watch_wikipages.py index a26fe2a4..e90e2cd1 100644 --- a/tests/integration/test_watch_wikipages.py +++ b/tests/integration/test_watch_wikipages.py @@ -1,7 +1,7 @@ -# Copyright (C) 2015 Andrey Antukh -# Copyright (C) 2015 Jesús Espino -# Copyright (C) 2015 David Barragán -# Copyright (C) 2015 Anler Hernández +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Anler Hernández # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/tests/integration/test_webhooks.py b/tests/integration/test_webhooks.py index 9f4ecd71..4e33b919 100644 --- a/tests/integration/test_webhooks.py +++ b/tests/integration/test_webhooks.py @@ -1,7 +1,7 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán -# Copyright (C) 2014 Anler Hernández +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Anler Hernández # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/tests/models.py b/tests/models.py index fe21e87c..87c667dc 100644 --- a/tests/models.py +++ b/tests/models.py @@ -1,7 +1,7 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán -# Copyright (C) 2014 Anler Hernández +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Anler Hernández # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/tests/unit/conftest.py b/tests/unit/conftest.py index e1159b0c..ac4f395d 100644 --- a/tests/unit/conftest.py +++ b/tests/unit/conftest.py @@ -1,7 +1,7 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán -# Copyright (C) 2014 Anler Hernández +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Anler Hernández # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/tests/unit/test_base_api_permissions.py b/tests/unit/test_base_api_permissions.py index dd736808..e0fc748c 100644 --- a/tests/unit/test_base_api_permissions.py +++ b/tests/unit/test_base_api_permissions.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/tests/unit/test_deferred.py b/tests/unit/test_deferred.py index c4e076c4..46afe862 100644 --- a/tests/unit/test_deferred.py +++ b/tests/unit/test_deferred.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/tests/unit/test_export.py b/tests/unit/test_export.py index 0a6ba9d6..17564fa7 100644 --- a/tests/unit/test_export.py +++ b/tests/unit/test_export.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the @@ -28,7 +28,6 @@ def test_export_issue_finish_date(client): issue = f.IssueFactory.create(finished_date="2014-10-22") output = io.StringIO() render_project(issue.project, output) - print(output.getvalue()) project_data = json.loads(output.getvalue()) finish_date = project_data["issues"][0]["finished_date"] assert finish_date == "2014-10-22T00:00:00+0000" diff --git a/tests/unit/test_gravatar.py b/tests/unit/test_gravatar.py index d91a90b2..ba1d18be 100644 --- a/tests/unit/test_gravatar.py +++ b/tests/unit/test_gravatar.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/tests/unit/test_mdrender.py b/tests/unit/test_mdrender.py index 1de084d8..a58e5cca 100644 --- a/tests/unit/test_mdrender.py +++ b/tests/unit/test_mdrender.py @@ -1,7 +1,7 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán -# Copyright (C) 2014 Anler Hernández +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Anler Hernández # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the @@ -165,8 +165,8 @@ def test_render_relative_image(): def test_render_triple_quote_code(): - expected_result = "
print(\"test\")\n
" - assert render(dummy_project, "```\nprint(\"test\")\n```") == expected_result + expected_result = "
print(\"test\")\n
" + assert render(dummy_project, "```python\nprint(\"test\")\n```") == expected_result def test_render_triple_quote_and_lang_code(): diff --git a/tests/unit/test_permissions.py b/tests/unit/test_permissions.py index c1a0e765..b4c0ae45 100644 --- a/tests/unit/test_permissions.py +++ b/tests/unit/test_permissions.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/tests/unit/test_slug.py b/tests/unit/test_slug.py index e687bcbd..65fb4cf0 100644 --- a/tests/unit/test_slug.py +++ b/tests/unit/test_slug.py @@ -1,7 +1,7 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán -# Copyright (C) 2014 Anler Hernández +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Anler Hernández # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/tests/unit/test_timeline.py b/tests/unit/test_timeline.py index 377e9728..7e8ff24b 100644 --- a/tests/unit/test_timeline.py +++ b/tests/unit/test_timeline.py @@ -1,7 +1,7 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán -# Copyright (C) 2014 Anler Hernández +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Anler Hernández # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/tests/unit/test_tokens.py b/tests/unit/test_tokens.py index 1da085e1..ca2b09b2 100644 --- a/tests/unit/test_tokens.py +++ b/tests/unit/test_tokens.py @@ -1,7 +1,7 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán -# Copyright (C) 2014 Anler Hernández +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Anler Hernández # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/tests/unit/test_utils.py b/tests/unit/test_utils.py index 0bb5922a..9521974b 100644 --- a/tests/unit/test_utils.py +++ b/tests/unit/test_utils.py @@ -1,6 +1,6 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/tests/utils.py b/tests/utils.py index 8245e2dc..389d9c59 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -1,7 +1,7 @@ -# Copyright (C) 2014 Andrey Antukh -# Copyright (C) 2014 Jesús Espino -# Copyright (C) 2014 David Barragán -# Copyright (C) 2014 Anler Hernández +# Copyright (C) 2014-2015 Andrey Antukh +# Copyright (C) 2014-2015 Jesús Espino +# Copyright (C) 2014-2015 David Barragán +# Copyright (C) 2014-2015 Anler Hernández # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the