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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T04:57:11+00:00 2026-05-15T04:57:11+00:00

i am trying to create a signup form for my django app. for this

  • 0

i am trying to create a signup form for my django app. for this i have extended the user model. This is my
Forms.py

from contact.models import register
from django import forms
from django.contrib import auth
class registerForm(forms.ModelForm):

    class Meta:
    model=register
        fields = ('latitude', 'longitude', 'status')
    class Meta:
        model = auth.models.User # this gives me the User fields
        fields = ('username', 'first_name', 'last_name', 'email')

and this is my model.py

from django.db import models
from django.contrib.auth.models import User
STATUS_CHOICES = (
('Online', 'Online.'),
('Busy', 'Busy.'),
('AppearOffline', 'AppearOffline.'),)
 class register(models.Model): 

    user = models.ForeignKey('auth.User', unique = True) 
    latitude = models.DecimalField(max_digits=8, decimal_places=6)
    longitude = models.DecimalField(max_digits=8, decimal_places=6)
status = models.CharField(max_length=8,choices=STATUS_CHOICES, blank= True, null=True)

i dont know where i am making a mistake. the users passwords are not accepted at the login
and the latitude and logitude are not saved against the created user user.
i am fiarly new to django and dont know what to do
any body have any solution .?

  • 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-15T04:57:12+00:00Added an answer on May 15, 2026 at 4:57 am

    To inherit from django’s user model, you have to something like this:

    from django.contrib.auth.models import User
    class MyUserClass(User):
        #your fields go here
    

    But another way to extend the user model, which would be suitable for you, if you just want to store latitude/longitude is to create an user profile that is realted to the user model. See here: http://www.b-list.org/weblog/2006/jun/06/django-tips-extending-user-model/
    You can then find a solution where you can administrate the related profile through an InlineAdmin in a UserAdmin sub class!
    See this for extending the admin: http://pyxx.org/2008/08/18/how-to-extend-user-model-in-django-and-enable-new-fields-in-newforms-admin/
    And this for automatically creating a user profile upon creation of a new user: Django: UserProfile with Unique Foreign Key in Django Admin

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

Sidebar

Related Questions

I'm trying to create a very simple email signup form, where the user can
I am trying to create a signup form that checks if the user exists
I'm trying to make a signup form via html/django so I have 3 input
I'm trying to use routing in CI to create a signup form signup is
I'm trying to create two databases after people fill out a signup form with
I am trying to create a email invite form where the user inputs their
I am trying to have a form show up for a related model, but
I am trying to create a javascript - jQuery form validator. I have an
I extended my User Model as described in this SO Posting: Extending the User
I'm trying to create a form where a user can type in their email

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.