from django.contrib import admin
from models import UserProfile

class UserProfileAdmin(admin.ModelAdmin):
	list_display = ('user',)
	# list_display = ('user','sex')
	# search_fields = ('user',)
    # list_filter = ('sex',ist_display = ('user','sex')
	# search_fields = ('user',)
    # list_filter = ('sex','birthplace')'birthplace')


admin.site.register(UserProfile,UserProfileAdmin)

from django.contrib import admin
from models import UserProfile

class UserProfileAdmin(admin.ModelAdmin):
	list_display = ('user', 'sex')
	search_fields = ('user',)
	
admin.site.register(UserProfile,UserProfileAdmin)

Add UserProfile Model To Django Admin Website
Add UserProfile Model To Django Admin Website

  from django.contrib import admin
  from models import UserProfile
  
  class UserProfileAdmin(admin.ModelAdmin):
- 	list_display = ('user',)
- 	# list_display = ('user','sex')
+ 	list_display = ('user', 'sex')
- 	# search_fields = ('user',)
+ 	search_fields = ('user',)
+ 	
-     # list_filter = ('sex',ist_display = ('user','sex')
- 	# search_fields = ('user',)
-     # list_filter = ('sex','birthplace')'birthplace')
- 
- 
  admin.site.register(UserProfile,UserProfileAdmin)
  
Add UserProfile Model To Django Admin Website
## Code Before:
from django.contrib import admin
from models import UserProfile

class UserProfileAdmin(admin.ModelAdmin):
	list_display = ('user',)
	# list_display = ('user','sex')
	# search_fields = ('user',)
    # list_filter = ('sex',ist_display = ('user','sex')
	# search_fields = ('user',)
    # list_filter = ('sex','birthplace')'birthplace')


admin.site.register(UserProfile,UserProfileAdmin)

## Instruction:
Add UserProfile Model To Django Admin Website
## Code After:
from django.contrib import admin
from models import UserProfile

class UserProfileAdmin(admin.ModelAdmin):
	list_display = ('user', 'sex')
	search_fields = ('user',)
	
admin.site.register(UserProfile,UserProfileAdmin)
