mirror of https://gitlab.federez.net/re2o/re2o
Browse Source
Release 2.9 It is that time of the year again. See [CHANGELOG.md](https://gitlab.federez.net/re2o/re2o/-/blob/release-2.9/CHANGELOG.md). Many thanks to the people who made Re2o2.9 possible, thanks to their 575 commits in almost one year of development! * Jean-Romain Garnier * Gabriel Detraz * Hugo Levy-Falk * Arthur Grisel-Davy * Corentin Canebier * Yoann Piétri * Jean-Marie Mineau * Leila Bekaddour * Maxime Bombar See merge request re2o/re2o!592fix_autocomplete_port 2.9
608 changed files with 28462 additions and 14920 deletions
@ -0,0 +1,86 @@ |
|||
Gabriel Detraz <chirac@crans.org> <detraz@crans.org> |
|||
Gabriel Detraz <chirac@crans.org> <chirac@crans.org> |
|||
Gabriel Detraz <chirac@crans.org> <chirac@arachne> |
|||
Gabriel Detraz <chirac@crans.org> <chirac@re2o-test.auro.re> |
|||
Gabriel Detraz <chirac@crans.org> <chirac@federez.net> |
|||
Gabriel Detraz <chirac@crans.org> <chirac@raspberrypi> |
|||
Gabriel Detraz <chirac@crans.org> <detraz@re2o-test.crans.org> |
|||
Gabriel Detraz <chirac@crans.org> <detraz@re2o.adm.crans.org> |
|||
Gabriel Detraz <chirac@crans.org> <chibrac@re2o-server.crans.org> |
|||
Gabriel Detraz <chirac@crans.org> <detraz@crans.crans.org> |
|||
Gabriel Detraz <chirac@crans.org> <chirac@re2o-server.crans.org> |
|||
Gabriel Detraz <chirac@crans.org> <chirac@hydra> |
|||
Gabriel Detraz <chirac@crans.org> <chirac@re2o-bcfg2.adm.crans.org> |
|||
Gabriel Detraz <chirac@crans.org> <detrazcrans.org> |
|||
Gabriel Detraz <chirac@crans.org> <detraz@vo.crans.org> |
|||
Maël Kervella <kervella.mael@gmail.com> |
|||
Maël Kervella <kervella.mael@gmail.com> <dev@maelkervella.eu> |
|||
Maël Kervella <kervella.mael@gmail.com> <mael.kervella@supelec.fr> |
|||
Jean-Romain Garnier <jean-romain.garnier@supelec.fr> |
|||
Jean-Romain Garnier <jean-romain.garnier@supelec.fr> <git@jean-romain.com> |
|||
Hugo Levy-Falk <hugo@klafyvel.me> <hugo.levy--falk@supelec.fr> |
|||
Hugo Levy-Falk <hugo@klafyvel.me> <klafyvel@gmail.com> |
|||
Hugo Levy-Falk <hugo@klafyvel.me> <klafyvel@klafyvel.me> |
|||
Hugo Levy-Falk <hugo@klafyvel.me> <klafyvel@federez.net> |
|||
Arthur Grisel-Davy <grisel-davy@crans.org> <grisel-davy@crans.org> |
|||
Arthur Grisel-Davy <grisel-davy@crans.org> <grisel-davy@re2o-server.crans.org> |
|||
Arthur Grisel-Davy <grisel-davy@crans.org> <grisel-davy@re2o-test.crans.org> |
|||
Arthur Grisel-Davy <grisel-davy@crans.org> <grisel-davy@re2o.adm.crans.org> |
|||
Arthur Grisel-Davy <grisel-davy@crans.org> <grisel-davy@nazgul.rezometz.org> |
|||
Arthur Grisel-Davy <grisel-davy@crans.org> <grisel-davy@re2o-test.auro.re> |
|||
Arthur Grisel-Davy <grisel-davy@crans.org> <grizzly@crans.org> |
|||
Arthur Grisel-Davy <grisel-davy@crans.org> <grizzly@raspberrypi> |
|||
Lara Kermarec <lhark@lharktop> <lhark@lharktop> |
|||
Lara Kermarec <lhark@lharktop> <lhark@arachne> |
|||
Lara Kermarec <lhark@lharktop> <lhark@pwc> |
|||
Lara Kermarec <lhark@lharktop> <goulven.kermarec@supelec.fr> |
|||
Lara Kermarec <lhark@lharktop> <lhark@federez-test> |
|||
Lara Kermarec <lhark@lharktop> <lhark@hydra> |
|||
Augustin Lemesle <augustin.lemesle@supelec.fr> <augustin.lemesle@supelec.fr> |
|||
Augustin Lemesle <augustin.lemesle@supelec.fr> <Dalahro@arachne> |
|||
Corentin Canebier <corentin@canebier.fr> |
|||
Corentin Canebier <corentin@canebier.fr> <corentin.canebier@student-cs.fr> |
|||
Root `root` Root <root@arachne> |
|||
Root `root` Root <root@arachne> <root@hydra.rezometz.org> |
|||
Root `root` Root <root@arachne> <root@federez-test.crans.org> |
|||
Root `root` Root <root@arachne> <root@gorgoroth> |
|||
Root `root` Root <root@arachne> <root@raspberrypi> |
|||
Root `root` Root <root@arachne> <root@nevrast> |
|||
Root `root` Root <root@arachne> <root@pwc> |
|||
Root `root` Root <root@arachne> <root@federez.net> |
|||
Root `root` Root <root@arachne> <root@hydra> |
|||
Root `root` Root <root@arachne> <root@morgoth.rez> |
|||
Root `root` Root <root@arachne> <root@re2o-server.crans.org> |
|||
Yoann Piétri <me@nanoy.fr> |
|||
Yoann Piétri <me@nanoy.fr> <yoann.pietri@supelec.fr> |
|||
Guillaume Goessel <rezo@guimoz.fr> |
|||
Guillaume Goessel <rezo@guimoz.fr> <guillaume.goessel@supelec.fr> |
|||
Guillaume Goessel <rezo@guimoz.fr> <guillaume.goessel@hotmail.com> |
|||
Guillaume Goessel <rezo@guimoz.fr> <me+federez@guimoz.fr> |
|||
David Sinquin <david.RezoMetz@sinquin.eu> |
|||
David Sinquin <david.RezoMetz@sinquin.eu> <david.rezo@sinquin.eu> |
|||
David Sinquin <david.RezoMetz@sinquin.eu> <david.federez.ldap@sinquin.eu> |
|||
Matthieu Michelet <matthieu.michelet@supelec.fr> |
|||
Matthieu Michelet <matthieu.michelet@supelec.fr> <michelet.matthieu@supelec.fr> |
|||
Jean-Marie Mineau <mineau.jean.marie@gmail.com> |
|||
~anonymised~ <sellem+re2o@crans.org> |
|||
~anonymised~ <sellem+re2o@crans.org> <sellem@crans.org> |
|||
Thibault de Boutray <me@thibaultdeboutray.pro> |
|||
Thibault de Boutray <me@thibaultdeboutray.pro> <thibaultdeboutray@gmail.com> |
|||
Fardale <fardale+git@crans.org> |
|||
Fardale <fardale+git@crans.org> <arrighi@crans.org> |
|||
Laouen Fernet <laouen.fernet@supelec.fr> |
|||
Laouen Fernet <laouen.fernet@supelec.fr> FERNET Laouen <laouen.fernet@supelec.fr> |
|||
Bombar Maxime <bombar@crans.org> |
|||
Leïla Bekaddour <leila.bekaddour@student-cs.fr> |
|||
Leïla Bekaddour <leila.bekaddour@student-cs.fr> <leila@ec-mac-cr-sho.home> |
|||
edpibu <edpibu@crans.org> |
|||
edpibu <edpibu@crans.org> <edpibu@re2o-test.crans.org> |
|||
Éloi Alain <eloi.alain@supelec.fr> |
|||
Éloi Alain <eloi.alain@supelec.fr> <eloi.alain@metz.supelec.fr> |
|||
Gabriel Le Bouder <lebouder@crans.org> |
|||
Gabriel Le Bouder <lebouder@crans.org> <lebouder@re2o-server.crans.org> |
|||
Charlie Jacomme <jacomme@crans.org> |
|||
Charlie Jacomme <jacomme@crans.org> <jacomme@crans.org> |
|||
Benjamin Graillot <graillot@crans.org> |
|||
Benjamin Graillot <graillot@crans.org> <graillot@crans.org> |
|||
@ -1,75 +1,64 @@ |
|||
**Note:** English version below. |
|||
|
|||
# Re2o |
|||
|
|||
GNU public license v2.0 |
|||
|
|||
## Avant propos |
|||
|
|||
Re2o est un logiciel d'administration développé initialement au rezometz. Il |
|||
se veut agnostique au réseau considéré, de manière à être installable en |
|||
quelques clics. |
|||
Re2o est un logiciel d'administration développé initialement au [Rézo Metz](https://www.rezometz.org/). Il |
|||
se veut agnostique au réseau considéré, de manière à être installable et configurable facilement. |
|||
|
|||
Il utilise le framework django avec python3. Il permet de gérer les adhérents, |
|||
les machines, les factures, les droits d'accès, les switchs et la topologie du |
|||
réseau. |
|||
De cette manière, il est possible de pluguer très facilement des services |
|||
dessus, qui accèdent à la base de donnée en passant par django (ex : dhcp), en |
|||
chargeant la liste de toutes les mac-ip, ou la liste des mac-ip autorisées sur |
|||
le réseau (adhérent à jour de cotisation). |
|||
Il est possible d'activer très facilement des services qui améliorerons les possibilités de Re2o pour convenir au mieux aux besoins de chaque association. |
|||
|
|||
# Installation |
|||
## Installation |
|||
|
|||
Un tutoriel pour installer le projet est disponible [sur le wiki](https://gitlab.federez.net/federez/re2o/wikis/User%20Documentation/Quick%20Start). |
|||
|
|||
# Installations Optionnelles |
|||
## Générer le schéma des dépendances |
|||
## Fonctionnement Général |
|||
|
|||
Re2o utilise le Framework Django et suit donc le principe de toutes les applications Django. Les différents composants sont les models (qui définissent les entrées de la base de données), les templates (qui définissent les pages), les views (qui génèrent les templates avec les données pertinentes), et les forms (qui définissent les pages de modification des objets). Ce framework permet de manipuler les données comme des objets Python. |
|||
|
|||
Tous ces composants sont regroupés en apps (users, machines, topologie,...). Certaines de ces apps constituent le coeur de Re2o et sont indispensables à son fonctionnement. Certaines autres apps sont optionnelles et peuvent être activées en fonction des besoins de chaque association. |
|||
|
|||
## API Rest |
|||
|
|||
Les données stockées dans Re2o sont disponibles via un API Rest. Les services installés sur d'autres machines (dhcp, dns, firewall,...) utilisent cet API pour avoir accès aux données des utilisateurs et fonctionner. |
|||
|
|||
# Wiki |
|||
|
|||
Le [Wiki](https://gitlab.federez.net/federez/re2o/-/wikis/home) est accessible sur le gitlab de Federez. Il regroupe les informations et instructions pour la plupart des composants de Re2o. |
|||
|
|||
---- |
|||
|
|||
# Re2o |
|||
|
|||
Pour cela : |
|||
* apt install python3-django-extensions |
|||
* python3 manage.py graph_models -a -g -o re2o.png |
|||
GNU Public license v2.0 |
|||
|
|||
# Fonctionnement interne |
|||
## Foreword |
|||
|
|||
## Fonctionnement général |
|||
Re2o is a management software initially developed at [Rézo Metz](https://www.rezometz.org/). It is now in use in several student organizations. It aims to remain agnostic of the organization that uses it and be easy to setup. |
|||
|
|||
Re2o est séparé entre les models, qui sont visibles sur le schéma des |
|||
dépendances. Il s'agit en réalité des tables sql, et les fields étant les |
|||
colonnes. |
|||
Ceci dit il n'est jamais nécessaire de toucher directement au sql, django |
|||
procédant automatiquement à tout cela. |
|||
On crée donc différents models (user, right pour les droits des users, |
|||
interfaces, IpList pour l'ensemble des adresses ip, etc) |
|||
Re2o is based on the Django framework and Python3. Its core functionalities include managing the members, their machines, their invoices and their rights to the network but also the topology of the network and its devices. |
|||
On top of this, it is possible to plug services to enhance the possibilities and fit the need of each organization. |
|||
|
|||
Du coté des forms, il s'agit des formulaires d'édition des models. Il |
|||
s'agit de ModelForms django, qui héritent des models très simplement, voir la |
|||
documentation django models forms. |
|||
# Setup |
|||
|
|||
Enfin les views, générent les pages web à partir des forms et des templates. |
|||
A tutorial is available on the [Wiki](https://gitlab.federez.net/federez/re2o/wikis/User%20Documentation/Quick%20Start) to describe the setup process. |
|||
|
|||
## Fonctionnement avec les services |
|||
# General Functioning |
|||
|
|||
Les services dhcp.py, dns.py etc accèdent aux données via des vues rest. |
|||
Celles-ci se trouvent dans machines/views.py. Elles sont générées via |
|||
machines/serializers.py qui génère les vues. IL s'agit de vues en json utilisées |
|||
par re2o-tools pour récupérer les données. |
|||
Il est nécessaire de créer un user dans re2o avec le droit serveur qui permet |
|||
d'accéder à ces vues, utilisé par re2o-tools. |
|||
Re2o follow the general functioning of a Django project and split its components between the models (describe the database objects), the templates (that define the front end), the views (that populate and serve the templates) and the forms (that provide front end object edition/creation/removal). This framework provide an abstraction layer to manipulate SQL objects as Python objects. |
|||
|
|||
# Requète en base de donnée |
|||
Functionalities are grouped in apps (users, machines, topologie,...). Along the core functionalities, optional functionalities are available and can be activated in the preferences. |
|||
|
|||
Pour avoir un shell, lancer : |
|||
```.bash |
|||
python3 manage.py shell |
|||
``` |
|||
## Rest API |
|||
|
|||
Pour charger des objets (exemple avec User), faire : |
|||
```.python |
|||
from users.models import User |
|||
``` |
|||
Re2o provide a Rest API to allow external services (dhcp, dns, firewall,...) installed on remote machines to access database informations in Json format. Those services are optional and should be installed and activated to fit each organization needs. |
|||
|
|||
Pour charger les objets django, il suffit de faire `User.objects.all()` |
|||
pour tous les users par exemple. |
|||
Il est ensuite aisé de faire des requêtes, par exemple |
|||
`User.objects.filter(pseudo='test')` |
|||
# Wiki |
|||
|
|||
Des exemples et la documentation complète sur les requêtes django sont |
|||
disponible sur le site officiel. |
|||
The [Wiki](https://gitlab.federez.net/federez/re2o/-/wikis/home) is available to provide information and instruction for most components of Re2o. |
|||
|
|||
@ -0,0 +1,34 @@ |
|||
# -*- coding: utf-8 -*- |
|||
from __future__ import unicode_literals |
|||
|
|||
from django.db import migrations |
|||
from django.conf import settings |
|||
|
|||
def create_api_permission(apps, schema_editor): |
|||
"""Creates the 'use_api' permission if not created. |
|||
|
|||
The 'use_api' is a fake permission in the sense it is not associated with an |
|||
existing model and this ensure the permission is created. |
|||
""" |
|||
ContentType = apps.get_model("contenttypes", "ContentType") |
|||
Permission = apps.get_model("auth", "Permission") |
|||
api_content_type, created = ContentType.objects.get_or_create( |
|||
app_label=settings.API_CONTENT_TYPE_APP_LABEL, |
|||
model=settings.API_CONTENT_TYPE_MODEL, |
|||
) |
|||
if created: |
|||
api_content_type.save() |
|||
api_permission, created = Permission.objects.get_or_create( |
|||
name=settings.API_PERMISSION_NAME, |
|||
content_type=api_content_type, |
|||
codename=settings.API_PERMISSION_CODENAME, |
|||
) |
|||
if created: |
|||
api_permission.save() |
|||
|
|||
class Migration(migrations.Migration): |
|||
initial = True |
|||
dependencies = [] |
|||
operations = [ |
|||
migrations.RunPython(create_api_permission) |
|||
] |
|||
File diff suppressed because it is too large
@ -0,0 +1,129 @@ |
|||
# -*- mode: python; coding: utf-8 -*- |
|||
# Re2o est un logiciel d'administration développé initiallement au Rézo Metz. Il |
|||
# se veut agnostique au réseau considéré, de manière à être installable en |
|||
# quelques clics. |
|||
# |
|||
# Copyright © 2018 Maël Kervella |
|||
# |
|||
# 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. |
|||
|
|||
from rest_framework import serializers |
|||
|
|||
import cotisations.models as cotisations |
|||
import preferences.models as preferences |
|||
from api.serializers import NamespacedHRField, NamespacedHIField, NamespacedHMSerializer |
|||
from users.api.serializers import UserSerializer |
|||
|
|||
|
|||
class FactureSerializer(NamespacedHMSerializer): |
|||
"""Serialize `cotisations.models.Facture` objects. |
|||
""" |
|||
|
|||
class Meta: |
|||
model = cotisations.Facture |
|||
fields = ( |
|||
"user", |
|||
"paiement", |
|||
"banque", |
|||
"cheque", |
|||
"date", |
|||
"valid", |
|||
"control", |
|||
"prix_total", |
|||
"name", |
|||
"api_url", |
|||
) |
|||
|
|||
|
|||
class BaseInvoiceSerializer(NamespacedHMSerializer): |
|||
class Meta: |
|||
model = cotisations.BaseInvoice |
|||
fields = "__all__" |
|||
|
|||
|
|||
class VenteSerializer(NamespacedHMSerializer): |
|||
"""Serialize `cotisations.models.Vente` objects. |
|||
""" |
|||
|
|||
class Meta: |
|||
model = cotisations.Vente |
|||
fields = ( |
|||
"facture", |
|||
"number", |
|||
"name", |
|||
"prix", |
|||
"duration_connection", |
|||
"duration_days_connection", |
|||
"duration_membership", |
|||
"duration_days_membership", |
|||
"prix_total", |
|||
"api_url", |
|||
) |
|||
|
|||
|
|||
class ArticleSerializer(NamespacedHMSerializer): |
|||
"""Serialize `cotisations.models.Article` objects. |
|||
""" |
|||
|
|||
class Meta: |
|||
model = cotisations.Article |
|||
fields = ("name", "prix", "duration_membership", "duration_days_membership", "duration_connection", "duration_days_connection", "type_user", "api_url") |
|||
|
|||
|
|||
class BanqueSerializer(NamespacedHMSerializer): |
|||
"""Serialize `cotisations.models.Banque` objects. |
|||
""" |
|||
|
|||
class Meta: |
|||
model = cotisations.Banque |
|||
fields = ("name", "api_url") |
|||
|
|||
|
|||
class PaiementSerializer(NamespacedHMSerializer): |
|||
"""Serialize `cotisations.models.Paiement` objects. |
|||
""" |
|||
|
|||
class Meta: |
|||
model = cotisations.Paiement |
|||
fields = ("moyen", "api_url") |
|||
|
|||
|
|||
class CotisationSerializer(NamespacedHMSerializer): |
|||
"""Serialize `cotisations.models.Cotisation` objects. |
|||
""" |
|||
|
|||
class Meta: |
|||
model = cotisations.Cotisation |
|||
fields = ("vente", "type_cotisation", "date_start_con", "date_end_con", "date_start_memb", "date_end_memb", "api_url") |
|||
|
|||
|
|||
class ReminderUsersSerializer(UserSerializer): |
|||
"""Serialize the data about a mailing member. |
|||
""" |
|||
|
|||
class Meta(UserSerializer.Meta): |
|||
fields = ("get_full_name", "get_mail") |
|||
|
|||
|
|||
class ReminderSerializer(serializers.ModelSerializer): |
|||
""" |
|||
Serialize the data about a reminder |
|||
""" |
|||
|
|||
users_to_remind = ReminderUsersSerializer(many=True) |
|||
|
|||
class Meta: |
|||
model = preferences.Reminder |
|||
fields = ("days", "message", "users_to_remind") |
|||
@ -0,0 +1,38 @@ |
|||
# -*- mode: python; coding: utf-8 -*- |
|||
# Re2o est un logiciel d'administration développé initiallement au Rézo Metz. Il |
|||
# se veut agnostique au réseau considéré, de manière à être installable en |
|||
# quelques clics. |
|||
# |
|||
# Copyright © 2018 Maël Kervella |
|||
# |
|||
# 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. |
|||
|
|||
from . import views |
|||
|
|||
urls_viewset = [ |
|||
(r"cotisations/facture", views.FactureViewSet, None), |
|||
(r"cotisations/vente", views.VenteViewSet, None), |
|||
(r"cotisations/article", views.ArticleViewSet, None), |
|||
(r"cotisations/banque", views.BanqueViewSet, None), |
|||
(r"cotisations/paiement", views.PaiementViewSet, None), |
|||
(r"cotisations/cotisation", views.CotisationViewSet, None) |
|||
] |
|||
|
|||
urls_view = [ |
|||
(r"cotisations/reminder-get-users", views.ReminderView), |
|||
|
|||
# Deprecated |
|||
(r"reminder/get-users", views.ReminderView), |
|||
] |
|||
@ -0,0 +1,89 @@ |
|||
# -*- mode: python; coding: utf-8 -*- |
|||
# Re2o est un logiciel d'administration développé initiallement au Rézo Metz. Il |
|||
# se veut agnostique au réseau considéré, de manière à être installable en |
|||
# quelques clics. |
|||
# |
|||
# Copyright © 2018 Maël Kervella |
|||
# |
|||
# 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. |
|||
|
|||
from rest_framework import viewsets, generics |
|||
|
|||
from . import serializers |
|||
import cotisations.models as cotisations |
|||
import preferences.models as preferences |
|||
|
|||
class FactureViewSet(viewsets.ReadOnlyModelViewSet): |
|||
"""Exposes list and details of `cotisations.models.Facture` objects. |
|||
""" |
|||
|
|||
queryset = cotisations.Facture.objects.all() |
|||
serializer_class = serializers.FactureSerializer |
|||
|
|||
|
|||
class FactureViewSet(viewsets.ReadOnlyModelViewSet): |
|||
"""Exposes list and details of `cotisations.models.Facture` objects. |
|||
""" |
|||
|
|||
queryset = cotisations.BaseInvoice.objects.all() |
|||
serializer_class = serializers.BaseInvoiceSerializer |
|||
|
|||
|
|||
class VenteViewSet(viewsets.ReadOnlyModelViewSet): |
|||
"""Exposes list and details of `cotisations.models.Vente` objects. |
|||
""" |
|||
|
|||
queryset = cotisations.Vente.objects.all() |
|||
serializer_class = serializers.VenteSerializer |
|||
|
|||
|
|||
class ArticleViewSet(viewsets.ReadOnlyModelViewSet): |
|||
"""Exposes list and details of `cotisations.models.Article` objects. |
|||
""" |
|||
|
|||
queryset = cotisations.Article.objects.all() |
|||
serializer_class = serializers.ArticleSerializer |
|||
|
|||
|
|||
class BanqueViewSet(viewsets.ReadOnlyModelViewSet): |
|||
"""Exposes list and details of `cotisations.models.Banque` objects. |
|||
""" |
|||
|
|||
queryset = cotisations.Banque.objects.all() |
|||
serializer_class = serializers.BanqueSerializer |
|||
|
|||
|
|||
class PaiementViewSet(viewsets.ReadOnlyModelViewSet): |
|||
"""Exposes list and details of `cotisations.models.Paiement` objects. |
|||
""" |
|||
|
|||
queryset = cotisations.Paiement.objects.all() |
|||
serializer_class = serializers.PaiementSerializer |
|||
|
|||
|
|||
class CotisationViewSet(viewsets.ReadOnlyModelViewSet): |
|||
"""Exposes list and details of `cotisations.models.Cotisation` objects. |
|||
""" |
|||
|
|||
queryset = cotisations.Cotisation.objects.all() |
|||
serializer_class = serializers.CotisationSerializer |
|||
|
|||
|
|||
class ReminderView(generics.ListAPIView): |
|||
"""Output for users to remind an end of their subscription. |
|||
""" |
|||
|
|||
queryset = preferences.Reminder.objects.all() |
|||
serializer_class = serializers.ReminderSerializer |
|||
@ -0,0 +1,970 @@ |
|||
# -*- coding: utf-8 -*- |
|||
from __future__ import unicode_literals |
|||
|
|||
from django.db import migrations, models |
|||
import django.db.models.deletion |
|||
import django.core.validators |
|||
import re2o.mixins |
|||
import re2o.aes_field |
|||
import re2o.field_permissions |
|||
import cotisations.models |
|||
import cotisations.payment_methods.mixins |
|||
|
|||
|
|||
class Migration(migrations.Migration): |
|||
initial = True |
|||
dependencies = [] |
|||
replaces = [ |
|||
("users", "0001_initial"), |
|||
("users", "0002_auto_20160630_2301"), |
|||
("users", "0003_listrights_rights"), |
|||
("users", "0004_auto_20160701_2312"), |
|||
("users", "0005_auto_20160702_0006"), |
|||
("users", "0006_ban"), |
|||
("users", "0007_auto_20160702_2322"), |
|||
("users", "0008_user_registered"), |
|||
("users", "0009_user_room"), |
|||
("users", "0010_auto_20160703_1226"), |
|||
("users", "0011_auto_20160703_1227"), |
|||
("users", "0012_auto_20160703_1230"), |
|||
("users", "0013_auto_20160704_1547"), |
|||
("users", "0014_auto_20160704_1548"), |
|||
("users", "0015_whitelist"), |
|||
("users", "0016_auto_20160706_1220"), |
|||
("users", "0017_auto_20160707_0105"), |
|||
("users", "0018_auto_20160707_0115"), |
|||
("users", "0019_auto_20160708_1633"), |
|||
("users", "0020_request"), |
|||
("users", "0021_ldapuser"), |
|||
("users", "0022_ldapuser_sambasid"), |
|||
("users", "0023_auto_20160724_1908"), |
|||
("users", "0024_remove_ldapuser_mac_list"), |
|||
("users", "0025_listshell"), |
|||
("users", "0026_user_shell"), |
|||
("users", "0027_auto_20160726_0216"), |
|||
("users", "0028_auto_20160726_0227"), |
|||
("users", "0029_auto_20160726_0229"), |
|||
("users", "0030_auto_20160726_0357"), |
|||
("users", "0031_auto_20160726_0359"), |
|||
("users", "0032_auto_20160727_2122"), |
|||
("users", "0033_remove_ldapuser_loginshell"), |
|||
("users", "0034_auto_20161018_0037"), |
|||
("users", "0035_auto_20161018_0046"), |
|||
("users", "0036_auto_20161022_2146"), |
|||
("users", "0037_auto_20161028_1906"), |
|||
("users", "0038_auto_20161031_0258"), |
|||
("users", "0039_auto_20161119_0033"), |
|||
("users", "0040_auto_20161119_1709"), |
|||
("users", "0041_listright_details"), |
|||
("users", "0042_auto_20161126_2028"), |
|||
("users", "0043_auto_20161224_1156"), |
|||
("users", "0043_ban_state"), |
|||
("users", "0044_user_ssh_public_key"), |
|||
("users", "0045_merge"), |
|||
("users", "0046_auto_20170617_1433"), |
|||
("users", "0047_auto_20170618_0156"), |
|||
("users", "0048_auto_20170618_0210"), |
|||
("users", "0049_auto_20170618_1424"), |
|||
("users", "0050_serviceuser_comment"), |
|||
("users", "0051_user_telephone"), |
|||
("users", "0052_ldapuser_shadowexpire"), |
|||
("users", "0053_auto_20170626_2105"), |
|||
("users", "0054_auto_20170626_2219"), |
|||
("users", "0055_auto_20171003_0556"), |
|||
("users", "0056_auto_20171015_2033"), |
|||
("users", "0057_auto_20171023_0301"), |
|||
("users", "0058_auto_20171025_0154"), |
|||
("users", "0059_auto_20171025_1854"), |
|||
("users", "0060_auto_20171120_0317"), |
|||
("users", "0061_auto_20171230_2033"), |
|||
("users", "0062_auto_20171231_0056"), |
|||
("users", "0063_auto_20171231_0140"), |
|||
("users", "0064_auto_20171231_0150"), |
|||
("users", "0065_auto_20171231_2053"), |
|||
("users", "0066_grouppermissions"), |
|||
("users", "0067_serveurpermission"), |
|||
("users", "0068_auto_20180107_2245"), |
|||
("users", "0069_club_mailing"), |
|||
("users", "0070_auto_20180324_1906"), |
|||
("users", "0071_auto_20180415_1252"), |
|||
("users", "0072_auto_20180426_2021"), |
|||
("users", "0073_auto_20180629_1614"), |
|||
("users", "0074_auto_20180810_2104"), |
|||
("users", "0074_auto_20180814_1059"), |
|||
("users", "0075_merge_20180815_2202"), |
|||
("users", "0076_auto_20180818_1321"), |
|||
("users", "0077_auto_20180824_1750"), |
|||
("users", "0078_auto_20181011_1405"), |
|||
("users", "0079_auto_20181228_2039"), |
|||
("users", "0080_auto_20190108_1726"), |
|||
("users", "0081_auto_20190317_0302"), |
|||
("users", "0082_auto_20190908_1338"), |
|||
("users", "0083_user_shortcuts_enabled"), |
|||
("users", "0084_auto_20191120_0159"), |
|||
("users", "0085_user_email_state"), |
|||
("users", "0086_user_email_change_date"), |
|||
("users", "0087_request_email"), |
|||
("users", "0088_auto_20200417_2312"), |
|||
("users", "0089_auto_20200418_0112"), |
|||
("users", "0090_auto_20200421_1825"), |
|||
("users", "0091_auto_20200423_1256"), |
|||
("users", "0092_auto_20200502_0057"), |
|||
("users", "0093_user_profile_image"), |
|||
("users", "0094_remove_user_profile_image"), |
|||
("users", "0095_user_theme"), |
|||
("users", "0096_auto_20210110_1811"), |
|||
("cotisations", "0001_initial"), |
|||
("cotisations", "0002_remove_facture_article"), |
|||
("cotisations", "0003_auto_20160702_1448"), |
|||
("cotisations", "0004_auto_20160702_1528"), |
|||
("cotisations", "0005_auto_20160702_1532"), |
|||
("cotisations", "0006_auto_20160702_1534"), |
|||
("cotisations", "0007_auto_20160702_1543"), |
|||
("cotisations", "0008_auto_20160702_1614"), |
|||
("cotisations", "0009_remove_cotisation_user"), |
|||
("cotisations", "0010_auto_20160702_1840"), |
|||
("cotisations", "0011_auto_20160702_1911"), |
|||
("cotisations", "0012_auto_20160704_0118"), |
|||
("cotisations", "0013_auto_20160711_2240"), |
|||
("cotisations", "0014_auto_20160712_0245"), |
|||
("cotisations", "0015_auto_20160714_2142"), |
|||
("cotisations", "0016_auto_20160715_0110"), |
|||
("cotisations", "0017_auto_20170718_2329"), |
|||
("cotisations", "0018_paiement_type_paiement"), |
|||
("cotisations", "0019_auto_20170819_0055"), |
|||
("cotisations", "0020_auto_20170819_0057"), |
|||
("cotisations", "0021_auto_20170819_0104"), |
|||
("cotisations", "0022_auto_20170824_0128"), |
|||
("cotisations", "0023_auto_20170902_1303"), |
|||
("cotisations", "0024_auto_20171015_2033"), |
|||
("cotisations", "0025_article_type_user"), |
|||
("cotisations", "0026_auto_20171028_0126"), |
|||
("cotisations", "0027_auto_20171029_1156"), |
|||
("cotisations", "0028_auto_20171231_0007"), |
|||
("cotisations", "0029_auto_20180414_2056"), |
|||
("cotisations", "0030_custom_payment"), |
|||
("cotisations", "0031_comnpaypayment_production"), |
|||
("cotisations", "0032_custom_invoice"), |
|||
("cotisations", "0033_auto_20180818_1319"), |
|||
("cotisations", "0034_auto_20180831_1532"), |
|||
("cotisations", "0035_notepayment"), |
|||
("cotisations", "0036_custominvoice_remark"), |
|||
("cotisations", "0037_costestimate"), |
|||
("cotisations", "0038_auto_20181231_1657"), |
|||
("cotisations", "0039_freepayment"), |
|||
("cotisations", "0040_auto_20191002_2335"), |
|||
("cotisations", "0041_auto_20191103_2131"), |
|||
("cotisations", "0042_auto_20191120_0159"), |
|||
("cotisations", "0043_separation_membership_connection_p1"), |
|||
("cotisations", "0044_separation_membership_connection_p2"), |
|||
("cotisations", "0045_separation_membership_connection_p3"), |
|||
("cotisations", "0046_article_need_membership"), |
|||
("cotisations", "0047_article_need_membership_init"), |
|||
("cotisations", "0048_auto_20201017_0018"), |
|||
("cotisations", "0049_auto_20201102_2305"), |
|||
("cotisations", "0050_auto_20201102_2342"), |
|||
("cotisations", "0051_auto_20201228_1636"), |
|||
("machines", "0001_initial"), |
|||
("machines", "0002_auto_20160703_1444"), |
|||
("machines", "0003_auto_20160703_1450"), |
|||
("machines", "0004_auto_20160703_1451"), |
|||
("machines", "0005_auto_20160703_1523"), |
|||
("machines", "0006_auto_20160703_1813"), |
|||
("machines", "0007_auto_20160703_1816"), |
|||
("machines", "0008_remove_interface_ipv6"), |
|||
("machines", "0009_auto_20160703_2358"), |
|||
("machines", "0010_auto_20160704_0104"), |
|||
("machines", "0011_auto_20160704_0105"), |
|||
("machines", "0012_auto_20160704_0118"), |
|||
("machines", "0013_auto_20160705_1014"), |
|||
("machines", "0014_auto_20160706_1220"), |
|||
("machines", "0015_auto_20160707_0105"), |
|||
("machines", "0016_auto_20160708_1633"), |
|||
("machines", "0017_auto_20160708_1645"), |
|||
("machines", "0018_auto_20160708_1813"), |
|||
("machines", "0019_auto_20160718_1141"), |
|||
("machines", "0020_auto_20160718_1849"), |
|||
("machines", "0021_auto_20161006_1943"), |
|||
("machines", "0022_auto_20161011_1829"), |
|||
("machines", "0023_iplist_ip_type"), |
|||
("machines", "0024_machinetype_need_infra"), |
|||
("machines", "0025_auto_20161023_0038"), |
|||
("machines", "0026_auto_20161026_1348"), |
|||
("machines", "0027_alias"), |
|||
("machines", "0028_iptype_domaine_ip"), |
|||
("machines", "0029_iptype_domaine_range"), |
|||
("machines", "0030_auto_20161118_1730"), |
|||
("machines", "0031_auto_20161119_1709"), |
|||
("machines", "0032_auto_20161119_1850"), |
|||
("machines", "0033_extension_need_infra"), |
|||
("machines", "0034_iplist_need_infra"), |
|||
("machines", "0035_auto_20161224_1201"), |
|||
("machines", "0036_auto_20161224_1204"), |
|||
("machines", "0037_domain_cname"), |
|||
("machines", "0038_auto_20161224_1721"), |
|||
("machines", "0039_auto_20161224_1732"), |
|||
("machines", "0040_remove_interface_dns"), |
|||
("machines", "0041_remove_ns_interface"), |
|||
("machines", "0042_ns_ns"), |
|||
("machines", "0043_auto_20170721_0350"), |
|||
("machines", "0044_auto_20170808_0233"), |
|||
("machines", "0045_auto_20170808_0348"), |
|||
("machines", "0046_auto_20170808_1423"), |
|||
("machines", "0047_auto_20170809_0606"), |
|||
("machines", "0048_auto_20170823_2315"), |
|||
("machines", "0049_vlan"), |
|||
("machines", "0050_auto_20170826_0022"), |
|||
("machines", "0051_iptype_vlan"), |
|||
("machines", "0052_auto_20170828_2322"), |
|||
("machines", "0053_text"), |
|||
("machines", "0054_text_zone"), |
|||
("machines", "0055_nas"), |
|||
("machines", "0056_nas_port_access_mode"), |
|||
("machines", "0057_nas_autocapture_mac"), |
|||
("machines", "0058_auto_20171002_0350"), |
|||
("machines", "0059_iptype_prefix_v6"), |
|||
("machines", "0060_iptype_ouverture_ports"), |
|||
("machines", "0061_auto_20171015_2033"), |
|||
("machines", "0062_extension_origin_v6"), |
|||
("machines", "0063_auto_20171020_0040"), |
|||
("machines", "0064_auto_20171115_0253"), |
|||
("machines", "0065_auto_20171115_1514"), |
|||
("machines", "0066_srv"), |
|||
("machines", "0067_auto_20171116_0152"), |
|||
("machines", "0068_auto_20171116_0252"), |
|||
("machines", "0069_auto_20171116_0822"), |
|||
("machines", "0070_auto_20171231_1947"), |
|||
("machines", "0071_auto_20171231_2100"), |
|||
("machines", "0072_auto_20180108_1822"), |
|||
("machines", "0073_auto_20180128_2203"), |
|||
("machines", "0074_auto_20180129_0352"), |
|||
("machines", "0075_auto_20180130_0052"), |
|||
("machines", "0076_auto_20180130_1623"), |
|||
("machines", "0077_auto_20180409_2243"), |
|||
("machines", "0078_auto_20180415_1252"), |
|||
("machines", "0079_auto_20180416_0107"), |
|||
("machines", "0080_auto_20180502_2334"), |
|||
("machines", "0081_auto_20180521_1413"), |
|||
("machines", "0082_auto_20180525_2209"), |
|||
("machines", "0083_remove_duplicate_rights"), |
|||
("machines", "0084_dname"), |
|||
("machines", "0085_sshfingerprint"), |
|||
("machines", "0086_role"), |
|||
("machines", "0087_dnssec"), |
|||
("machines", "0088_iptype_prefix_v6_length"), |
|||
("machines", "0089_auto_20180805_1148"), |
|||
("machines", "0090_auto_20180805_1459"), |
|||
("machines", "0091_auto_20180806_2310"), |
|||
("machines", "0092_auto_20180807_0926"), |
|||
("machines", "0093_auto_20180807_1115"), |
|||
("machines", "0094_auto_20180815_1918"), |
|||
("machines", "0095_auto_20180919_2225"), |
|||
("machines", "0096_auto_20181013_1417"), |
|||
("machines", "0097_extension_dnssec"), |
|||
("machines", "0098_auto_20190102_1745"), |
|||
("machines", "0099_role_recursive_dns"), |
|||
("machines", "0100_auto_20190102_1753"), |
|||
("machines", "0101_auto_20190108_1623"), |
|||
("machines", "0102_auto_20190303_1611"), |
|||
("machines", "0103_auto_20191002_2222"), |
|||
("machines", "0104_auto_20191002_2231"), |
|||
("machines", "0105_dname_ttl"), |
|||
("machines", "0106_auto_20191120_0159"), |
|||
("machines", "0107_fix_lowercase_domain"), |
|||
("machines", "0108_ipv6list_active"), |
|||
("preferences", "0001_initial"), |
|||
("preferences", "0002_auto_20170625_1923"), |
|||
("preferences", "0003_optionaluser_solde_negatif"), |
|||
("preferences", "0004_assooption_services"), |
|||
("preferences", "0005_auto_20170824_0139"), |
|||
("preferences", "0006_auto_20170824_0143"), |
|||
("preferences", "0007_auto_20170824_2056"), |
|||
("preferences", "0008_auto_20170824_2122"), |
|||
("preferences", "0009_assooption_utilisateur_asso"), |
|||
("preferences", "0010_auto_20170825_0459"), |
|||
("preferences", "0011_auto_20170825_2307"), |
|||
("preferences", "0012_generaloption_req_expire_hrs"), |
|||
("preferences", "0013_generaloption_site_name"), |
|||
("preferences", "0014_generaloption_email_from"), |
|||
("preferences", "0015_optionaltopologie_radius_general_policy"), |
|||
("preferences", "0016_auto_20170902_1520"), |
|||
("preferences", "0017_mailmessageoption"), |
|||
("preferences", "0018_optionaltopologie_mac_autocapture"), |
|||
("preferences", "0019_remove_optionaltopologie_mac_autocapture"), |
|||
("preferences", "0020_optionalmachine_ipv6"), |
|||
("preferences", "0021_auto_20171015_1741"), |
|||
("preferences", "0022_auto_20171015_1758"), |
|||
("preferences", "0023_auto_20171015_2033"), |
|||
("preferences", "0024_optionaluser_all_can_create"), |
|||
("preferences", "0025_auto_20171231_2142"), |
|||
("preferences", "0025_generaloption_general_message"), |
|||
("preferences", "0026_auto_20171216_0401"), |
|||
("preferences", "0027_merge_20180106_2019"), |
|||
("preferences", "0028_assooption_description"), |
|||
("preferences", "0028_auto_20180111_1129"), |
|||
("preferences", "0028_auto_20180128_2203"), |
|||
("preferences", "0029_auto_20180111_1134"), |
|||
("preferences", "0029_auto_20180318_0213"), |
|||
("preferences", "0029_auto_20180318_1005"), |
|||
("preferences", "0030_auto_20180111_2346"), |
|||
("preferences", "0030_merge_20180320_1419"), |
|||
("preferences", "0031_auto_20180323_0218"), |
|||
("preferences", "0031_optionaluser_self_adhesion"), |
|||
("preferences", "0032_optionaluser_min_online_payment"), |
|||
("preferences", "0032_optionaluser_shell_default"), |
|||
("preferences", "0033_accueiloption"), |
|||
("preferences", "0033_generaloption_gtu_sum_up"), |
|||
("preferences", "0034_auto_20180114_2025"), |
|||
("preferences", "0034_auto_20180416_1120"), |
|||
("preferences", "0035_auto_20180114_2132"), |
|||
("preferences", "0035_optionaluser_allow_self_subscription"), |
|||
("preferences", "0036_auto_20180114_2141"), |
|||
("preferences", "0037_auto_20180114_2156"), |
|||
("preferences", "0038_auto_20180114_2209"), |
|||
("preferences", "0039_auto_20180115_0003"), |
|||
("preferences", "0040_auto_20180129_1745"), |
|||
("preferences", "0041_merge_20180130_0052"), |
|||
("preferences", "0042_auto_20180222_1743"), |
|||
("preferences", "0043_optionalmachine_create_machine"), |
|||
("preferences", "0044_remove_payment_pass"), |
|||
("preferences", "0045_remove_unused_payment_fields"), |
|||
("preferences", "0046_optionaluser_mail_extension"), |
|||
("preferences", "0047_mailcontact"), |
|||
("preferences", "0048_auto_20180811_1515"), |
|||
("preferences", "0049_optionaluser_self_change_shell"), |
|||
("preferences", "0050_auto_20180818_1329"), |
|||
("preferences", "0051_auto_20180919_2225"), |
|||
("preferences", "0052_optionaluser_delete_notyetactive"), |
|||
("preferences", "0053_optionaluser_self_change_room"), |
|||
("preferences", "0055_generaloption_main_site_url"), |
|||
("preferences", "0056_1_radiusoption"), |
|||
("preferences", "0056_2_radiusoption"), |
|||
("preferences", "0056_3_radiusoption"), |
|||
("preferences", "0056_4_radiusoption"), |
|||
("preferences", "0057_optionaluser_all_users_active"), |
|||
("preferences", "0058_auto_20190108_1650"), |
|||
("preferences", "0059_auto_20190120_1739"), |
|||
("preferences", "0060_auto_20190712_1821"), |
|||
("preferences", "0061_optionaluser_allow_archived_connexion"), |
|||
("preferences", "0062_auto_20190910_1909"), |
|||
("preferences", "0063_mandate"), |
|||
("preferences", "0064_auto_20191008_1335"), |
|||
("preferences", "0065_auto_20191010_1227"), |
|||
("preferences", "0066_optionalmachine_default_dns_ttl"), |
|||
("preferences", "0067_auto_20191120_0159"), |
|||
("preferences", "0068_optionaluser_allow_set_password_during_user_creation"), |
|||
("preferences", "0069_optionaluser_disable_emailnotyetconfirmed"), |
|||
("preferences", "0070_auto_20200419_0225"), |
|||
("preferences", "0071_optionaluser_self_change_pseudo"), |
|||
("topologie", "0001_initial"), |
|||
("topologie", "0002_auto_20160703_1118"), |
|||
("topologie", "0003_room"), |
|||
("topologie", "0004_auto_20160703_1122"), |
|||
("topologie", "0005_auto_20160703_1123"), |
|||
("topologie", "0006_auto_20160703_1129"), |
|||
("topologie", "0007_auto_20160703_1148"), |
|||
("topologie", "0008_port_room"), |
|||
("topologie", "0009_auto_20160703_1200"), |
|||
("topologie", "0010_auto_20160704_2148"), |
|||
("topologie", "0011_auto_20160704_2153"), |
|||
("topologie", "0012_port_machine_interface"), |
|||
("topologie", "0013_port_related"), |
|||
("topologie", "0014_auto_20160706_1238"), |
|||
("topologie", "0015_auto_20160706_1452"), |
|||
("topologie", "0016_auto_20160706_1531"), |
|||
("topologie", "0017_auto_20160718_1141"), |
|||
("topologie", "0018_room_details"), |
|||
("topologie", "0019_auto_20161026_1348"), |
|||
("topologie", "0020_auto_20161119_0033"), |
|||
("topologie", "0021_port_radius"), |
|||
("topologie", "0022_auto_20161211_1622"), |
|||
("topologie", "0023_auto_20170817_1654"), |
|||
("topologie", "0023_auto_20170826_1530"), |
|||
("topologie", "0024_auto_20170818_1021"), |
|||
("topologie", "0024_auto_20170826_1800"), |
|||
("topologie", "0025_merge_20170902_1242"), |
|||
("topologie", "0026_auto_20170902_1245"), |
|||
("topologie", "0027_auto_20170905_1442"), |
|||
("topologie", "0028_auto_20170913_1503"), |
|||
("topologie", "0029_auto_20171002_0334"), |
|||
("topologie", "0030_auto_20171004_0235"), |
|||
("topologie", "0031_auto_20171015_2033"), |
|||
("topologie", "0032_auto_20171026_0338"), |
|||
("topologie", "0033_auto_20171231_1743"), |
|||
("topologie", "0034_borne"), |
|||
("topologie", "0035_auto_20180324_0023"), |
|||
("topologie", "0036_transferborne"), |
|||
("topologie", "0037_auto_20180325_0127"), |
|||
("topologie", "0038_transfersw"), |
|||
("topologie", "0039_port_new_switch"), |
|||
("topologie", "0040_transferports"), |
|||
("topologie", "0041_transferportsw"), |
|||
("topologie", "0042_transferswitch"), |
|||
("topologie", "0043_renamenewswitch"), |
|||
("topologie", "0044_auto_20180326_0002"), |
|||
("topologie", "0045_auto_20180326_0123"), |
|||
("topologie", "0046_auto_20180326_0129"), |
|||
("topologie", "0047_ap_machine"), |
|||
("topologie", "0048_ap_machine"), |
|||
("topologie", "0049_switchs_machine"), |
|||
("topologie", "0050_port_new_switch"), |
|||
("topologie", "0051_switchs_machine"), |
|||
("topologie", "0052_transferports"), |
|||
("topologie", "0053_finalsw"), |
|||
("topologie", "0054_auto_20180326_1742"), |
|||
("topologie", "0055_auto_20180329_0431"), |
|||
("topologie", "0056_building_switchbay"), |
|||
("topologie", "0057_auto_20180408_0316"), |
|||
("topologie", "0058_remove_switch_location"), |
|||
("topologie", "0059_auto_20180415_2249"), |
|||
("topologie", "0060_server"), |
|||
("topologie", "0061_portprofile"), |
|||
("topologie", "0062_auto_20180815_1918"), |
|||
("topologie", "0063_auto_20180919_2225"), |
|||
("topologie", "0064_switch_automatic_provision"), |
|||
("topologie", "0065_auto_20180927_1836"), |
|||
("topologie", "0066_modelswitch_commercial_name"), |
|||
("topologie", "0067_auto_20181230_1819"), |
|||
("topologie", "0068_auto_20190102_1758"), |
|||
("topologie", "0069_auto_20190108_1439"), |
|||
("topologie", "0070_auto_20190218_1743"), |
|||
("topologie", "0071_auto_20190218_1936"), |
|||
("topologie", "0072_auto_20190720_2318"), |
|||
("topologie", "0073_auto_20191120_0159"), |
|||
("topologie", "0074_auto_20200419_1640"), |
|||
] |
|||
operations = [ |
|||
migrations.CreateModel( |
|||
name="BaseInvoice", |
|||
fields=[ |
|||
( |
|||
"id", |
|||
models.AutoField( |
|||
auto_created=True, |
|||
primary_key=True, |
|||
serialize=False, |
|||
verbose_name="ID", |
|||
), |
|||
), |
|||
("date", models.DateTimeField(auto_now_add=True, verbose_name="date")), |
|||
], |
|||
bases=( |
|||
re2o.mixins.RevMixin, |
|||
re2o.mixins.AclMixin, |
|||
re2o.field_permissions.FieldPermissionModelMixin, |
|||
models.Model, |
|||
), |
|||
), |
|||
migrations.CreateModel( |
|||
name="Facture", |
|||
fields=[ |
|||
( |
|||
"baseinvoice_ptr", |
|||
models.OneToOneField( |
|||
auto_created=True, |
|||
on_delete=django.db.models.deletion.CASCADE, |
|||
parent_link=True, |
|||
primary_key=True, |
|||
serialize=False, |
|||
to="cotisations.BaseInvoice", |
|||
), |
|||
), |
|||
( |
|||
"cheque", |
|||
models.CharField( |
|||
max_length=255, blank=True, verbose_name="cheque number" |
|||
), |
|||
), |
|||
("valid", models.BooleanField(default=False, verbose_name="validated")), |
|||
( |
|||
"control", |
|||
models.BooleanField(default=False, verbose_name="controlled"), |
|||
), |
|||
], |
|||
options={ |
|||
"permissions": ( |
|||
("change_facture_control", 'Can edit the "controlled" state'), |
|||
("view_facture", "Can view an invoice object"), |
|||
("change_all_facture", "Can edit all the previous invoices"), |
|||
), |
|||
"verbose_name": "invoice", |
|||
"verbose_name_plural": "invoices", |
|||
}, |
|||
), |
|||
migrations.CreateModel( |
|||
name="CustomInvoice", |
|||
fields=[ |
|||
( |
|||
"baseinvoice_ptr", |
|||
models.OneToOneField( |
|||
auto_created=True, |
|||
on_delete=django.db.models.deletion.CASCADE, |
|||
parent_link=True, |
|||
primary_key=True, |
|||
serialize=False, |
|||
to="cotisations.BaseInvoice", |
|||
), |
|||
), |
|||
( |
|||
"recipient", |
|||
models.CharField(max_length=255, verbose_name="recipient"), |
|||
), |
|||
( |
|||
"payment", |
|||
models.CharField(max_length=255, verbose_name="payment type"), |
|||
), |
|||
("address", models.CharField(max_length=255, verbose_name="address")), |
|||
("paid", models.BooleanField(default=False, verbose_name="paid")), |
|||
( |
|||
"remark", |
|||
models.TextField(verbose_name="remark", blank=True, null=True), |
|||
), |
|||
], |
|||
bases=("cotisations.baseinvoice",), |
|||
options={ |
|||
"permissions": ( |
|||
("view_custominvoice", "Can view a custom invoice object"), |
|||
) |
|||
}, |
|||
), |
|||
migrations.CreateModel( |
|||
name="CostEstimate", |
|||
fields=[ |
|||
( |
|||
"custominvoice_ptr", |
|||
models.OneToOneField( |
|||
auto_created=True, |
|||
on_delete=django.db.models.deletion.CASCADE, |
|||
parent_link=True, |
|||
primary_key=True, |
|||
serialize=False, |
|||
to="cotisations.CustomInvoice", |
|||
), |
|||
), |
|||
( |
|||
"validity", |
|||
models.DurationField( |
|||
verbose_name="period of validity", help_text="DD HH:MM:SS" |
|||
), |
|||
), |
|||
], |
|||
options={ |
|||
"permissions": ( |
|||
("view_costestimate", "Can view a cost estimate object"), |
|||
) |
|||
}, |
|||
bases=("cotisations.custominvoice",), |
|||
), |
|||
migrations.CreateModel( |
|||
name="Vente", |
|||
fields=[ |
|||
( |
|||
"id", |
|||
models.AutoField( |
|||
auto_created=True, |
|||
primary_key=True, |
|||
serialize=False, |
|||
verbose_name="ID", |
|||
), |
|||
), |
|||
( |
|||
"number", |
|||
models.IntegerField( |
|||
validators=[django.core.validators.MinValueValidator(1)], |
|||
verbose_name="amount", |
|||
), |
|||
), |
|||
("name", models.CharField(max_length=255, verbose_name="article")), |
|||
( |
|||
"prix", |
|||
models.DecimalField( |
|||
max_digits=5, decimal_places=2, verbose_name="price" |
|||
), |
|||
), |
|||
( |
|||
"duration_connection", |
|||
models.PositiveIntegerField( |
|||
default=0, verbose_name="duration of the connection (in months)" |
|||
), |
|||
), |
|||
( |
|||
"duration_days_connection", |
|||
models.PositiveIntegerField( |
|||
default=0, |
|||
verbose_name="duration of the connection (in days, will be added to duration in months)", |
|||
), |
|||
), |
|||
( |
|||
"duration_membership", |
|||
models.PositiveIntegerField( |
|||
default=0, verbose_name="duration of the membership (in months)" |
|||
), |
|||
), |
|||
( |
|||
"duration_days_membership", |
|||
models.PositiveIntegerField( |
|||
default=0, |
|||
verbose_name="duration of the membership (in days, will be added to duration in months)", |
|||
), |
|||
), |
|||
], |
|||
bases=( |
|||
re2o.mixins.RevMixin, |
|||
re2o.mixins.AclMixin, |
|||
models.Model, |
|||
), |
|||
options={ |
|||
"permissions": ( |
|||
("view_vente", "Can view a purchase object"), |
|||
("change_all_vente", "Can edit all the previous purchases"), |
|||
), |
|||
"verbose_name": "purchase", |
|||
"verbose_name_plural": "purchases", |
|||
}, |
|||
), |
|||
migrations.CreateModel( |
|||
name="Article", |
|||
bases=( |
|||
re2o.mixins.RevMixin, |
|||
re2o.mixins.AclMixin, |
|||
models.Model, |
|||
), |
|||
fields=[ |
|||
( |
|||
"id", |
|||
models.AutoField( |
|||
auto_created=True, |
|||
primary_key=True, |
|||
serialize=False, |
|||
verbose_name="ID", |
|||
), |
|||
), |
|||
( |
|||
"name", |
|||
models.CharField(max_length=255, verbose_name="designation"), |
|||
), |
|||
( |
|||
"prix", |
|||
models.DecimalField( |
|||
max_digits=5, decimal_places=2, verbose_name="unit price" |
|||
), |
|||
), |
|||
( |
|||
"duration_connection", |
|||
models.PositiveIntegerField( |
|||
verbose_name="duration of the connection (in months)" |
|||
), |
|||
), |
|||
( |
|||
"duration_days_connection", |
|||
models.PositiveIntegerField( |
|||
verbose_name="duration of the connection (in days, will be added to duration in months)", |
|||
), |
|||
), |
|||
( |
|||
"duration_membership", |
|||
models.PositiveIntegerField( |
|||
verbose_name="duration of the membership (in months)" |
|||
), |
|||
), |
|||
( |
|||
"duration_days_membership", |
|||
models.PositiveIntegerField( |
|||
verbose_name="duration of the membership (in days, will be added to duration in months)", |
|||
), |
|||
), |
|||
( |
|||
"need_membership", |
|||
models.BooleanField( |
|||
default=True, verbose_name="need membership to be purchased" |
|||
), |
|||
), |
|||
( |
|||
"type_user", |
|||
models.CharField( |
|||
choices=[ |
|||
("Adherent", "Member"), |
|||
("Club", "Club"), |
|||
("All", "Both of them"), |
|||
], |
|||
default="All", |
|||
max_length=255, |
|||
verbose_name="type of users concerned", |
|||
), |
|||
), |
|||
( |
|||
"available_for_everyone", |
|||
models.BooleanField( |
|||
default=False, verbose_name="is available for every user" |
|||
), |
|||
), |
|||
], |
|||
options={ |
|||
"permissions": ( |
|||
("view_article", "Can view an article object"), |
|||
("buy_every_article", "Can buy every article"), |
|||
), |
|||
"verbose_name": "article", |
|||
"verbose_name_plural": "articles", |
|||
}, |
|||
), |
|||
migrations.CreateModel( |
|||
name="Banque", |
|||
bases=( |
|||
re2o.mixins.RevMixin, |
|||
re2o.mixins.AclMixin, |
|||
models.Model, |
|||
), |
|||
fields=[ |
|||
( |
|||
"id", |
|||
models.AutoField( |
|||
auto_created=True, |
|||
primary_key=True, |
|||
serialize=False, |
|||
verbose_name="ID", |
|||
), |
|||
), |
|||
("name", models.CharField(max_length=255)), |
|||
], |
|||
options={ |
|||
"permissions": (("view_banque", "Can view a bank object"),), |
|||
"verbose_name": "bank", |
|||
"verbose_name_plural": "banks", |
|||
}, |
|||
), |
|||
migrations.CreateModel( |
|||
name="Paiement", |
|||
bases=( |
|||
re2o.mixins.RevMixin, |
|||
re2o.mixins.AclMixin, |
|||
models.Model, |
|||
), |
|||
fields=[ |
|||
( |
|||
"id", |
|||
models.AutoField( |
|||
auto_created=True, |
|||
primary_key=True, |
|||
serialize=False, |
|||
verbose_name="ID", |
|||
), |
|||
), |
|||
("moyen", models.CharField(max_length=255, verbose_name="method")), |
|||
( |
|||
"available_for_everyone", |
|||
models.BooleanField( |
|||
default=False, |
|||
verbose_name="is available for every user", |
|||
), |
|||
), |
|||
( |
|||
"is_balance", |
|||
models.BooleanField( |
|||
default=False, |
|||
editable=False, |
|||
verbose_name="is user balance", |
|||
help_text="There should be only one balance payment method.", |
|||
validators=[cotisations.models.check_no_balance], |
|||
), |
|||
), |
|||
], |
|||
options={ |
|||
"permissions": ( |
|||
("view_paiement", "Can view a payment method object"), |
|||
("use_every_payment", "Can use every payment method"), |
|||
), |
|||
"verbose_name": "payment method", |
|||
"verbose_name_plural": "payment methods", |
|||
}, |
|||
), |
|||
migrations.CreateModel( |
|||
name="Cotisation", |
|||
bases=( |
|||
re2o.mixins.RevMixin, |
|||
re2o.mixins.AclMixin, |
|||
models.Model, |
|||
), |
|||
fields=[ |
|||
( |
|||
"id", |
|||
models.AutoField( |
|||
auto_created=True, |
|||
primary_key=True, |
|||
serialize=False, |
|||
verbose_name="ID", |
|||
), |
|||
), |
|||
( |
|||
"date_start_con", |
|||
models.DateTimeField(verbose_name="start date for the connection"), |
|||
), |
|||
( |
|||
"date_end_con", |
|||
models.DateTimeField(verbose_name="end date for the connection"), |
|||
), |
|||
( |
|||
"date_start_memb", |
|||
models.DateTimeField(verbose_name="start date for the membership"), |
|||
), |
|||
( |
|||
"date_end_memb", |
|||
models.DateTimeField(verbose_name="end date for the membership"), |
|||
), |
|||
], |
|||
options={ |
|||
"permissions": ( |
|||
("view_cotisation", "Can view a subscription object"), |
|||
("change_all_cotisation", "Can edit the previous subscriptions"), |
|||
), |
|||
"verbose_name": "subscription", |
|||
"verbose_name_plural": "subscriptions", |
|||
}, |
|||
), |
|||
migrations.CreateModel( |
|||
name="BalancePayment", |
|||
bases=(cotisations.payment_methods.mixins.PaymentMethodMixin, models.Model), |
|||
fields=[ |
|||
( |
|||
"id", |
|||
models.AutoField( |
|||
auto_created=True, |
|||
primary_key=True, |
|||
serialize=False, |
|||
verbose_name="ID", |
|||
), |
|||
), |
|||
( |
|||
"minimum_balance", |
|||
models.DecimalField( |
|||
verbose_name="minimum balance", |
|||
help_text="The minimal amount of money allowed for the balance at the end of a payment. You can specify a negative amount.", |
|||
max_digits=5, |
|||
decimal_places=2, |
|||
default=0, |
|||
), |
|||
), |
|||
( |
|||
"maximum_balance", |
|||
models.DecimalField( |
|||
verbose_name="maximum balance", |
|||
help_text="The maximal amount of money allowed for the balance.", |
|||
max_digits=5, |
|||
decimal_places=2, |
|||
default=50, |
|||
blank=True, |
|||
null=True, |
|||
), |
|||
), |
|||
( |
|||
"credit_balance_allowed", |
|||
models.BooleanField( |
|||
verbose_name="allow user to credit their balance", default=False |
|||
), |
|||
), |
|||
], |
|||
options={"verbose_name": "user balance"}, |
|||
), |
|||
migrations.CreateModel( |
|||
name="ChequePayment", |
|||
bases=(cotisations.payment_methods.mixins.PaymentMethodMixin, models.Model), |
|||
fields=[ |
|||
( |
|||
"id", |
|||
models.AutoField( |
|||
auto_created=True, |
|||
primary_key=True, |
|||
serialize=False, |
|||
verbose_name="ID", |
|||
), |
|||
), |
|||
], |
|||
options={"verbose_name": "cheque"}, |
|||
), |
|||
migrations.CreateModel( |
|||
name="ComnpayPayment", |
|||
bases=(cotisations.payment_methods.mixins.PaymentMethodMixin, models.Model), |
|||
fields=[ |
|||
( |
|||
"id", |
|||
models.AutoField( |
|||
auto_created=True, |
|||
primary_key=True, |
|||
serialize=False, |
|||
verbose_name="ID", |
|||
), |
|||
), |
|||
( |
|||
"payment_credential", |
|||
models.CharField( |
|||
max_length=255, |
|||
default="", |
|||
blank=True, |
|||
verbose_name="ComNpay VAT Number", |
|||
), |
|||
), |
|||
( |
|||
"payment_pass", |
|||
re2o.aes_field.AESEncryptedField( |
|||
max_length=255, |
|||
null=True, |
|||
blank=True, |
|||
verbose_name="ComNpay secret key", |
|||
), |
|||
), |
|||
( |
|||
"minimum_payment", |
|||
models.DecimalField( |
|||
verbose_name="minimum payment", |
|||
help_text="The minimal amount of money you have to use when paying with ComNpay.", |
|||
max_digits=5, |
|||
decimal_places=2, |
|||
default=1, |
|||
), |
|||
), |
|||
( |
|||
"production", |
|||
models.BooleanField( |
|||
default=True, |
|||
verbose_name="production mode enabled (production URL, instead of homologation)", |
|||
), |
|||
), |
|||
], |
|||
options={"verbose_name": "ComNpay"}, |
|||
), |
|||
migrations.CreateModel( |
|||
name="FreePayment", |
|||
bases=(cotisations.payment_methods.mixins.PaymentMethodMixin, models.Model), |
|||
fields=[ |
|||
( |
|||
"id", |
|||
models.AutoField( |
|||
auto_created=True, |
|||
primary_key=True, |
|||
serialize=False, |
|||
verbose_name="ID", |
|||
), |
|||
), |
|||
], |
|||
options={"verbose_name": "Free payment"}, |
|||
), |
|||
migrations.CreateModel( |
|||
name="NotePayment", |
|||
bases=(cotisations.payment_methods.mixins.PaymentMethodMixin, models.Model), |
|||
fields=[ |
|||
( |
|||
"id", |
|||
models.AutoField( |
|||
auto_created=True, |
|||
primary_key=True, |
|||
serialize=False, |
|||
verbose_name="ID", |
|||
), |
|||
), |
|||
("server", models.CharField(max_length=255, verbose_name="server")), |
|||
("port", models.PositiveIntegerField(blank=True, null=True)), |
|||
("id_note", models.PositiveIntegerField(blank=True, null=True)), |
|||
], |
|||
options={"verbose_name": "NoteKfet"}, |
|||
), |
|||
] |
|||
@ -0,0 +1,500 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Generated by Django 1.11.29 on 2020-12-30 15:27 |
|||
from __future__ import unicode_literals |
|||
|
|||
from django.conf import settings |
|||
from django.db import migrations, models |
|||
import django.db.models.deletion |
|||
|
|||
|
|||
class Migration(migrations.Migration): |
|||
|
|||
dependencies = [ |
|||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), |
|||
('cotisations', '0001_model_creation'), |
|||
] |
|||
replaces = [ |
|||
("users", "0001_initial"), |
|||
("users", "0002_auto_20160630_2301"), |
|||
("users", "0003_listrights_rights"), |
|||
("users", "0004_auto_20160701_2312"), |
|||
("users", "0005_auto_20160702_0006"), |
|||
("users", "0006_ban"), |
|||
("users", "0007_auto_20160702_2322"), |
|||
("users", "0008_user_registered"), |
|||
("users", "0009_user_room"), |
|||
("users", "0010_auto_20160703_1226"), |
|||
("users", "0011_auto_20160703_1227"), |
|||
("users", "0012_auto_20160703_1230"), |
|||
("users", "0013_auto_20160704_1547"), |
|||
("users", "0014_auto_20160704_1548"), |
|||
("users", "0015_whitelist"), |
|||
("users", "0016_auto_20160706_1220"), |
|||
("users", "0017_auto_20160707_0105"), |
|||
("users", "0018_auto_20160707_0115"), |
|||
("users", "0019_auto_20160708_1633"), |
|||
("users", "0020_request"), |
|||
("users", "0021_ldapuser"), |
|||
("users", "0022_ldapuser_sambasid"), |
|||
("users", "0023_auto_20160724_1908"), |
|||
("users", "0024_remove_ldapuser_mac_list"), |
|||
("users", "0025_listshell"), |
|||
("users", "0026_user_shell"), |
|||
("users", "0027_auto_20160726_0216"), |
|||
("users", "0028_auto_20160726_0227"), |
|||
("users", "0029_auto_20160726_0229"), |
|||
("users", "0030_auto_20160726_0357"), |
|||
("users", "0031_auto_20160726_0359"), |
|||
("users", "0032_auto_20160727_2122"), |
|||
("users", "0033_remove_ldapuser_loginshell"), |
|||
("users", "0034_auto_20161018_0037"), |
|||
("users", "0035_auto_20161018_0046"), |
|||
("users", "0036_auto_20161022_2146"), |
|||
("users", "0037_auto_20161028_1906"), |
|||
("users", "0038_auto_20161031_0258"), |
|||
("users", "0039_auto_20161119_0033"), |
|||
("users", "0040_auto_20161119_1709"), |
|||
("users", "0041_listright_details"), |
|||
("users", "0042_auto_20161126_2028"), |
|||
("users", "0043_auto_20161224_1156"), |
|||
("users", "0043_ban_state"), |
|||
("users", "0044_user_ssh_public_key"), |
|||
("users", "0045_merge"), |
|||
("users", "0046_auto_20170617_1433"), |
|||
("users", "0047_auto_20170618_0156"), |
|||
("users", "0048_auto_20170618_0210"), |
|||
("users", "0049_auto_20170618_1424"), |
|||
("users", "0050_serviceuser_comment"), |
|||
("users", "0051_user_telephone"), |
|||
("users", "0052_ldapuser_shadowexpire"), |
|||
("users", "0053_auto_20170626_2105"), |
|||
("users", "0054_auto_20170626_2219"), |
|||
("users", "0055_auto_20171003_0556"), |
|||
("users", "0056_auto_20171015_2033"), |
|||
("users", "0057_auto_20171023_0301"), |
|||
("users", "0058_auto_20171025_0154"), |
|||
("users", "0059_auto_20171025_1854"), |
|||
("users", "0060_auto_20171120_0317"), |
|||
("users", "0061_auto_20171230_2033"), |
|||
("users", "0062_auto_20171231_0056"), |
|||
("users", "0063_auto_20171231_0140"), |
|||
("users", "0064_auto_20171231_0150"), |
|||
("users", "0065_auto_20171231_2053"), |
|||
("users", "0066_grouppermissions"), |
|||
("users", "0067_serveurpermission"), |
|||
("users", "0068_auto_20180107_2245"), |
|||
("users", "0069_club_mailing"), |
|||
("users", "0070_auto_20180324_1906"), |
|||
("users", "0071_auto_20180415_1252"), |
|||
("users", "0072_auto_20180426_2021"), |
|||
("users", "0073_auto_20180629_1614"), |
|||
("users", "0074_auto_20180810_2104"), |
|||
("users", "0074_auto_20180814_1059"), |
|||
("users", "0075_merge_20180815_2202"), |
|||
("users", "0076_auto_20180818_1321"), |
|||
("users", "0077_auto_20180824_1750"), |
|||
("users", "0078_auto_20181011_1405"), |
|||
("users", "0079_auto_20181228_2039"), |
|||
("users", "0080_auto_20190108_1726"), |
|||
("users", "0081_auto_20190317_0302"), |
|||
("users", "0082_auto_20190908_1338"), |
|||
("users", "0083_user_shortcuts_enabled"), |
|||
("users", "0084_auto_20191120_0159"), |
|||
("users", "0085_user_email_state"), |
|||
("users", "0086_user_email_change_date"), |
|||
("users", "0087_request_email"), |
|||
("users", "0088_auto_20200417_2312"), |
|||
("users", "0089_auto_20200418_0112"), |
|||
("users", "0090_auto_20200421_1825"), |
|||
("users", "0091_auto_20200423_1256"), |
|||
("users", "0092_auto_20200502_0057"), |
|||
("users", "0093_user_profile_image"), |
|||
("users", "0094_remove_user_profile_image"), |
|||
("users", "0095_user_theme"), |
|||
("users", "0096_auto_20210110_1811"), |
|||
("cotisations", "0001_initial"), |
|||
("cotisations", "0002_remove_facture_article"), |
|||
("cotisations", "0003_auto_20160702_1448"), |
|||
("cotisations", "0004_auto_20160702_1528"), |
|||
("cotisations", "0005_auto_20160702_1532"), |
|||
("cotisations", "0006_auto_20160702_1534"), |
|||
("cotisations", "0007_auto_20160702_1543"), |
|||
("cotisations", "0008_auto_20160702_1614"), |
|||
("cotisations", "0009_remove_cotisation_user"), |
|||
("cotisations", "0010_auto_20160702_1840"), |
|||
("cotisations", "0011_auto_20160702_1911"), |
|||
("cotisations", "0012_auto_20160704_0118"), |
|||
("cotisations", "0013_auto_20160711_2240"), |
|||
("cotisations", "0014_auto_20160712_0245"), |
|||
("cotisations", "0015_auto_20160714_2142"), |
|||
("cotisations", "0016_auto_20160715_0110"), |
|||
("cotisations", "0017_auto_20170718_2329"), |
|||
("cotisations", "0018_paiement_type_paiement"), |
|||
("cotisations", "0019_auto_20170819_0055"), |
|||
("cotisations", "0020_auto_20170819_0057"), |
|||
("cotisations", "0021_auto_20170819_0104"), |
|||
("cotisations", "0022_auto_20170824_0128"), |
|||
("cotisations", "0023_auto_20170902_1303"), |
|||
("cotisations", "0024_auto_20171015_2033"), |
|||
("cotisations", "0025_article_type_user"), |
|||
("cotisations", "0026_auto_20171028_0126"), |
|||
("cotisations", "0027_auto_20171029_1156"), |
|||
("cotisations", "0028_auto_20171231_0007"), |
|||
("cotisations", "0029_auto_20180414_2056"), |
|||
("cotisations", "0030_custom_payment"), |
|||
("cotisations", "0031_comnpaypayment_production"), |
|||
("cotisations", "0032_custom_invoice"), |
|||
("cotisations", "0033_auto_20180818_1319"), |
|||
("cotisations", "0034_auto_20180831_1532"), |
|||
("cotisations", "0035_notepayment"), |
|||
("cotisations", "0036_custominvoice_remark"), |
|||
("cotisations", "0037_costestimate"), |
|||
("cotisations", "0038_auto_20181231_1657"), |
|||
("cotisations", "0039_freepayment"), |
|||
("cotisations", "0040_auto_20191002_2335"), |
|||
("cotisations", "0041_auto_20191103_2131"), |
|||
("cotisations", "0042_auto_20191120_0159"), |
|||
("cotisations", "0043_separation_membership_connection_p1"), |
|||
("cotisations", "0044_separation_membership_connection_p2"), |
|||
("cotisations", "0045_separation_membership_connection_p3"), |
|||
("cotisations", "0046_article_need_membership"), |
|||
("cotisations", "0047_article_need_membership_init"), |
|||
("cotisations", "0048_auto_20201017_0018"), |
|||
("cotisations", "0049_auto_20201102_2305"), |
|||
("cotisations", "0050_auto_20201102_2342"), |
|||
("cotisations", "0051_auto_20201228_1636"), |
|||
("machines", "0001_initial"), |
|||
("machines", "0002_auto_20160703_1444"), |
|||
("machines", "0003_auto_20160703_1450"), |
|||
("machines", "0004_auto_20160703_1451"), |
|||
("machines", "0005_auto_20160703_1523"), |
|||
("machines", "0006_auto_20160703_1813"), |
|||
("machines", "0007_auto_20160703_1816"), |
|||
("machines", "0008_remove_interface_ipv6"), |
|||
("machines", "0009_auto_20160703_2358"), |
|||
("machines", "0010_auto_20160704_0104"), |
|||
("machines", "0011_auto_20160704_0105"), |
|||
("machines", "0012_auto_20160704_0118"), |
|||
("machines", "0013_auto_20160705_1014"), |
|||
("machines", "0014_auto_20160706_1220"), |
|||
("machines", "0015_auto_20160707_0105"), |
|||
("machines", "0016_auto_20160708_1633"), |
|||
("machines", "0017_auto_20160708_1645"), |
|||
("machines", "0018_auto_20160708_1813"), |
|||
("machines", "0019_auto_20160718_1141"), |
|||
("machines", "0020_auto_20160718_1849"), |
|||
("machines", "0021_auto_20161006_1943"), |
|||
("machines", "0022_auto_20161011_1829"), |
|||
("machines", "0023_iplist_ip_type"), |
|||
("machines", "0024_machinetype_need_infra"), |
|||
("machines", "0025_auto_20161023_0038"), |
|||
("machines", "0026_auto_20161026_1348"), |
|||
("machines", "0027_alias"), |
|||
("machines", "0028_iptype_domaine_ip"), |
|||
("machines", "0029_iptype_domaine_range"), |
|||
("machines", "0030_auto_20161118_1730"), |
|||
("machines", "0031_auto_20161119_1709"), |
|||
("machines", "0032_auto_20161119_1850"), |
|||
("machines", "0033_extension_need_infra"), |
|||
("machines", "0034_iplist_need_infra"), |
|||
("machines", "0035_auto_20161224_1201"), |
|||
("machines", "0036_auto_20161224_1204"), |
|||
("machines", "0037_domain_cname"), |
|||
("machines", "0038_auto_20161224_1721"), |
|||
("machines", "0039_auto_20161224_1732"), |
|||
("machines", "0040_remove_interface_dns"), |
|||
("machines", "0041_remove_ns_interface"), |
|||
("machines", "0042_ns_ns"), |
|||
("machines", "0043_auto_20170721_0350"), |
|||
("machines", "0044_auto_20170808_0233"), |
|||
("machines", "0045_auto_20170808_0348"), |
|||
("machines", "0046_auto_20170808_1423"), |
|||
("machines", "0047_auto_20170809_0606"), |
|||
("machines", "0048_auto_20170823_2315"), |
|||
("machines", "0049_vlan"), |
|||
("machines", "0050_auto_20170826_0022"), |
|||
("machines", "0051_iptype_vlan"), |
|||
("machines", "0052_auto_20170828_2322"), |
|||
("machines", "0053_text"), |
|||
("machines", "0054_text_zone"), |
|||
("machines", "0055_nas"), |
|||
("machines", "0056_nas_port_access_mode"), |
|||
("machines", "0057_nas_autocapture_mac"), |
|||
("machines", "0058_auto_20171002_0350"), |
|||
("machines", "0059_iptype_prefix_v6"), |
|||
("machines", "0060_iptype_ouverture_ports"), |
|||
("machines", "0061_auto_20171015_2033"), |
|||
("machines", "0062_extension_origin_v6"), |
|||
("machines", "0063_auto_20171020_0040"), |
|||
("machines", "0064_auto_20171115_0253"), |
|||
("machines", "0065_auto_20171115_1514"), |
|||
("machines", "0066_srv"), |
|||
("machines", "0067_auto_20171116_0152"), |
|||
("machines", "0068_auto_20171116_0252"), |
|||
("machines", "0069_auto_20171116_0822"), |
|||
("machines", "0070_auto_20171231_1947"), |
|||
("machines", "0071_auto_20171231_2100"), |
|||
("machines", "0072_auto_20180108_1822"), |
|||
("machines", "0073_auto_20180128_2203"), |
|||
("machines", "0074_auto_20180129_0352"), |
|||
("machines", "0075_auto_20180130_0052"), |
|||
("machines", "0076_auto_20180130_1623"), |
|||
("machines", "0077_auto_20180409_2243"), |
|||
("machines", "0078_auto_20180415_1252"), |
|||
("machines", "0079_auto_20180416_0107"), |
|||
("machines", "0080_auto_20180502_2334"), |
|||
("machines", "0081_auto_20180521_1413"), |
|||
("machines", "0082_auto_20180525_2209"), |
|||
("machines", "0083_remove_duplicate_rights"), |
|||
("machines", "0084_dname"), |
|||
("machines", "0085_sshfingerprint"), |
|||
("machines", "0086_role"), |
|||
("machines", "0087_dnssec"), |
|||
("machines", "0088_iptype_prefix_v6_length"), |
|||
("machines", "0089_auto_20180805_1148"), |
|||
("machines", "0090_auto_20180805_1459"), |
|||
("machines", "0091_auto_20180806_2310"), |
|||
("machines", "0092_auto_20180807_0926"), |
|||
("machines", "0093_auto_20180807_1115"), |
|||
("machines", "0094_auto_20180815_1918"), |
|||
("machines", "0095_auto_20180919_2225"), |
|||
("machines", "0096_auto_20181013_1417"), |
|||
("machines", "0097_extension_dnssec"), |
|||
("machines", "0098_auto_20190102_1745"), |
|||
("machines", "0099_role_recursive_dns"), |
|||
("machines", "0100_auto_20190102_1753"), |
|||
("machines", "0101_auto_20190108_1623"), |
|||
("machines", "0102_auto_20190303_1611"), |
|||
("machines", "0103_auto_20191002_2222"), |
|||
("machines", "0104_auto_20191002_2231"), |
|||
("machines", "0105_dname_ttl"), |
|||
("machines", "0106_auto_20191120_0159"), |
|||
("machines", "0107_fix_lowercase_domain"), |
|||
("machines", "0108_ipv6list_active"), |
|||
("preferences", "0001_initial"), |
|||
("preferences", "0002_auto_20170625_1923"), |
|||
("preferences", "0003_optionaluser_solde_negatif"), |
|||
("preferences", "0004_assooption_services"), |
|||
("preferences", "0005_auto_20170824_0139"), |
|||
("preferences", "0006_auto_20170824_0143"), |
|||
("preferences", "0007_auto_20170824_2056"), |
|||
("preferences", "0008_auto_20170824_2122"), |
|||
("preferences", "0009_assooption_utilisateur_asso"), |
|||
("preferences", "0010_auto_20170825_0459"), |
|||
("preferences", "0011_auto_20170825_2307"), |
|||
("preferences", "0012_generaloption_req_expire_hrs"), |
|||
("preferences", "0013_generaloption_site_name"), |
|||
("preferences", "0014_generaloption_email_from"), |
|||
("preferences", "0015_optionaltopologie_radius_general_policy"), |
|||
("preferences", "0016_auto_20170902_1520"), |
|||
("preferences", "0017_mailmessageoption"), |
|||
("preferences", "0018_optionaltopologie_mac_autocapture"), |
|||
("preferences", "0019_remove_optionaltopologie_mac_autocapture"), |
|||
("preferences", "0020_optionalmachine_ipv6"), |
|||
("preferences", "0021_auto_20171015_1741"), |
|||
("preferences", "0022_auto_20171015_1758"), |
|||
("preferences", "0023_auto_20171015_2033"), |
|||
("preferences", "0024_optionaluser_all_can_create"), |
|||
("preferences", "0025_auto_20171231_2142"), |
|||
("preferences", "0025_generaloption_general_message"), |
|||
("preferences", "0026_auto_20171216_0401"), |
|||
("preferences", "0027_merge_20180106_2019"), |
|||
("preferences", "0028_assooption_description"), |
|||
("preferences", "0028_auto_20180111_1129"), |
|||
("preferences", "0028_auto_20180128_2203"), |
|||
("preferences", "0029_auto_20180111_1134"), |
|||
("preferences", "0029_auto_20180318_0213"), |
|||
("preferences", "0029_auto_20180318_1005"), |
|||
("preferences", "0030_auto_20180111_2346"), |
|||
("preferences", "0030_merge_20180320_1419"), |
|||
("preferences", "0031_auto_20180323_0218"), |
|||
("preferences", "0031_optionaluser_self_adhesion"), |
|||
("preferences", "0032_optionaluser_min_online_payment"), |
|||
("preferences", "0032_optionaluser_shell_default"), |
|||
("preferences", "0033_accueiloption"), |
|||
("preferences", "0033_generaloption_gtu_sum_up"), |
|||
("preferences", "0034_auto_20180114_2025"), |
|||
("preferences", "0034_auto_20180416_1120"), |
|||
("preferences", "0035_auto_20180114_2132"), |
|||
("preferences", "0035_optionaluser_allow_self_subscription"), |
|||
("preferences", "0036_auto_20180114_2141"), |
|||
("preferences", "0037_auto_20180114_2156"), |
|||
("preferences", "0038_auto_20180114_2209"), |
|||
("preferences", "0039_auto_20180115_0003"), |
|||
("preferences", "0040_auto_20180129_1745"), |
|||
("preferences", "0041_merge_20180130_0052"), |
|||
("preferences", "0042_auto_20180222_1743"), |
|||
("preferences", "0043_optionalmachine_create_machine"), |
|||
("preferences", "0044_remove_payment_pass"), |
|||
("preferences", "0045_remove_unused_payment_fields"), |
|||
("preferences", "0046_optionaluser_mail_extension"), |
|||
("preferences", "0047_mailcontact"), |
|||
("preferences", "0048_auto_20180811_1515"), |
|||
("preferences", "0049_optionaluser_self_change_shell"), |
|||
("preferences", "0050_auto_20180818_1329"), |
|||
("preferences", "0051_auto_20180919_2225"), |
|||
("preferences", "0052_optionaluser_delete_notyetactive"), |
|||
("preferences", "0053_optionaluser_self_change_room"), |
|||
("preferences", "0055_generaloption_main_site_url"), |
|||
("preferences", "0056_1_radiusoption"), |
|||
("preferences", "0056_2_radiusoption"), |
|||
("preferences", "0056_3_radiusoption"), |
|||
("preferences", "0056_4_radiusoption"), |
|||
("preferences", "0057_optionaluser_all_users_active"), |
|||
("preferences", "0058_auto_20190108_1650"), |
|||
("preferences", "0059_auto_20190120_1739"), |
|||
("preferences", "0060_auto_20190712_1821"), |
|||
("preferences", "0061_optionaluser_allow_archived_connexion"), |
|||
("preferences", "0062_auto_20190910_1909"), |
|||
("preferences", "0063_mandate"), |
|||
("preferences", "0064_auto_20191008_1335"), |
|||
("preferences", "0065_auto_20191010_1227"), |
|||
("preferences", "0066_optionalmachine_default_dns_ttl"), |
|||
("preferences", "0067_auto_20191120_0159"), |
|||
("preferences", "0068_optionaluser_allow_set_password_during_user_creation"), |
|||
("preferences", "0069_optionaluser_disable_emailnotyetconfirmed"), |
|||
("preferences", "0070_auto_20200419_0225"), |
|||
("preferences", "0071_optionaluser_self_change_pseudo"), |
|||
("topologie", "0001_initial"), |
|||
("topologie", "0002_auto_20160703_1118"), |
|||
("topologie", "0003_room"), |
|||
("topologie", "0004_auto_20160703_1122"), |
|||
("topologie", "0005_auto_20160703_1123"), |
|||
("topologie", "0006_auto_20160703_1129"), |
|||
("topologie", "0007_auto_20160703_1148"), |
|||
("topologie", "0008_port_room"), |
|||
("topologie", "0009_auto_20160703_1200"), |
|||
("topologie", "0010_auto_20160704_2148"), |
|||
("topologie", "0011_auto_20160704_2153"), |
|||
("topologie", "0012_port_machine_interface"), |
|||
("topologie", "0013_port_related"), |
|||
("topologie", "0014_auto_20160706_1238"), |
|||
("topologie", "0015_auto_20160706_1452"), |
|||
("topologie", "0016_auto_20160706_1531"), |
|||
("topologie", "0017_auto_20160718_1141"), |
|||
("topologie", "0018_room_details"), |
|||
("topologie", "0019_auto_20161026_1348"), |
|||
("topologie", "0020_auto_20161119_0033"), |
|||
("topologie", "0021_port_radius"), |
|||
("topologie", "0022_auto_20161211_1622"), |
|||
("topologie", "0023_auto_20170817_1654"), |
|||
("topologie", "0023_auto_20170826_1530"), |
|||
("topologie", "0024_auto_20170818_1021"), |
|||
("topologie", "0024_auto_20170826_1800"), |
|||
("topologie", "0025_merge_20170902_1242"), |
|||
("topologie", "0026_auto_20170902_1245"), |
|||
("topologie", "0027_auto_20170905_1442"), |
|||
("topologie", "0028_auto_20170913_1503"), |
|||
("topologie", "0029_auto_20171002_0334"), |
|||
("topologie", "0030_auto_20171004_0235"), |
|||
("topologie", "0031_auto_20171015_2033"), |
|||
("topologie", "0032_auto_20171026_0338"), |
|||
("topologie", "0033_auto_20171231_1743"), |
|||
("topologie", "0034_borne"), |
|||
("topologie", "0035_auto_20180324_0023"), |
|||
("topologie", "0036_transferborne"), |
|||
("topologie", "0037_auto_20180325_0127"), |
|||
("topologie", "0038_transfersw"), |
|||
("topologie", "0039_port_new_switch"), |
|||
("topologie", "0040_transferports"), |
|||
("topologie", "0041_transferportsw"), |
|||
("topologie", "0042_transferswitch"), |
|||
("topologie", "0043_renamenewswitch"), |
|||
("topologie", "0044_auto_20180326_0002"), |
|||
("topologie", "0045_auto_20180326_0123"), |
|||
("topologie", "0046_auto_20180326_0129"), |
|||
("topologie", "0047_ap_machine"), |
|||
("topologie", "0048_ap_machine"), |
|||
("topologie", "0049_switchs_machine"), |
|||
("topologie", "0050_port_new_switch"), |
|||
("topologie", "0051_switchs_machine"), |
|||
("topologie", "0052_transferports"), |
|||
("topologie", "0053_finalsw"), |
|||
("topologie", "0054_auto_20180326_1742"), |
|||
("topologie", "0055_auto_20180329_0431"), |
|||
("topologie", "0056_building_switchbay"), |
|||
("topologie", "0057_auto_20180408_0316"), |
|||
("topologie", "0058_remove_switch_location"), |
|||
("topologie", "0059_auto_20180415_2249"), |
|||
("topologie", "0060_server"), |
|||
("topologie", "0061_portprofile"), |
|||
("topologie", "0062_auto_20180815_1918"), |
|||
("topologie", "0063_auto_20180919_2225"), |
|||
("topologie", "0064_switch_automatic_provision"), |
|||
("topologie", "0065_auto_20180927_1836"), |
|||
("topologie", "0066_modelswitch_commercial_name"), |
|||
("topologie", "0067_auto_20181230_1819"), |
|||
("topologie", "0068_auto_20190102_1758"), |
|||
("topologie", "0069_auto_20190108_1439"), |
|||
("topologie", "0070_auto_20190218_1743"), |
|||
("topologie", "0071_auto_20190218_1936"), |
|||
("topologie", "0072_auto_20190720_2318"), |
|||
("topologie", "0073_auto_20191120_0159"), |
|||
("topologie", "0074_auto_20200419_1640"), |
|||
] |
|||
|
|||
operations = [ |
|||
migrations.AddField( |
|||
model_name='balancepayment', |
|||
name='payment', |
|||
field=models.OneToOneField(default=None, editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='payment_method_balance', to='cotisations.Paiement'), |
|||
preserve_default=False, |
|||
), |
|||
migrations.AddField( |
|||
model_name='chequepayment', |
|||
name='payment', |
|||
field=models.OneToOneField(default=None, editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='payment_method_cheque', to='cotisations.Paiement'), |
|||
preserve_default=False, |
|||
), |
|||
migrations.AddField( |
|||
model_name='comnpaypayment', |
|||
name='payment', |
|||
field=models.OneToOneField(default=None, editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='payment_method_comnpay', to='cotisations.Paiement'), |
|||
preserve_default=False, |
|||
), |
|||
migrations.AddField( |
|||
model_name='costestimate', |
|||
name='final_invoice', |
|||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='origin_cost_estimate', to='cotisations.CustomInvoice'), |
|||
), |
|||
migrations.AddField( |
|||
model_name='cotisation', |
|||
name='vente', |
|||
field=models.OneToOneField(null=True, on_delete=django.db.models.deletion.CASCADE, to='cotisations.Vente', verbose_name='purchase'), |
|||
), |
|||
migrations.AddField( |
|||
model_name='facture', |
|||
name='banque', |
|||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='cotisations.Banque'), |
|||
), |
|||
migrations.AddField( |
|||
model_name='facture', |
|||
name='paiement', |
|||
field=models.ForeignKey(default=None, on_delete=django.db.models.deletion.PROTECT, to='cotisations.Paiement'), |
|||
preserve_default=False, |
|||
), |
|||
migrations.AddField( |
|||
model_name='facture', |
|||
name='user', |
|||
field=models.ForeignKey(default=None, on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL), |
|||
preserve_default=False, |
|||
), |
|||
migrations.AddField( |
|||
model_name='freepayment', |
|||
name='payment', |
|||
field=models.OneToOneField(default=None, editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='payment_method_free', to='cotisations.Paiement'), |
|||
preserve_default=False, |
|||
), |
|||
migrations.AddField( |
|||
model_name='notepayment', |
|||
name='payment', |
|||
field=models.OneToOneField(default=None, editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='payment_method_note', to='cotisations.Paiement'), |
|||
preserve_default=False, |
|||
), |
|||
migrations.AddField( |
|||
model_name='vente', |
|||
name='facture', |
|||
field=models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, to='cotisations.BaseInvoice', verbose_name='invoice'), |
|||
preserve_default=False, |
|||
), |
|||
] |
|||
@ -0,0 +1,19 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Generated by Django 1.11.29 on 2021-01-24 10:05 |
|||
from __future__ import unicode_literals |
|||
|
|||
from django.db import migrations |
|||
|
|||
|
|||
class Migration(migrations.Migration): |
|||
|
|||
dependencies = [ |
|||
('cotisations', '0002_foreign_keys'), |
|||
] |
|||
|
|||
operations = [ |
|||
migrations.AlterModelOptions( |
|||
name='baseinvoice', |
|||
options={'permissions': (('view_baseinvoice', 'Can view an base invoice object'),)}, |
|||
), |
|||
] |
|||
@ -0,0 +1,117 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Generated by Django 1.11.29 on 2020-09-20 17:19 |
|||
from __future__ import unicode_literals |
|||
|
|||
import django.core.validators |
|||
from django.db import migrations, models |
|||
import django.utils.timezone |
|||
|
|||
|
|||
class Migration(migrations.Migration): |
|||
|
|||
dependencies = [ |
|||
('cotisations', '0042_auto_20191120_0159'), |
|||
] |
|||
|
|||
operations = [ |
|||
# migrations.RemoveField( |
|||
# model_name='article', |
|||
# name='duration', |
|||
# ), |
|||
# migrations.RemoveField( |
|||
# model_name='article', |
|||
# name='duration_days', |
|||
# ), |
|||
# migrations.RemoveField( |
|||
# model_name='article', |
|||
# name='type_cotisation', |
|||
# ), |
|||
# migrations.RemoveField( |
|||
# model_name='cotisation', |
|||
# name='date_end', |
|||
# ), |
|||
# migrations.RemoveField( |
|||
# model_name='cotisation', |
|||
# name='date_start', |
|||
# ), |
|||
# migrations.RemoveField( |
|||
# model_name='cotisation', |
|||
# name='type_cotisation', |
|||
# ), |
|||
# migrations.RemoveField( |
|||
# model_name='vente', |
|||
# name='duration', |
|||
# ), |
|||
# migrations.RemoveField( |
|||
# model_name='vente', |
|||
# name='duration_days', |
|||
# ), |
|||
# migrations.RemoveField( |
|||
# model_name='vente', |
|||
# name='type_cotisation', |
|||
# ), |
|||
migrations.AddField( |
|||
model_name='article', |
|||
name='duration_connection', |
|||
field=models.PositiveIntegerField(blank=True, null=True, validators=[django.core.validators.MinValueValidator(0)], verbose_name='duration of the connection (in months)'), |
|||
), |
|||
migrations.AddField( |
|||
model_name='article', |
|||
name='duration_days_connection', |
|||
field=models.PositiveIntegerField(blank=True, null=True, validators=[django.core.validators.MinValueValidator(0)], verbose_name='duration of the connection (in days, will be added to duration in months)'), |
|||
), |
|||
migrations.AddField( |
|||
model_name='article', |
|||
name='duration_days_membership', |
|||
field=models.PositiveIntegerField(blank=True, null=True, validators=[django.core.validators.MinValueValidator(0)], verbose_name='duration of the membership (in days, will be added to duration in months)'), |
|||
), |
|||
migrations.AddField( |
|||
model_name='article', |
|||
name='duration_membership', |
|||
field=models.PositiveIntegerField(blank=True, null=True, validators=[django.core.validators.MinValueValidator(0)], verbose_name='duration of the membership (in months)'), |
|||
), |
|||
migrations.AddField( |
|||
model_name='cotisation', |
|||
name='date_end_con', |
|||
field=models.DateTimeField(default=django.utils.timezone.now, verbose_name='end date for the connection'), |
|||
preserve_default=False, |
|||
), |
|||
migrations.AddField( |
|||
model_name='cotisation', |
|||
name='date_end_memb', |
|||
field=models.DateTimeField(default=django.utils.timezone.now, verbose_name='end date for the membership'), |
|||
preserve_default=False, |
|||
), |
|||
migrations.AddField( |
|||
model_name='cotisation', |
|||
name='date_start_con', |
|||
field=models.DateTimeField(default=django.utils.timezone.now, verbose_name='start date for the connection'), |
|||
preserve_default=False, |
|||
), |
|||
migrations.AddField( |
|||
model_name='cotisation', |
|||
name='date_start_memb', |
|||
field=models.DateTimeField(default=django.utils.timezone.now, verbose_name='start date for the membership'), |
|||
preserve_default=False, |
|||
), |
|||
migrations.AddField( |
|||
model_name='vente', |
|||
name='duration_connection', |
|||
field=models.PositiveIntegerField(blank=True, null=True, verbose_name='duration of the connection (in months)'), |
|||
), |
|||
migrations.AddField( |
|||
model_name='vente', |
|||
name='duration_days_connection', |
|||
field=models.PositiveIntegerField(blank=True, null=True, validators=[django.core.validators.MinValueValidator(0)], verbose_name='duration of the connection (in days, will be added to duration in months)'), |
|||
), |
|||
migrations.AddField( |
|||
model_name='vente', |
|||
name='duration_days_membership', |
|||
field=models.PositiveIntegerField(blank=True, null=True, validators=[django.core.validators.MinValueValidator(0)], verbose_name='duration of the membership (in days, will be added to duration in months)'), |
|||
), |
|||
migrations.AddField( |
|||
model_name='vente', |
|||
name='duration_membership', |
|||
field=models.PositiveIntegerField(blank=True, null=True, verbose_name='duration of the membership (in months)'), |
|||
), |
|||
] |
|||
@ -0,0 +1,140 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Generated by Django 1.11.29 on 2020-09-20 17:19 |
|||
from __future__ import unicode_literals |
|||
|
|||
import django.core.validators |
|||
from django.db import migrations, models |
|||
import django.utils.timezone |
|||
|
|||
|
|||
class Migration(migrations.Migration): |
|||
|
|||
dependencies = [ |
|||
('cotisations', '0043_separation_membership_connection_p1'), |
|||
] |
|||
|
|||
def split_dates(apps, schema_editor): |
|||
db_alias = schema_editor.connection.alias |
|||
cotisation = apps.get_model("cotisations", "Cotisation") |
|||
cotisations = cotisation.objects.using(db_alias).all() |
|||
for cotis in cotisations: |
|||
cotis.date_start_con = cotis.date_start |
|||
cotis.date_start_memb = cotis.date_start |
|||
cotis.date_end_con = cotis.date_end |
|||
cotis.date_end_memb = cotis.date_end |
|||
if cotis.type_cotisation == 'Connexion': |
|||
cotis.date_end_memb = cotis.date_start |
|||
if cotis.type_cotisation == 'Adhesion': |
|||
cotis.date_end_con = cotis.date_start |
|||
cotis.save() |
|||
|
|||
|
|||
|
|||
def split_duration_articles_and_ventes(apps, schema_editor): |
|||
def split_duration(e): |
|||
e.duration_membership = e.duration |
|||
e.duration_connection = e.duration |
|||
e.duration_days_membership = e.duration_days |
|||
e.duration_days_connection = e.duration_days |
|||
if e.type_cotisation == 'Connexion': |
|||
e.duration_membership = 0 |
|||
e.duration_days_membership = 0 |
|||
if e.type_cotisation == 'Adhesion': |
|||
e.duration_connection = 0 |
|||
e.duration_days_connection = 0 |
|||
e.save() |
|||
db_alias = schema_editor.connection.alias |
|||
article = apps.get_model("cotisations", "Article") |
|||
vente = apps.get_model("cotisations", "Vente") |
|||
for a in article.objects.using(db_alias).all(): |
|||
split_duration(a) |
|||
for v in vente.objects.using(db_alias).all(): |
|||
split_duration(v) |
|||
|
|||
def unsplit_dates(apps, schema_editor): |
|||
db_alias = schema_editor.connection.alias |
|||
cotisation = apps.get_model("cotisations", "Cotisation") |
|||
cotisations = cotisation.objects.using(db_alias).all() |
|||
for cotis in cotisations: |
|||
connection = cotis.date_start_con != cotis.date_end_con |
|||
adhesion = cotis.date_start_memb != cotis.date_end_memb |
|||
cotis.date_start = cotis.date_start_con |
|||
cotis.date_end = max(cotis.date_end_con, cotis.date_end_memb) |
|||
if connection: |
|||
cotis.type_cotisation = 'Connexion' |
|||
if adhesion: |
|||
cotis.type_cotisation = 'Adhesion' |
|||
if connection and adhesion: |
|||
cotis.type_cotisation = 'All' |
|||
if not (connection or adhesion): |
|||
cotis.type_cotisation = None |
|||
cotis.save() |
|||
|
|||
|
|||
|
|||
def unsplit_duration_articles_and_ventes(apps, schema_editor): |
|||
def unsplit_duration(e): |
|||
e.duration = max(e.duration_membership, e.duration_connection) |
|||
e.duration_days = max(e.duration_days_membership, e.duration_days_connection) |
|||
connection = not (((e.duration_connection == 0) or (e.duration_connection__isnull)) and \ |
|||
((e.duration_days_connection == 0) or (e.duration_days_connection__isnull))) |
|||
membership = not (((e.duration_membership == 0) or (e.duration_membership__isnull)) and \ |
|||
((e.duration_days_membership == 0) or (e.duration_days_membership__isnull))) |
|||
if connection: |
|||
e.type_cotisation = 'Connection' |
|||
if membership: |
|||
e.type_cotisation = 'Adhesion' |
|||
if connection and membership: |
|||
e.type_cotisation = 'All' |
|||
if not (connection or membership): |
|||
e.type_cotisation = None |
|||
e.save() |
|||
db_alias = schema_editor.connection.alias |
|||
article = apps.get_model("cotisations", "Article") |
|||
vente = apps.get_model("cotisations", "Vente") |
|||
for a in article.objects.using(db_alias).all(): |
|||
unsplit_duration(a) |
|||
for v in vente.objects.using(db_alias).all(): |
|||
unsplit_duration(v) |
|||
|
|||
|
|||
operations = [ |
|||
migrations.RunPython(split_dates, unsplit_dates), |
|||
migrations.RunPython(split_duration_articles_and_ventes, unsplit_duration_articles_and_ventes), |
|||
# migrations.RemoveField( |
|||
# model_name='article', |
|||
# name='duration', |
|||
# ), |
|||
# migrations.RemoveField( |
|||
# model_name='article', |
|||
# name='duration_days', |
|||
# ), |
|||
# migrations.RemoveField( |
|||
# model_name='article', |
|||
# name='type_cotisation', |
|||
# ), |
|||
# migrations.RemoveField( |
|||
# model_name='cotisation', |
|||
# name='date_end', |
|||
# ), |
|||
# migrations.RemoveField( |
|||
# model_name='cotisation', |
|||
# name='date_start', |
|||
# ), |
|||
# migrations.RemoveField( |
|||
# model_name='cotisation', |
|||
# name='type_cotisation', |
|||
# ), |
|||
# migrations.RemoveField( |
|||
# model_name='vente', |
|||
# name='duration', |
|||
# ), |
|||
# migrations.RemoveField( |
|||
# model_name='vente', |
|||
# name='duration_days', |
|||
# ), |
|||
# migrations.RemoveField( |
|||
# model_name='vente', |
|||
# name='type_cotisation', |
|||
# ), |
|||
] |
|||
@ -0,0 +1,53 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Generated by Django 1.11.29 on 2020-09-20 17:19 |
|||
from __future__ import unicode_literals |
|||
|
|||
import django.core.validators |
|||
from django.db import migrations, models |
|||
import django.utils.timezone |
|||
|
|||
|
|||
class Migration(migrations.Migration): |
|||
|
|||
dependencies = [ |
|||
('cotisations', '0044_separation_membership_connection_p2'), |
|||
] |
|||
|
|||
operations = [ |
|||
migrations.RemoveField( |
|||
model_name='article', |
|||
name='duration', |
|||
), |
|||
migrations.RemoveField( |
|||
model_name='article', |
|||
name='duration_days', |
|||
), |
|||
migrations.RemoveField( |
|||
model_name='article', |
|||
name='type_cotisation', |
|||
), |
|||
migrations.RemoveField( |
|||
model_name='cotisation', |
|||
name='date_end', |
|||
), |
|||
migrations.RemoveField( |
|||
model_name='cotisation', |
|||
name='date_start', |
|||
), |
|||
migrations.RemoveField( |
|||
model_name='cotisation', |
|||
name='type_cotisation', |
|||
), |
|||
migrations.RemoveField( |
|||
model_name='vente', |
|||
name='duration', |
|||
), |
|||
migrations.RemoveField( |
|||
model_name='vente', |
|||
name='duration_days', |
|||
), |
|||
migrations.RemoveField( |
|||
model_name='vente', |
|||
name='type_cotisation', |
|||
), |
|||
] |
|||
@ -0,0 +1,20 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Generated by Django 1.11.29 on 2020-09-25 16:45 |
|||
from __future__ import unicode_literals |
|||
|
|||
from django.db import migrations, models |
|||
|
|||
|
|||
class Migration(migrations.Migration): |
|||
|
|||
dependencies = [ |
|||
('cotisations', '0045_separation_membership_connection_p3'), |
|||
] |
|||
|
|||
operations = [ |
|||
migrations.AddField( |
|||
model_name='article', |
|||
name='need_membership', |
|||
field=models.BooleanField(default=True, verbose_name='can be purcharsed without membership'), |
|||
), |
|||
] |
|||
@ -0,0 +1,28 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Generated by Django 1.11.29 on 2020-09-25 16:45 |
|||
from __future__ import unicode_literals |
|||
|
|||
from django.db import migrations, models |
|||
|
|||
|
|||
class Migration(migrations.Migration): |
|||
|
|||
dependencies = [ |
|||
('cotisations', '0046_article_need_membership'), |
|||
] |
|||
|
|||
def init_need_membership(apps, schema_editor): |
|||
db_alias = schema_editor.connection.alias |
|||
article = apps.get_model("cotisations", "Article") |
|||
articles = article.objects.using(db_alias).all() |
|||
for art in articles: |
|||
v = False |
|||
v = v or bool(art.duration_membership) |
|||
v = v or bool(art.duration_days_membership) |
|||
v = v or not (bool(art.duration_connection) or bool(art.duration_days_connection)) |
|||
art.need_membership = v |
|||
art.save() |
|||
|
|||
operations = [ |
|||
migrations.RunPython(init_need_membership, lambda *args, **kargs: None), |
|||
] |
|||
@ -0,0 +1,26 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Generated by Django 1.11.29 on 2020-10-16 22:18 |
|||
from __future__ import unicode_literals |
|||
|
|||
import django.core.validators |
|||
from django.db import migrations, models |
|||
|
|||
|
|||
class Migration(migrations.Migration): |
|||
|
|||
dependencies = [ |
|||
('cotisations', '0047_article_need_membership_init'), |
|||
] |
|||
|
|||
|
|||
def set_value_to_zero(apps, schema_editor): |
|||
db_alias = schema_editor.connection.alias |
|||
Vente = apps.get_model("cotisations", "Vente") |
|||
Vente.objects.using(db_alias).filter(duration_connection__isnull=True).update(duration_connection=0) |
|||
Vente.objects.using(db_alias).filter(duration_days_connection__isnull=True).update(duration_days_connection=0) |
|||
Vente.objects.using(db_alias).filter(duration_membership__isnull=True).update(duration_membership=0) |
|||
Vente.objects.using(db_alias).filter(duration_days_membership__isnull=True).update(duration_days_membership=0) |
|||
|
|||
operations = [ |
|||
migrations.RunPython(set_value_to_zero), |
|||
] |
|||
@ -0,0 +1,41 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Generated by Django 1.11.29 on 2020-11-02 22:05 |
|||
from __future__ import unicode_literals |
|||
|
|||
import django.core.validators |
|||
from django.db import migrations, models |
|||
|
|||
|
|||
class Migration(migrations.Migration): |
|||
|
|||
dependencies = [ |
|||
('cotisations', '0048_auto_20201017_0018'), |
|||
] |
|||
|
|||
operations = [ |
|||
migrations.AlterField( |
|||
model_name='article', |
|||
name='need_membership', |
|||
field=models.BooleanField(default=True, verbose_name='need membership to be purchased'), |
|||
), |
|||
migrations.AlterField( |
|||
model_name='vente', |
|||
name='duration_connection', |
|||
field=models.PositiveIntegerField(default=0, verbose_name='duration of the connection (in months)'), |
|||
), |
|||
migrations.AlterField( |
|||
model_name='vente', |
|||
name='duration_days_connection', |
|||
field=models.PositiveIntegerField(default=0, validators=[django.core.validators.MinValueValidator(0)], verbose_name='duration of the connection (in days, will be added to duration in months)'), |
|||
), |
|||
migrations.AlterField( |
|||
model_name='vente', |
|||
name='duration_days_membership', |
|||
field=models.PositiveIntegerField(default=0, validators=[django.core.validators.MinValueValidator(0)], verbose_name='duration of the membership (in days, will be added to duration in months)'), |
|||
), |
|||
migrations.AlterField( |
|||
model_name='vente', |
|||
name='duration_membership', |
|||
field=models.PositiveIntegerField(default=0, verbose_name='duration of the membership (in months)'), |
|||
), |
|||
] |
|||
@ -0,0 +1,40 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Generated by Django 1.11.29 on 2020-11-02 22:42 |
|||
from __future__ import unicode_literals |
|||
|
|||
import django.core.validators |
|||
from django.db import migrations, models |
|||
|
|||
|
|||
class Migration(migrations.Migration): |
|||
|
|||
dependencies = [ |
|||
('cotisations', '0049_auto_20201102_2305'), |
|||
] |
|||
|
|||
operations = [ |
|||
migrations.AlterField( |
|||
model_name='article', |
|||
name='duration_connection', |
|||
field=models.PositiveIntegerField(default=0, validators=[django.core.validators.MinValueValidator(0)], verbose_name='duration of the connection (in months)'), |
|||
preserve_default=False, |
|||
), |
|||
migrations.AlterField( |
|||
model_name='article', |
|||
name='duration_days_connection', |
|||
field=models.PositiveIntegerField(default=0, validators=[django.core.validators.MinValueValidator(0)], verbose_name='duration of the connection (in days, will be added to duration in months)'), |
|||
preserve_default=False, |
|||
), |
|||
migrations.AlterField( |
|||
model_name='article', |
|||
name='duration_days_membership', |
|||
field=models.PositiveIntegerField(default=0, validators=[django.core.validators.MinValueValidator(0)], verbose_name='duration of the membership (in days, will be added to duration in months)'), |
|||
preserve_default=False, |
|||
), |
|||
migrations.AlterField( |
|||
model_name='article', |
|||
name='duration_membership', |
|||
field=models.PositiveIntegerField(default=0, validators=[django.core.validators.MinValueValidator(0)], verbose_name='duration of the membership (in months)'), |
|||
preserve_default=False, |
|||
), |
|||
] |
|||
@ -0,0 +1,59 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Generated by Django 1.11.29 on 2020-12-28 15:36 |
|||
from __future__ import unicode_literals |
|||
|
|||
from django.db import migrations, models |
|||
|
|||
|
|||
class Migration(migrations.Migration): |
|||
|
|||
dependencies = [ |
|||
("cotisations", "0050_auto_20201102_2342"), |
|||
] |
|||
|
|||
operations = [ |
|||
migrations.AlterField( |
|||
model_name="article", |
|||
name="duration_connection", |
|||
field=models.PositiveIntegerField( |
|||
verbose_name="duration of the connection (in months)" |
|||
), |
|||
), |
|||
migrations.AlterField( |
|||
model_name="article", |
|||
name="duration_days_connection", |
|||
field=models.PositiveIntegerField( |
|||
verbose_name="duration of the connection (in days, will be added to duration in months)" |
|||
), |
|||
), |
|||
migrations.AlterField( |
|||
model_name="article", |
|||
name="duration_days_membership", |
|||
field=models.PositiveIntegerField( |
|||
verbose_name="duration of the membership (in days, will be added to duration in months)" |
|||
), |
|||
), |
|||
migrations.AlterField( |
|||
model_name="article", |
|||
name="duration_membership", |
|||
field=models.PositiveIntegerField( |
|||
verbose_name="duration of the membership (in months)" |
|||
), |
|||
), |
|||
migrations.AlterField( |
|||
model_name="vente", |
|||
name="duration_days_connection", |
|||
field=models.PositiveIntegerField( |
|||
default=0, |
|||
verbose_name="duration of the connection (in days, will be added to duration in months)", |
|||
), |
|||
), |
|||
migrations.AlterField( |
|||
model_name="vente", |
|||
name="duration_days_membership", |
|||
field=models.PositiveIntegerField( |
|||
default=0, |
|||
verbose_name="duration of the membership (in days, will be added to duration in months)", |
|||
), |
|||
), |
|||
] |
|||
@ -0,0 +1,61 @@ |
|||
{% comment %} |
|||
Re2o est un logiciel d'administration développé initiallement au Rézo Metz. Il |
|||
se veut agnostique au réseau considéré, de manière à être installable en |
|||
quelques clics. |
|||
|
|||
Copyright © 2017 Gabriel Détraz |
|||
Copyright © 2017 Lara 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. |
|||
{% endcomment %} |
|||
|
|||
{% load acl %} |
|||
{% load i18n %} |
|||
{% load logs_extra %} |
|||
|
|||
|
|||
<div class="panel panel-default"> |
|||
<div class="panel-heading clearfix profil" data-parent="#accordion" data-toggle="collapse" |
|||
data-target="#subscriptions"> |
|||
<h3 class="panel-title pull-left"> |
|||
<i class="fa fa-eur"></i> |
|||
{% trans "Subscriptions" %} |
|||
</h3> |
|||
</div> |
|||
<div id="subscriptions" class="panel-collapse collapse"> |
|||
<div class="panel-body"> |
|||
{% can_create Facture %} |
|||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'cotisations:new-facture' users.id %}"> |
|||
<i class="fa fa-eur"></i> |
|||
{% trans "Add a subscription" %} |
|||
</a> |
|||
{% if user_solde %} |
|||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'cotisations:credit-solde' users.id %}"> |
|||
<i class="fa fa-eur"></i> |
|||
{% trans "Edit the balance" %} |
|||
</a> |
|||
{% endif%} |
|||
{% acl_end %} |
|||
</div> |
|||
<div class="panel-body"> |
|||
{% if facture_list %} |
|||
{% include 'cotisations/aff_cotisations.html' with facture_list=facture_list %} |
|||
{% else %} |
|||
<p>{% trans "No invoice" %}</p> |
|||
{% endif %} |
|||
</div> |
|||
</div> |
|||
</div> |
|||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue