Use User information when creating a new contact

Create issue
Issue #288 new
Benny Daon created an issue

When a logged in user buys for the first time, get his name and email from Django's User

Comments (1)

  1. Andre Miras

    I think this is a good idea. I am using this idea in my custom payment forms.py

            try:
                contact = Contact.objects.from_request(request, create=False)
            except Contact.DoesNotExist:
                contact = None
    ...
    ...
            if contact:
            # If a person has their contact info, make sure we populate
            # it in the form
                self.fields['card_holder'].initial = contact.full_name
                self.fields['card_holder'].initial = contact.full_name
    ....
    ....
    
  2. Log in to comment