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 6121635
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:48:23+00:00 2026-05-23T15:48:23+00:00

How would you go about modifying the fields in the Django User Model to

  • 0

How would you go about modifying the fields in the Django User Model to be required?

I’d like a User to require that a name and email address be entered at the time of creation, but I’m not sure how to go about doing this. Furthermore, I also want to be able to add fields to the User model. Looking around, I’m not sure what the best way to do this would be. There seem to be different schools about actually extending the User model or doing it through a one-to-one relationship.

  • 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-23T15:48:24+00:00Added an answer on May 23, 2026 at 3:48 pm

    You can set the required fields in your registration form (all fields will be required unless your specify required=False)

    As for extending the User model, I’d recommend taking advantage of the AUTH_PROFILE_MODULE setting as described by James Bennett in this tutorial: http://www.b-list.org/weblog/2006/jun/06/django-tips-extending-user-model/

    Basically you set AUTH_PROFILE_MODULE to your user profile model, and this allows you to access your user as follows:

    # In settings.py
    AUTH_PROFILE_MODULE = 'myapp.UserProfile' # Assumes your user profile model is called UserProfile
    
    # In your view
    u = User.objects.get(pk=1)
    u.get_profile().home_address
    
    # In your template
    u.get_profile.home_address
    

    http://www.b-list.org/weblog/2006/jun/06/django-tips-extending-user-model/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to know how I would go about altering the HTML that
I'm wondering how i would go about making the following application: a user signs
In admin I would like to disable a field when modifying object, but make
How would one go about modifying the positions of floating elements? Is it possible
I have RESTEasy (JAX-RS) server with about 60 services (so far). I would like
I'm trying to learn Django and I would like feedback from anyone who has
How would one go about modifying the colour of vim's tab bar? I have
How would I go about modifying my c# console application to retrieve values or
Just wondering how you would go about implementing something similar to stackoverflow'd related questions.
Any ideas how I would go about writing a javascript method to insert an

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.