diff --git a/emailmgr/forms.py b/emailmgr/forms.py index 99b594f..f0a8198 100644 --- a/emailmgr/forms.py +++ b/emailmgr/forms.py @@ -2,7 +2,7 @@ from django.forms import ModelForm, ValidationError from django.conf import settings from django.contrib.auth.models import User -from django.utils.translation import ugettext as _ +from django.utils.translation import gettext_lazy as _ class EmailAddressForm(ModelForm): def __init__(self, user=None, *args, **kwargs): diff --git a/emailmgr/signals.py b/emailmgr/signals.py index 6cceabe..b488797 100644 --- a/emailmgr/signals.py +++ b/emailmgr/signals.py @@ -1,13 +1,13 @@ from django.dispatch import Signal # A user has added a new email to his or her account. -user_added_email = Signal(providing_args=["email_address"]) +user_added_email = Signal() # A user send activation email to her or his primary account. -user_sent_activation = Signal(providing_args=["email_address"]) +user_sent_activation = Signal() # A user has activated his or her email. -user_activated_email = Signal(providing_args=["email_address"]) +user_activated_email = Signal() diff --git a/emailmgr/urls.py b/emailmgr/urls.py index 6e250ce..002bc3d 100644 --- a/emailmgr/urls.py +++ b/emailmgr/urls.py @@ -1,37 +1,39 @@ # -*- coding: utf-8 -*- -from django.conf.urls import include, url +from django.conf.urls import include +from django.urls import re_path + from django.conf import settings from .views import email_add, email_list, email_delete, \ email_send_activation, email_activate, email_make_primary #add an email to a User account urlpatterns = [ - url( + re_path( r'^email/add/$', email_add, name='emailmgr_email_add' ), - url( + re_path( r'^email/send_activation/(?P\w+)/$', email_send_activation, name='emailmgr_email_send_activation' ), - url( + re_path( r'^email/activate/(?P\w+)/$', email_activate, name='emailmgr_email_activate' ), - url( + re_path( r'^email/make_primary/(?P\w+)/$', email_make_primary, name='emailmgr_email_make_primary' ), - url( + re_path( r'^email/delete/(?P\w+)/$', email_delete, name='emailmgr_email_delete' ), - url( + re_path( r'^email/$', email_list, name='emailmgr_email_list' diff --git a/emailmgr/views.py b/emailmgr/views.py index 04139a5..edbd573 100644 --- a/emailmgr/views.py +++ b/emailmgr/views.py @@ -8,7 +8,7 @@ from .forms import EmailAddressForm from .models import EmailAddress from .utils import send_activation, get_template, sort_email -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from django.urls import reverse from .signals import user_added_email, user_sent_activation, user_activated_email diff --git a/setup.py b/setup.py index 0b7004b..ae60620 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup(name='django-emailmgr', - version='3.5', + version='3.6', description = "An email manager for Django user", long_description = read('README'), author='Val L33',