parameters: (self, username, email, password=None, photo=None)
docstring: Creates and returns a User for the given username.
docstring_summary: Creates and returns a User for the given username.
docstring_tokens: Creates and returns a User for the given username .
function: def create_new_user(self, username, email, password=None, photo=None):
          """Creates and returns a User for the given username."""
          try:
              user = get_auth_backend().register(
                  username=username, email=email, password=password, photo=photo
              )
              signals.user_created.send_robust(sender=self.__class__, user=user)
              return user
          except UserExistsException as e:
              raise exceptions.UserExistsError(e)
          except AuthException as e:
              raise exceptions.BackendError(e)
function_tokens: def create_new_user ( self , username , email , password = None , photo = None ) : try : user = get_auth_backend ( ) . register ( username = username , email = email , password = password , photo = photo ) signals . user_created . send_robust ( sender = self . __class__ , user = user ) return user except UserExistsException as e : raise exceptions . UserExistsError ( e ) except AuthException as e : raise exceptions . BackendError ( e )