Thanks Chris, This is exactly where I ended up, thanks! For anyone trying the same, I was frustratedly trying to replace ^accounts/register/$, and wondering why it would not work. It ended up that I needed to replace ^register/$ as this was the url that was in urlpatterns (^accounts/ called satchmo_store.accounts.urls). I just copied the views and forms (and signals) from satchmo_store/accounts/. After adding a "username" field to the RegisterForm, adding a clean_username function (just check for duplicates), I could just comment out the autogenerated username line, and the rest works as expected.
Thanks again. On Oct 2, 1:53 am, Chris Moffitt <[email protected]> wrote: > I think your approach of replacing the view is probably the simplest. You > can see my Djangocon slides for an example of how to use the url_replace > function to unobtrusively override a specific view. > > -Chris > > On Thu, Oct 1, 2009 at 11:56 AM, captainmish <[email protected]> wrote: > > > Hi > > > I need to allow users who register during checkout to choose a > > username. At the moment it seems like the username is auto generated > > by save_contact() in satchmo_store.accounts.forms.RegistrationForm. > > Can anyone help with how I can go about adding this functionality? > > > At the moment I am guessing I can override the urls to /accounts/ > > register/ to use a view that I make from a copy of > > satchmo_store.accounts.views.register, which calls a copied and > > modified RegistrationForm - is there an easier alternative to this? > > > Thanks, --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
