Name urls of export views (cof members, mega)

This commit is contained in:
Aurélien Delobelle 2018-01-22 14:59:57 +01:00
parent f371606cdb
commit a813507ddd
3 changed files with 19 additions and 14 deletions

View file

@ -7,15 +7,15 @@
<h2>Liens utiles du COF</h2> <h2>Liens utiles du COF</h2>
<h3>COF</h3> <h3>COF</h3>
<ul> <ul>
<li><a href="{% url 'gestioncof.views.export_members' %}">Export des membres du COF</a></li> <li><a href="{% url 'cof.membres_export' %}">Export des membres du COF</a></li>
<li><a href="{% url 'gestioncof.views.liste_diffcof' %}">Diffusion COF</a></li> <li><a href="{% url 'gestioncof.views.liste_diffcof' %}">Diffusion COF</a></li>
</ul> </ul>
<h3>Mega</h3> <h3>Mega</h3>
<ul> <ul>
<li><a href="{% url 'gestioncof.views.export_mega_participants' %}">Export des non-orgas uniquement</a></li> <li><a href="{% url 'cof.mega_export_participants' %}">Export des non-orgas uniquement</a></li>
<li><a href="{% url 'gestioncof.views.export_mega_orgas' %}">Export des orgas uniquement</a></li> <li><a href="{% url 'cof.mega_export_orgas' %}">Export des orgas uniquement</a></li>
<li><a href="{% url 'gestioncof.views.export_mega' %}">Export de tout le monde</a></li> <li><a href="{% url 'cof.mega_export' %}">Export de tout le monde</a></li>
</ul> </ul>
<p>Note&nbsp;: pour ouvrir les fichiers .csv avec Excel, il faut <p>Note&nbsp;: pour ouvrir les fichiers .csv avec Excel, il faut

View file

@ -9,7 +9,7 @@ from .utils import create_user
class ExportMembersViewTests(ViewTestCaseMixin, TestCase): class ExportMembersViewTests(ViewTestCaseMixin, TestCase):
url_name = 'gestioncof.views.export_members' url_name = 'cof.membres_export'
url_expected = '/export/members' url_expected = '/export/members'
auth_user = 'staff' auth_user = 'staff'
@ -83,7 +83,7 @@ class MegaHelpers:
class ExportMegaViewTests(MegaHelpers, ViewTestCaseMixin, TestCase): class ExportMegaViewTests(MegaHelpers, ViewTestCaseMixin, TestCase):
url_name = 'gestioncof.views.export_mega' url_name = 'cof.mega_export'
url_expected = '/export/mega' url_expected = '/export/mega'
auth_user = 'staff' auth_user = 'staff'
@ -103,7 +103,7 @@ class ExportMegaViewTests(MegaHelpers, ViewTestCaseMixin, TestCase):
class ExportMegaOrgasViewTests(MegaHelpers, ViewTestCaseMixin, TestCase): class ExportMegaOrgasViewTests(MegaHelpers, ViewTestCaseMixin, TestCase):
url_name = 'gestioncof.views.export_mega_orgas' url_name = 'cof.mega_export_orgas'
url_expected = '/export/mega/orgas' url_expected = '/export/mega/orgas'
auth_user = 'staff' auth_user = 'staff'
@ -124,7 +124,7 @@ class ExportMegaOrgasViewTests(MegaHelpers, ViewTestCaseMixin, TestCase):
class ExportMegaParticipantsViewTests( class ExportMegaParticipantsViewTests(
MegaHelpers, ViewTestCaseMixin, TestCase): MegaHelpers, ViewTestCaseMixin, TestCase):
url_name = 'gestioncof.views.export_mega_participants' url_name = 'cof.mega_export_participants'
url_expected = '/export/mega/participants' url_expected = '/export/mega/participants'
auth_user = 'staff' auth_user = 'staff'
@ -141,7 +141,7 @@ class ExportMegaParticipantsViewTests(
class ExportMegaRemarksViewTests( class ExportMegaRemarksViewTests(
MegaHelpers, ViewTestCaseMixin, TestCase): MegaHelpers, ViewTestCaseMixin, TestCase):
url_name = 'gestioncof.views.export_mega_remarksonly' url_name = 'cof.mega_export_remarks'
url_expected = '/export/mega/avecremarques' url_expected = '/export/mega/avecremarques'
auth_user = 'staff' auth_user = 'staff'

View file

@ -6,12 +6,17 @@ from gestioncof import views, petits_cours_views
from gestioncof.decorators import buro_required from gestioncof.decorators import buro_required
export_patterns = [ export_patterns = [
url(r'^members$', views.export_members), url(r'^members$', views.export_members,
url(r'^mega/avecremarques$', views.export_mega_remarksonly), name='cof.membres_export'),
url(r'^mega/participants$', views.export_mega_participants), url(r'^mega/avecremarques$', views.export_mega_remarksonly,
url(r'^mega/orgas$', views.export_mega_orgas), name='cof.mega_export_remarks'),
url(r'^mega/participants$', views.export_mega_participants,
name='cof.mega_export_participants'),
url(r'^mega/orgas$', views.export_mega_orgas,
name='cof.mega_export_orgas'),
# url(r'^mega/(?P<type>.+)$', views.export_mega_bytype), # url(r'^mega/(?P<type>.+)$', views.export_mega_bytype),
url(r'^mega$', views.export_mega), url(r'^mega$', views.export_mega,
name='cof.mega_export'),
] ]
petitcours_patterns = [ petitcours_patterns = [