from django.contrib import admin

from wishlist.models import Item

#admin.site.register( Category )
#admin.site.register( Item )

class ItemAdmin( admin.ModelAdmin ) :
	list_display = ( "id", "name", "category", "sort_order", "price" )
	list_filter = ( "is_active", "category" )
	search_fields = ( 'name', )
	list_per_page = 30
admin.site.register( Item, ItemAdmin )

from django.contrib import admin

from wishlist.models import *

admin.site.register( Category )

class ItemAdmin( admin.ModelAdmin ) :
	list_display = ( "id", "name", "category", "sort_order", "price" )
	list_filter = ( "is_active", "category" )
	search_fields = ( 'name', )
	list_per_page = 30
admin.site.register( Item, ItemAdmin )

Update Django Admin interface to allow editing of Categories
Update Django Admin interface to allow editing of Categories

  from django.contrib import admin
  
- from wishlist.models import Item
+ from wishlist.models import *
  
- #admin.site.register( Category )
+ admin.site.register( Category )
- #admin.site.register( Item )
  
  class ItemAdmin( admin.ModelAdmin ) :
  	list_display = ( "id", "name", "category", "sort_order", "price" )
  	list_filter = ( "is_active", "category" )
  	search_fields = ( 'name', )
  	list_per_page = 30
  admin.site.register( Item, ItemAdmin )
  
Update Django Admin interface to allow editing of Categories
## Code Before:
from django.contrib import admin

from wishlist.models import Item

#admin.site.register( Category )
#admin.site.register( Item )

class ItemAdmin( admin.ModelAdmin ) :
	list_display = ( "id", "name", "category", "sort_order", "price" )
	list_filter = ( "is_active", "category" )
	search_fields = ( 'name', )
	list_per_page = 30
admin.site.register( Item, ItemAdmin )

## Instruction:
Update Django Admin interface to allow editing of Categories
## Code After:
from django.contrib import admin

from wishlist.models import *

admin.site.register( Category )

class ItemAdmin( admin.ModelAdmin ) :
	list_display = ( "id", "name", "category", "sort_order", "price" )
	list_filter = ( "is_active", "category" )
	search_fields = ( 'name', )
	list_per_page = 30
admin.site.register( Item, ItemAdmin )
