from django.contrib import admin

# Register your models here.

from .models import Category, Product , Cart , Order

class ProductAdmin(admin.ModelAdmin):
      list_display = ('name', 'category' , 'price' , 'mainimage')
      ordering = ('name',)
      search_fields = ('name',)
class OrderAdmin(admin.ModelAdmin):
      list_display = ( 'user' , 'created' , 'get_parents')
      ordering = ('created',)
      search_fields = ('name',)
admin.site.register(Category)
admin.site.register(Product , ProductAdmin)
admin.site.register(Cart)
admin.site.register(Order , OrderAdmin)
049e8782d4bd912a1f5b7208cbcc1d8459ed572a
<mask token>


class OrderAdmin(admin.ModelAdmin):
    <mask token>
    <mask token>
    <mask token>


<mask token>

<mask token>


class ProductAdmin(admin.ModelAdmin):
    list_display = 'name', 'category', 'price', 'mainimage'
    ordering = 'name',
    search_fields = 'name',


class OrderAdmin(admin.ModelAdmin):
    list_display = 'user', 'created', 'get_parents'
    ordering = 'created',
    search_fields = 'name',


<mask token>

<mask token>


class ProductAdmin(admin.ModelAdmin):
    list_display = 'name', 'category', 'price', 'mainimage'
    ordering = 'name',
    search_fields = 'name',


class OrderAdmin(admin.ModelAdmin):
    list_display = 'user', 'created', 'get_parents'
    ordering = 'created',
    search_fields = 'name',


admin.site.register(Category)
admin.site.register(Product, ProductAdmin)
admin.site.register(Cart)
admin.site.register(Order, OrderAdmin)

from django.contrib import admin
from .models import Category, Product, Cart, Order


class ProductAdmin(admin.ModelAdmin):
    list_display = 'name', 'category', 'price', 'mainimage'
    ordering = 'name',
    search_fields = 'name',


class OrderAdmin(admin.ModelAdmin):
    list_display = 'user', 'created', 'get_parents'
    ordering = 'created',
    search_fields = 'name',


admin.site.register(Category)
admin.site.register(Product, ProductAdmin)
admin.site.register(Cart)
admin.site.register(Order, OrderAdmin)

from django.contrib import admin

# Register your models here.

from .models import Category, Product , Cart , Order

class ProductAdmin(admin.ModelAdmin):
      list_display = ('name', 'category' , 'price' , 'mainimage')
      ordering = ('name',)
      search_fields = ('name',)
class OrderAdmin(admin.ModelAdmin):
      list_display = ( 'user' , 'created' , 'get_parents')
      ordering = ('created',)
      search_fields = ('name',)
admin.site.register(Category)
admin.site.register(Product , ProductAdmin)
admin.site.register(Cart)
admin.site.register(Order , OrderAdmin)