mirror of
https://github.com/nanoy42/coope
synced 2024-12-23 15:33:45 +00:00
Add about
This commit is contained in:
parent
3c413dd204
commit
d8cf587b47
4 changed files with 69 additions and 1 deletions
|
@ -23,6 +23,7 @@ from . import views
|
|||
urlpatterns = [
|
||||
path('', views.home, name="home"),
|
||||
path('home', views.homepage, name="homepage"),
|
||||
path('about', views.about, name="about"),
|
||||
path('coope-runner', views.coope_runner, name="coope-runner"),
|
||||
path('admin/doc/', include('django.contrib.admindocs.urls')),
|
||||
path('admin/', admin.site.urls),
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
import os
|
||||
|
||||
from django.shortcuts import redirect, render
|
||||
from django.urls import reverse
|
||||
from django.conf import settings
|
||||
|
||||
from preferences.models import GeneralPreferences
|
||||
from gestion.models import Keg
|
||||
|
@ -29,3 +32,22 @@ def coope_runner(request):
|
|||
Just an easter egg
|
||||
"""
|
||||
return render(request, "coope-runner.html")
|
||||
|
||||
|
||||
def about(request):
|
||||
"""
|
||||
A page about the project
|
||||
"""
|
||||
os.system("git -C " + settings.BASE_DIR + " shortlog -n $@ | grep \"):\" | sed 's|:||' >> " + settings.BASE_DIR + "/contributors.txt")
|
||||
contributors = []
|
||||
with open(settings.BASE_DIR + "/contributors.txt", "r") as f:
|
||||
for line in f:
|
||||
print(line)
|
||||
print(line.split(" ")[0])
|
||||
contributors.append((line.split(" ")[0], int(line.split(" ")[1].replace("(", "").replace(")", "").replace("\n", ""))))
|
||||
os.system("rm " + settings.BASE_DIR + "/contributors.txt")
|
||||
license = []
|
||||
with open(settings.BASE_DIR + "/LICENSE", "r") as f:
|
||||
for line in f:
|
||||
license.append(line)
|
||||
return render(request, "about.html", {"contributors": contributors, "license": license})
|
45
templates/about.html
Normal file
45
templates/about.html
Normal file
|
@ -0,0 +1,45 @@
|
|||
{% extends 'base.html' %}
|
||||
{% block entete %}À propos{% endblock %}
|
||||
{% block navbar %}
|
||||
<ul>
|
||||
<li><a href="#first">CoopeV3</a></li>
|
||||
<li><a href="#second">License</a></li>
|
||||
<li><a href="#third">Contributeurs</a></li>
|
||||
</ul>
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<section id="first" class="main">
|
||||
<header class="major">
|
||||
<h2>CoopeV3</h2>
|
||||
</header>
|
||||
<section>
|
||||
CoopeV3 est un logiciel codé avec le framework Django pour répondre aux besoins de l'association Coopé Technopôle Metz. Il implémente une gestion des
|
||||
adhérents, des cotisations, des transactions etc... Le code source de ce projet peut être trouvé sur github : <a href="https://github.com/nanoy42/coope" target="_blank">https://github.com/nanoy42/coope</a>.
|
||||
</section>
|
||||
</section>
|
||||
<section id="second" class="main">
|
||||
<header class="major">
|
||||
<h2>License</h2>
|
||||
</header>
|
||||
<section>
|
||||
Le code source est opensource et distribué sous la license MIT, dont voici le texte exact : <br>
|
||||
{% for l in license %}
|
||||
{{l}}<br>
|
||||
{% endfor %}
|
||||
(<a href="https://github.com/nanoy42/coope/blob/master/LICENSE" target="_blank">https://github.com/nanoy42/coope/blob/master/LICENSE</a>).
|
||||
</section>
|
||||
</section>
|
||||
<section id="third" class="main">
|
||||
<header class="major">
|
||||
<h2>Contributeurs</h2>
|
||||
</header>
|
||||
<section>
|
||||
Les contributeurs, triés par ordre décroissant de nombre de commits, sont:
|
||||
<ol>
|
||||
{% for contributor in contributors %}
|
||||
<li>{{contributor.0}} ({{contributor.1}} commits)</li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</section>
|
||||
</section>
|
||||
{% endblock %}
|
|
@ -42,6 +42,6 @@
|
|||
<li><a href="https://www.facebook.com/coopesmetz/" class="icon fa-facebook alt"><span class="label">Facebook</span></a></li>
|
||||
</ul>
|
||||
</section>
|
||||
<p class="copyright">coope.rez v3.6.2 (version dev) © 2018-2019 Yoann Pietri.</p>
|
||||
<p class="copyright">coope.rez v3.6.2 (version dev) © 2018-2019 Yoann Pietri. <a href="{% url 'about'%}">À propos du projet</a>. <a>Conditions Générales d'Utilisation</a>.</p>
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue