admin.py 922 Bytes
Newer Older
1 2 3 4 5 6 7 8
from django.contrib import admin
from django.contrib.auth.models import Group
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
from reversion.admin import VersionAdmin

from .models import Panier, Commande, Credit, Paiement, Livraison

class PanierAdmin(VersionAdmin):
9
    list_display = ('prix','coefficient_panier','nom')
10

Amap's avatar
Amap committed
11
class CommandeAdmin(VersionAdmin):
12
    list_display = ('user', 'quantite', 'coefficient_panier', 'prix_unitaire', 'nom', 'livre', 'date')
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27

class CreditAdmin(VersionAdmin):
    list_display = ('user','montant','moyen','validite')

class PaiementAdmin(VersionAdmin):
    list_display = ('moyen',)

class LivraisonAdmin(VersionAdmin):
    list_display = ('date',)

admin.site.register(Panier, PanierAdmin)
admin.site.register(Commande, CommandeAdmin)
admin.site.register(Credit, CreditAdmin)
admin.site.register(Paiement, PaiementAdmin)
admin.site.register(Livraison, LivraisonAdmin)