mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-08-19 21:53:41 +00:00
Merge branch 'about_page' into 'master'
About page See merge request federez/re2o!87
This commit is contained in:
commit
be430c4651
11 changed files with 151 additions and 10 deletions
3
contributors.py
Normal file
3
contributors.py
Normal file
|
@ -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']
|
20
preferences/migrations/0028_assooption_description.py
Normal file
20
preferences/migrations/0028_assooption_description.py
Normal file
|
@ -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=''),
|
||||
),
|
||||
]
|
|
@ -561,6 +561,7 @@ class AssoOption(PreferencesModel):
|
|||
null=True,
|
||||
blank=True,
|
||||
)
|
||||
description = models.TextField(default="")
|
||||
|
||||
class Meta:
|
||||
permissions = (
|
||||
|
|
|
@ -185,6 +185,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<td>{{ assooptions.utilisateur_asso }}</td>
|
||||
<th>Moyen de paiement automatique</th>
|
||||
<td>{{ assooptions.payment }}</td>
|
||||
<th>Description de l'association</th>
|
||||
<td>{{ assooptions.description }}</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
|
0
re2o/management/__init__.py
Normal file
0
re2o/management/__init__.py
Normal file
0
re2o/management/commands/__init__.py
Normal file
0
re2o/management/commands/__init__.py
Normal file
41
re2o/management/commands/gen_contrib.py
Normal file
41
re2o/management/commands/gen_contrib.py
Normal file
|
@ -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))
|
62
re2o/templates/re2o/about.html
Normal file
62
re2o/templates/re2o/about.html
Normal file
|
@ -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 %}
|
||||
<h2>À propos de {{AssoName}}</h2>
|
||||
{{ description }}
|
||||
<h2>À propos de Re2o</h2>
|
||||
<p>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 <a href="https://gitlab.federez.net/federez/re2o/">gitlab de FedeRez</a>.
|
||||
</p>
|
||||
|
||||
<h3>Liste des contributeurs</h3>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
<ul>
|
||||
{% for i in contrib_1 %}
|
||||
<li> {{i}} </li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<ul>
|
||||
{% for i in contrib_2 %}
|
||||
<li> {{i}} </li>
|
||||
{%endfor%}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
{% endblock %}
|
||||
|
|
@ -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)),
|
||||
|
|
|
@ -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}
|
||||
)
|
||||
|
||||
|
|
|
@ -33,13 +33,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<head prefix="og: http://ogp.me/ns#">
|
||||
<meta property="og:title" content="Re2o" />
|
||||
<meta property="og:type" content="website" />
|
||||
{% if request.is_secure %}
|
||||
<meta property="og:url" content="https://{{request.get_host}}" />
|
||||
<meta property="og:image" content="https://{{request.get_host}}/static/logo/re2o.png"/>
|
||||
{%else%}
|
||||
<meta property="og:url" content="http://{{request.get_host}"/>
|
||||
<meta property="og:image" content="http://{{request.get_host}}/static/logo/re2o.png"/>
|
||||
{%endif%}
|
||||
<meta property="og:url" content="\\{{request.get_host}}" />
|
||||
<meta property="og:image" content="\\{{request.get_host}}/static/logo/re2o.png"/>
|
||||
<meta property="og:description" content="Site de gestion de réseau supporté par FedeRez." />
|
||||
{# Load CSS and JavaScript #}
|
||||
{% bootstrap_css %}
|
||||
|
@ -225,7 +220,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
<footer class="navbar">
|
||||
<div class="containerfluid text-center">
|
||||
<p>Re2o 2016-2018 - Gabriel Détraz, <a href="https://gitlab.rezometz.org/lhark">Goulven Kermarec</a>, Augustin Lemesle, Maël Kervella, Hugo Levy-Falk</p>
|
||||
<p> <a href="\\{{request.get_host}}/about/">Re2o 2016-2018</a> - Gabriel Détraz, <a href="https://gitlab.rezometz.org/lhark">Goulven Kermarec</a>, Augustin Lemesle, Maël Kervella, Hugo Levy-Falk</p>
|
||||
</div>
|
||||
</footer>
|
||||
{# Read the documentation for more information #}
|
||||
|
|
Loading…
Reference in a new issue