handle default displayname

pull/3/head
nathaniel smith 2017-01-16 22:10:55 -08:00
parent 8b20f0764d
commit 6d38a4190f
1 changed files with 2 additions and 0 deletions

View File

@ -23,6 +23,8 @@ class SignupView(FormView):
key_type=form.cleaned_data.pop('pubkey_type'))
t = Townie(**form.cleaned_data)
if not getattr(t, 'displayname'):
t.displayname = t.username
t.set_unusable_password()
t.save()
pubkey.townie = t