# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.contrib import admin
from ecomapp.models import Category, Author, Book, CartItem, Cart, Order

def make_payed(modeladmin, request, queryset):
    queryset.update(status='Оплачен')
make_payed.short_description = "Пометить как оплаченные"


class OrderAdmin(admin.ModelAdmin):
	list_filter = ['status']
	actions = [make_payed]


admin.site.register(Category)
admin.site.register(Author)
admin.site.register(Book)
admin.site.register(CartItem)
admin.site.register(Cart)
admin.site.register(Order, OrderAdmin)

# Register your models here.

ac65e75eb81f1061b281002d008749595d3c6037
<mask token>


class OrderAdmin(admin.ModelAdmin):
    list_filter = ['status']
    actions = [make_payed]


<mask token>

<mask token>


def make_payed(modeladmin, request, queryset):
    queryset.update(status='Оплачен')


<mask token>


class OrderAdmin(admin.ModelAdmin):
    list_filter = ['status']
    actions = [make_payed]


<mask token>

<mask token>


def make_payed(modeladmin, request, queryset):
    queryset.update(status='Оплачен')


<mask token>


class OrderAdmin(admin.ModelAdmin):
    list_filter = ['status']
    actions = [make_payed]


admin.site.register(Category)
admin.site.register(Author)
admin.site.register(Book)
admin.site.register(CartItem)
admin.site.register(Cart)
admin.site.register(Order, OrderAdmin)

<mask token>


def make_payed(modeladmin, request, queryset):
    queryset.update(status='Оплачен')


make_payed.short_description = 'Пометить как оплаченные'


class OrderAdmin(admin.ModelAdmin):
    list_filter = ['status']
    actions = [make_payed]


admin.site.register(Category)
admin.site.register(Author)
admin.site.register(Book)
admin.site.register(CartItem)
admin.site.register(Cart)
admin.site.register(Order, OrderAdmin)

# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.contrib import admin
from ecomapp.models import Category, Author, Book, CartItem, Cart, Order

def make_payed(modeladmin, request, queryset):
    queryset.update(status='Оплачен')
make_payed.short_description = "Пометить как оплаченные"


class OrderAdmin(admin.ModelAdmin):
	list_filter = ['status']
	actions = [make_payed]


admin.site.register(Category)
admin.site.register(Author)
admin.site.register(Book)
admin.site.register(CartItem)
admin.site.register(Cart)
admin.site.register(Order, OrderAdmin)

# Register your models here.
