Hi there -
I’m in the process of building a site with django, and I noticed that
username is a requirement for the django registration app. I’m wondering
if it’s possible to auto generate the username *after* the user make
entries in the other fields (i.e. name, city, email, password)?
OR does
Yes it is and very easy.
Create a form without a username field and do something like this:
def autogenerate_username ():
# some logic
new_user=User.objects.create_user(autogenerate_username (),
self.cleaned_data['email'],
s
2 matches
Mail list logo