diff --git a/contributors.py b/contributors.py
new file mode 100644
index 00000000..358fd27b
--- /dev/null
+++ b/contributors.py
@@ -0,0 +1,3 @@
+#!/usr/bin/env python3
+
+contributeurs = ['Gabriel Detraz', 'chirac', 'Maël Kervella', 'LEVY-FALK Hugo', 'Dalahro', 'lhark', 'root', 'Chirac', 'Hugo LEVY-FALK', 'guimoz', 'Mael Kervella', 'klafyvel', 'matthieu', 'Yoann Pietri', 'Simon Brélivet', 'chibrac', 'David Sinquin', 'Pierre Cadart', 'moamoak', 'Éloi Alain', 'FERNET Laouen', 'Hugo Levy-Falk', 'Yoann PIETRI', 'B', 'Daniel STAN', 'Eloi Alain', 'Guimoz', 'Hugo Hervieux', 'Joanne Steiner', 'Laouen Fernet', 'Lemesle', 'MICHELET matthieu', 'Nymous', 'Thibault de BOUTRAY', 'Tipunchetrhum', 'Éloi ALAIN']
\ No newline at end of file
diff --git a/preferences/migrations/0028_assooption_description.py b/preferences/migrations/0028_assooption_description.py
new file mode 100644
index 00000000..f4f1ccc2
--- /dev/null
+++ b/preferences/migrations/0028_assooption_description.py
@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.10.7 on 2018-01-08 14:12
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('preferences', '0027_merge_20180106_2019'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='assooption',
+ name='description',
+ field=models.TextField(default=''),
+ ),
+ ]
diff --git a/preferences/models.py b/preferences/models.py
index a04fd351..efd32f88 100644
--- a/preferences/models.py
+++ b/preferences/models.py
@@ -561,6 +561,7 @@ class AssoOption(PreferencesModel):
null=True,
blank=True,
)
+ description = models.TextField(default="")
class Meta:
permissions = (
diff --git a/preferences/templates/preferences/display_preferences.html b/preferences/templates/preferences/display_preferences.html
index c4b0d76b..0f534417 100644
--- a/preferences/templates/preferences/display_preferences.html
+++ b/preferences/templates/preferences/display_preferences.html
@@ -185,6 +185,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{{ assooptions.utilisateur_asso }} |
Moyen de paiement automatique |
{{ assooptions.payment }} |
+ Description de l'association |
+ {{ assooptions.description }} |
diff --git a/re2o/management/__init__.py b/re2o/management/__init__.py
new file mode 100644
index 00000000..e69de29b
diff --git a/re2o/management/commands/__init__.py b/re2o/management/commands/__init__.py
new file mode 100644
index 00000000..e69de29b
diff --git a/re2o/management/commands/gen_contrib.py b/re2o/management/commands/gen_contrib.py
new file mode 100644
index 00000000..7d7f1b02
--- /dev/null
+++ b/re2o/management/commands/gen_contrib.py
@@ -0,0 +1,41 @@
+#!/usr/bin/env python3
+# Re2o est un logiciel d'administration développé initiallement au rezometz. Il
+# se veut agnostique au réseau considéré, de manière à être installable en
+# quelques clics.
+#
+# Copyright © 2018 Matthieu Michelet
+# Copyright © 2018 Gabriel Detraz
+#
+# 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.
+"""
+Write in a python file the list of all contributors sorted by number of commits.
+This list is extracted from the FedeRez gitlab repository.
+"""
+fous moi un truc adapté au dessus aussi
+
+
+from django.core.management.base import BaseCommand, CommandError
+import os
+
+class Command(BaseCommand):
+ help = 'Update contributors list'
+
+ def handle(self, *args, **options):
+ contributeurs = [item.split('\t')[1] for item in os.popen("git shortlog -s -n").read().split("\n") if '\t' in item]
+ self.stdout.write(self.style.SUCCESS("Exportation Sucessfull"))
+ contrib_file = open("contributors.py", "w")
+ contrib_file.write("#!/usr/bin/env python3\n")
+ contrib_file.write("\n")
+ contrib_file.write("contributeurs = " + str(contributeurs))
diff --git a/re2o/templates/re2o/about.html b/re2o/templates/re2o/about.html
new file mode 100644
index 00000000..daec6d91
--- /dev/null
+++ b/re2o/templates/re2o/about.html
@@ -0,0 +1,62 @@
+{% extends "re2o/sidebar.html" %}
+{% comment %}
+Re2o est un logiciel d'administration développé initiallement au rezometz. Il
+se veut agnostique au réseau considéré, de manière à être installable en
+quelques clics.
+
+Copyright © 2017 Gabriel Détraz
+Copyright © 2017 Goulven Kermarec
+Copyright © 2017 Augustin Lemesle
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along
+with this program; if not, write to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+{% endcomment %}
+
+{% load bootstrap3 %}
+
+{% block title %}Historique{% endblock %}
+
+{% block content %}
+À propos de {{AssoName}}
+ {{ description }}
+À propos de Re2o
+Re2o est un logiciel d'administration développé initialement au RézoMetz. Il
+se veut indépendant de l'architecture du réseau considéré, de manière à être installable en
+quelques clics.
+C'est un logiciel totallement libre disponible sur le gitlab de FedeRez.
+
+
+Liste des contributeurs
+
+
+
+
+ {% for i in contrib_1 %}
+ - {{i}}
+ {% endfor %}
+
+
+
+
+ {% for i in contrib_2 %}
+ - {{i}}
+ {%endfor%}
+
+
+
+
+
+
+{% endblock %}
+
diff --git a/re2o/urls.py b/re2o/urls.py
index 00e658a3..48a7ea98 100644
--- a/re2o/urls.py
+++ b/re2o/urls.py
@@ -40,10 +40,11 @@ from django.conf.urls import include, url
from django.contrib import admin
from django.contrib.auth import views as auth_views
-from .views import index
+from .views import index, about_page
urlpatterns = [
url(r'^$', index, name='index'),
+ url(r'^about/$', about_page, name='about'),
url('^logout/', auth_views.logout, {'next_page': '/'}),
url('^', include('django.contrib.auth.urls')),
url(r'^admin/', include(admin.site.urls)),
diff --git a/re2o/views.py b/re2o/views.py
index 641e587e..bfb2e6c5 100644
--- a/re2o/views.py
+++ b/re2o/views.py
@@ -35,7 +35,11 @@ from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from reversion.models import Version
from django.contrib import messages
from preferences.models import Service
-from preferences.models import OptionalUser, GeneralOption
+from preferences.models import OptionalUser, GeneralOption, AssoOption
+from django.conf import settings
+from contributors import contributeurs
+import os
+import time
import users, preferences, cotisations, topologie, machines
def form(ctx, template, request):
@@ -154,3 +158,15 @@ def history(request, application, object_name, object_id):
{'reversions': reversions, 'object': instance}
)
+
+def about_page(request):
+ option = AssoOption.objects.get()
+ n = len(contributeurs)
+ contrib_1 = contributeurs[:n//2]
+ contrib_2 = contributeurs[n//2:]
+ return render(
+ request,
+ "re2o/about.html",
+ {'description': option.description , 'AssoName' : option.name , 'contrib_1' : contrib_1 , 'contrib_2' : contrib_2}
+ )
+
diff --git a/templates/base.html b/templates/base.html
index 0a0c3db0..1b2adfcc 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -33,13 +33,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
- {% if request.is_secure %}
-
-
- {%else%}
-
-
- {%endif%}
+
+
{# Load CSS and JavaScript #}
{% bootstrap_css %}
@@ -225,7 +220,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{# Read the documentation for more information #}