Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4599614
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T23:33:58+00:00 2026-05-21T23:33:58+00:00

I am using the django-registration package. I do not want people to have a

  • 0

I am using the django-registration package. I do not want people to have a username but to enter instead their first and last names. Like on Facebook. How can I do that ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T23:33:59+00:00Added an answer on May 21, 2026 at 11:33 pm

    Django auth (and by extension admin) requires a username – full stop. So you’ll have to go to some effort to work around that.

    You have a few issues to consider:
    1) Firstname Lastname will rapidly lead to collisions. What does your service do when the second “John Smith” wants to sign up?

    2) You have to create a username, so you’ll likely use a hash of firstname_lastname. Again, what do you do when you get a second exact match?

    3) You’ll have to write a custom auth backend to take care of the login, this isn’t actually that hard.

    A prototype of the solution to #2 can be found here – basically in the form processing, generate a random unique hash.

    while True:
        self.cleaned_data['username'] = str(md5(str(self.data['email']) + str(random.random())).hexdigest())[0:30]
        try:
            user = User.objects.get(username__iexact=self.cleaned_data['username'])
        except User.DoesNotExist:
            break
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the Django Registration class, it's great, but the last version shipped with
I am using django's core.mail package in conjunction with django-registration for a new user
I am using django-registration and would like to have a different page for failed
I'm using Django-Registration and the form just has 3 fields (Username, Email, Password, and
I have a django site using the basic django registration framework. I have my
How to send activation email with username by using django-registration .I've configured Amazon SES
I'm using Django 1.2 and I want to have two user types (one for
I am using django-registration v0.7 and django 1.2.4. Everything works fine but I am
Am using django-registration for user account activation. in my registration_form.html I have {% extends
I'm using django-registration. I have included it into my project. When I try to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.