Spaces:
Sleeping
Sleeping
File size: 1,028 Bytes
f0a40ab | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | from django.db import models
# Create your models here.
from django.db import models
# Create your models here.
from django.db import models
# Create your models here.
from django.db import models
class UserRegistrationModel(models.Model):
name = models.CharField(max_length=100)
loginid = models.CharField(unique=True, max_length=100)
password = models.CharField(max_length=100)
mobile = models.CharField(unique=True, max_length=10) # Adjusted max_length to 10 for mobile numbers
email = models.EmailField(unique=True, max_length=100) # Use EmailField for better validation
locality = models.CharField(max_length=100)
address = models.TextField(max_length=1000) # Use TextField for longer addresses
city = models.CharField(max_length=100)
state = models.CharField(max_length=100)
status = models.CharField(max_length=100, default='waiting')
def __str__(self):
return self.loginid
class Meta:
db_table = 'user_registrations'
|