I have a problem with settings for mezzanine accounts. I would like to have
profiles, where user is using mail instead of username. And also I would
like to have "Full name" and "What we should call you?" instead of "First
name" and "Second name" according to W3C suggestions. The issue is, if I do
those things together:
ACCOUNTS_PROFILE_FORM_EXCLUDE_FIELDS = (
"first_name",
"last_name",
)
ACCOUNTS_NO_USERNAME = True
- it doesn't work. Returned error is:
KeyError at /account/signup/
u'first_name'
It is in code:
try:
self.cleaned_data["username"]
except KeyError:
if not self.instance.username:
username = "%(first_name)s %(last_name)s" %
self.cleaned_data
if not username.strip():
username = self.cleaned_data["email"].split("@")[0]
qs = User.objects.exclude(id=self.instance.id)
user.username = unique_slug(qs, "username",
slugify(username))
password = self.cleaned_data.get("password1")
The exact issue is line:
username = "%(first_name)s %(last_name)s" % self.cleaned_data
I think there should be another "try" to catch if first name doesnt exist
and in that case use email or random string.
Is the problem really that simple? Or I get it wrong and my issue need
different repair?
If the problem is really in that, I would like to contribute to mezzanine
and repair that. Maybe also should be good to have in mezzanine same option
for "fullname"+"What should we call you" insted of "first+second name".
What do you think?
--
You received this message because you are subscribed to the Google Groups
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.