Skip to content

Commit

Permalink
more django 4 issues
Browse files Browse the repository at this point in the history
  • Loading branch information
pmaccamp committed Mar 2, 2023
1 parent d14a0b5 commit f88b31b
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion emailmgr/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
6 changes: 3 additions & 3 deletions emailmgr/signals.py
Original file line number Diff line number Diff line change
@@ -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()



16 changes: 9 additions & 7 deletions emailmgr/urls.py
Original file line number Diff line number Diff line change
@@ -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<identifier>\w+)/$',
email_send_activation,
name='emailmgr_email_send_activation'
),
url(
re_path(
r'^email/activate/(?P<identifier>\w+)/$',
email_activate,
name='emailmgr_email_activate'
),
url(
re_path(
r'^email/make_primary/(?P<identifier>\w+)/$',
email_make_primary,
name='emailmgr_email_make_primary'
),
url(
re_path(
r'^email/delete/(?P<identifier>\w+)/$',
email_delete,
name='emailmgr_email_delete'
),
url(
re_path(
r'^email/$',
email_list,
name='emailmgr_email_list'
Expand Down
2 changes: 1 addition & 1 deletion emailmgr/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit f88b31b

Please sign in to comment.