# Path: survey/models.py
# class UserProfile(models.Model):
#     confirmation_code = models.CharField(max_length=20, blank=True, null=True)
#     contact_number = models.CharField(max_length=20, blank=True, null=True)
#     birth_date = models.CharField(max_length=20, blank=True, null=True)
#     im_name = models.CharField(max_length=20, blank=True, null=True)
#     user = models.ForeignKey(User)


from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from django.contrib.auth.models import User
from survey.models import UserProfile
from survey.models import *


# Define an inline admin descriptor for UserProfile model
# which acts a bit like a singleton
class UserProfileInline(admin.StackedInline):
    model = UserProfile
    can_delete = False
    verbose_name_plural = 'profile'

# Define a new User admin
class UserAdmin(UserAdmin):
    inlines = (UserProfileInline, )

# Re-register UserAdmin

# Path: survey/models.py
# class UserProfile(models.Model):
#     confirmation_code = models.CharField(max_length=20, blank=True, null=True)
#     contact_number = models.CharField(max_length=20, blank=True, null=True)
#     birth_date = models.CharField(max_length=20, blank=True, null=True)
#     im_name = models.CharField(max_length=20, blank=True, null=True)
#     user = models.ForeignKey(User)


# Path: survey/admin.py
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from django.contrib.auth.models import User
from survey.models import UserProfile
from survey.models import *



# Define an inline admin descriptor for UserProfile model
# which acts a bit like a singleton
class UserProfileInline(admin.StackedInline):
    model = UserProfile
    can_delete = False
    verbose_name_plural = 'profile'

# Define a new User admin
class UserAdmin(UserAdmin):
    inlines = (UserProfileInline, )

# Re-register UserAdmin

admin.site.unregister(User)