# the phone number and password from the signup page is not storing In django admin

**URL:** <https://forum.djangoproject.com/t/the-phone-number-and-password-from-the-signup-page-is-not-storing-in-django-admin/26882>\
**Category:** Mystery Errors\
**Created:** [January 12, 2024, 12:25pm UTC](https://forum.djangoproject.com/t/the-phone-number-and-password-from-the-signup-page-is-not-storing-in-django-admin/26882 "2024-01-12T12:25:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![krishant88](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/krishant88/32/18232_2.png) [@krishant88](https://forum.djangoproject.com/u/krishant88)\
**Post date:** [January 12, 2024, 12:25pm UTC](https://forum.djangoproject.com/t/the-phone-number-and-password-from-the-signup-page-is-not-storing-in-django-admin/26882/1 "2024-01-12T12:25:44Z")

</div>

Hello I was trying to make a project and the phone number and password from the signup page is not storing but other things like name email are being registered.I tried checking it so many times but could not figure it out `

customer model

```auto
from django.db import models
from django.core.validators import MinLengthValidator

 class Customer(models.Model):
 first_name = models.CharField(max_length=50, null=True)
 last_name = models.CharField(max_length=50, null=True)
 phone = models.CharField(max_length=15, null=True)
 email = models.EmailField(default="",null=True)
 password = models.CharField(max_length=500,null=True)

def register(self):
    self.save()

@staticmethod
def get_customer_by_email(email):
    try:
        return Customer.objects.get(email=email)
    except:
        return False

def isExists(self):
    if Customer.objects.filter(email = self.email):
        return True

    return False

```

views

```auto
from django.shortcuts import render, redirect

from django.http import HttpResponse
from .models.product import Product
from .models.category import Category
from .models.customer import Customer

def signup(request):
if request.method == 'GET':
 return render(request, 'core/signup.html') 
else:
 postData = request.POST
first_name = postData.get('firstname')
last_name = postData.get('lastname')
phone = postData.get('phone')
email= postData.get('email')
password =postData.get('password' )

    customer= Customer(first_name= first_name,
                       last_name= last_name,
                       phone=phone,
                       email=email,
                       password= password)
    customer.register()
    return redirect('core:homepage')

```

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [January 12, 2024, 1:52pm UTC](https://forum.djangoproject.com/t/the-phone-number-and-password-from-the-signup-page-is-not-storing-in-django-admin/26882/2 "2024-01-12T13:52:17Z")

</div>

Side note: When posting code here, enclose the code between lines of three backtick - ` characters. This means you’ll have a line of ```, then the code, then another line of ```. This forces the forum software to keep your code properly formatted. (I’ve taken the liberty of modifying your original post for this.)

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [January 12, 2024, 2:31pm UTC](https://forum.djangoproject.com/t/the-phone-number-and-password-from-the-signup-page-is-not-storing-in-django-admin/26882/3 "2024-01-12T14:31:19Z")

</div>

Couple notes here:

- The indentation on the code you posted is somewhat erratic. (I think I know what it should be, and will work under the assumption that your real code is correct.)

If these “Customer” are going to be logging in to your site, you want to make them instances of your `User` model. See [Extending the existing User model](https://docs.djangoproject.com/en/5.0/topics/auth/customizing/#extending-the-existing-user-model) if you find that the existing User model isn’t sufficient for your needs.

**Never** , never, never store a user-submitted password directly. Don’t write your own hash function either. Use Django’s facilities. See [User authentication in Django | Django documentation | Django](https://docs.djangoproject.com/en/5.0/topics/auth/#user-authentication-in-django) and [Customizing authentication in Django | Django documentation | Django](https://docs.djangoproject.com/en/5.0/topics/auth/customizing/#customizing-authentication-in-django) if necessary.

Use a form - don’t pull from raw post data. See [Working with forms | Django documentation | Django](https://docs.djangoproject.com/en/5.0/topics/forms/#working-with-forms)

If you haven’t already done so, work your way through either (or both) the [Official Django Tutorial](https://docs.djangoproject.com/en/4.2/intro/tutorial01/) and the [Django Girls Tutorial](https://tutorial.djangogirls.org/en/). They cover a lot of topics you will find useful.
