Thomas, are you sure that you can edit your user profile without
creating a new contact everytime you edit anything? I'm afraid that
the fix can create a new issue.

In general:
Preserving the cart is a contrary against clean registration and if
you write a fix you should think of both.

I think that the right solution (if anyone has time) is:
1) Upgrade Satchmo for using the new class based django-registration.
2) Customize creating of new account so that:
  - if a user is logged, new session is started (in order to not mix
contacts, carts etc.)
  - if no user is logged, continue with the same session (in order to
preserve cart etc.)
3) look at threadlocals caching and clear session related things if a
new session is started.

Upgrading django-registration is more effective, otherwise a fix for
the old one must be soon rewritten again.

Maybe the point 1) will be sufficient.

--Hynek

On 9 kvě, 07:42, Thomas <[email protected]> wrote:
> I'm pretty sure this is a bug in Satchmo. Here's my fix:
>
> diff -paurb src.orig//satchmo/satchmo/apps/satchmo_store/accounts/views.py
> src//satchmo/satchmo/apps/satchmo_store/accounts/views.py
> --- src.orig//satchmo/satchmo/apps/satchmo_store/accounts/views.py
>  2012-03-30 07:42:40.000000000 +0200
> +++ src//satchmo/satchmo/apps/satchmo_store/accounts/views.py   2012-05-09
> 07:33:01.000000000 +0200
> @@ -194,7 +194,7 @@ def register_handle_form(request, redire
>      if request.method == 'POST':
>          form = RegistrationForm(request.POST)
>          if form.is_valid():
> -            contact = form.save(request)
> +            contact = form.save(request,force_new=True)
>
>              # look for explicit "next"
>              next = request.POST.get('next', '')

-- 
You received this message because you are subscribed to the Google Groups 
"Satchmo users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/satchmo-users?hl=en.

Reply via email to