admin.py 2.18 KB
Newer Older
1
# -*- mode: python; coding: utf-8 -*-
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
# Re2o est un logiciel d'administration développé initiallement au rezometz. Il
# se veut agnostique au réseau considéré, de manière à être installable en
# quelques clics.
#
# Copyright © 2017  Gabriel Détraz
# Copyright © 2017  Goulven Kermarec
# Copyright © 2017  Augustin Lemesle
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 24 25
"""cotisations.admin
The objects, fields and datastructures visible in the Django admin view
"""
26

27 28
from __future__ import unicode_literals

29
from django.contrib import admin
30
from reversion.admin import VersionAdmin
31

32
from .models import Facture, Article, Banque, Paiement, Cotisation, Vente
33

chirac's avatar
chirac committed
34

35
class FactureAdmin(VersionAdmin):
36
    """Class admin d'une facture, tous les champs"""
chirac's avatar
chirac committed
37 38
    pass

39

40
class VenteAdmin(VersionAdmin):
41
    """Class admin d'une vente, tous les champs (facture related)"""
chirac's avatar
chirac committed
42 43
    pass

44

45
class ArticleAdmin(VersionAdmin):
46
    """Class admin d'un article en vente"""
chirac's avatar
chirac committed
47 48
    pass

49

50
class BanqueAdmin(VersionAdmin):
51
    """Class admin de la liste des banques (facture related)"""
chirac's avatar
chirac committed
52 53
    pass

54

55
class PaiementAdmin(VersionAdmin):
56
    """Class admin d'un moyen de paiement (facture related"""
chirac's avatar
chirac committed
57 58
    pass

59

60
class CotisationAdmin(VersionAdmin):
61 62
    """Class admin d'une cotisation (date de debut et de fin),
    Vente related"""
chirac's avatar
chirac committed
63 64
    pass

65

66 67 68 69
admin.site.register(Facture, FactureAdmin)
admin.site.register(Article, ArticleAdmin)
admin.site.register(Banque, BanqueAdmin)
admin.site.register(Paiement, PaiementAdmin)
70
admin.site.register(Vente, VenteAdmin)
71
admin.site.register(Cotisation, CotisationAdmin)