开发者

How to customize django's UserCreationForm?

开发者 https://www.devze.com 2023-01-12 01:45 出处:网络
I want to customise the django.contrib.auth UserCreationForm to: Ignore the email field, and only di开发者_Python百科splay a user-name which must be an email address

I want to customise the django.contrib.auth UserCreationForm to:

  • Ignore the email field, and only di开发者_Python百科splay a user-name which must be an email address
  • Prompt the user for first name and last name.

I'm using django-registration if that makes a difference.

How can I do this?

I can subclass the form, but how do I tell the auth system to use my version of the form instead of the default one?

Thanks


I think this is the answer:

http://dmitko.ru/?p=546

0

精彩评论

暂无评论...
验证码 换一张
取 消