~homeworkprod/byceps

26cf46ea9891382e225d6ffd1c9a9b3885727d5c — Jochen Kupperschmidt 1 year, 4 months ago ba18656
Emit signal on user details update
2 files changed, 6 insertions(+), 1 deletions(-)

M byceps/blueprints/user/current/views.py
M byceps/blueprints/user/signals.py
M byceps/blueprints/user/current/views.py => byceps/blueprints/user/current/views.py +5 -1
@@ 21,6 21,7 @@ from ....util.views import redirect_to
from ...authentication.decorators import login_required

from ..creation.views import _find_newsletter_list_for_brand
from .. import signals

from .forms import DetailsForm



@@ 113,7 114,7 @@ def details_update():
    street = form.street.data.strip()
    phone_number = form.phone_number.data.strip()

    user_command_service.update_user_details(
    event = user_command_service.update_user_details(
        current_user.id,
        first_names,
        last_name,


@@ 127,6 128,9 @@ def details_update():
    )

    flash_success('Deine Daten wurden gespeichert.')

    signals.details_updated.send(None, event=event)

    return redirect_to('.view')



M byceps/blueprints/user/signals.py => byceps/blueprints/user/signals.py +1 -0
@@ 12,6 12,7 @@ from blinker import Namespace
user_signals = Namespace()


details_updated = user_signals.signal('user-details-updated')
email_address_changed = user_signals.signal('email-address-changed')
email_address_confirmed = user_signals.signal('email-address-confirmed')
email_address_invalidated = user_signals.signal('email-address-invalidated')