From c297c7b5452143f1a114360a8d7de161447cb2ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Delobelle?= Date: Sun, 17 Jun 2018 18:37:28 +0200 Subject: [PATCH] =?UTF-8?q?/cof/=20=E2=86=92=20/gestioCOF/=20&&=20/gestion?= =?UTF-8?q?cof/=20=E2=86=92=20/cof/?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bda/management/commands/loadbdadevdata.py | 2 +- bda/tests/test_models.py | 2 +- bda/urls.py | 2 +- bda/views.py | 2 +- cof/__init__.py | 1 + {gestioncof => cof}/admin.py | 6 +- {gestioncof => cof}/apps.py | 8 +- {gestioncof => cof}/autocomplete.py | 4 +- {gestioncof => cof}/csv_views.py | 0 {gestioncof => cof}/decorators.py | 0 {gestioncof => cof}/fixtures/gestion.json | 40 ++-- {gestioncof => cof}/fixtures/sites.json | 0 {gestioncof => cof}/forms.py | 6 +- cof/{locale => management}/__init__.py | 0 {gestioncof => cof}/management/base.py | 0 .../fr => management/commands}/__init__.py | 0 .../management/commands/loaddevdata.py | 4 +- .../management/commands/syncmails.py | 2 +- .../management/data/custommail.json | 4 +- .../management/data/gaulois.json | 0 .../management/data/romains.json | 0 .../migrations/0001_initial.py | 36 ++-- .../0002_enable_unprocessed_demandes.py | 2 +- .../migrations/0003_event_image.py | 2 +- .../migrations/0004_registration_mail.py | 4 +- .../migrations/0005_encoding.py | 2 +- .../migrations/0006_add_calendar.py | 2 +- .../migrations/0007_alter_club.py | 2 +- {gestioncof => cof}/migrations/0008_py3.py | 4 +- .../migrations/0009_delete_clipper.py | 2 +- .../migrations/0010_delete_custommail.py | 2 +- .../migrations/0011_longer_clippers.py | 2 +- .../migrations/0011_remove_cofprofile_num.py | 2 +- {gestioncof => cof}/migrations/0012_merge.py | 4 +- {gestioncof => cof}/migrations/0013_pei.py | 2 +- .../0014_cofprofile_mailing_unernestaparis.py | 2 +- cof/{settings => migrations}/__init__.py | 0 {gestioncof => cof}/models.py | 2 +- {gestioncof => cof}/petits_cours_forms.py | 2 +- {gestioncof => cof}/petits_cours_models.py | 0 {gestioncof => cof}/petits_cours_views.py | 16 +- cof/settings/secret.py | 1 + {gestioncof => cof}/shared.py | 2 +- {gestioncof => cof}/signals.py | 0 .../static/css/bootstrap.min.css | 0 .../static/css/bootstrap.min.css.map | 0 {gestioncof => cof}/static/css/cof.css | 0 .../static/css/droidserif.woff | Bin .../static/css/jquery-ui.min.css | 0 .../static/font-awesome/HELP-US-OUT.txt | 0 .../static/font-awesome/css/font-awesome.css | 0 .../font-awesome/css/font-awesome.min.css | 0 .../static/font-awesome/fonts/FontAwesome.otf | Bin .../fonts/fontawesome-webfont.eot | Bin .../fonts/fontawesome-webfont.svg | 0 .../fonts/fontawesome-webfont.ttf | Bin .../fonts/fontawesome-webfont.woff | Bin .../fonts/fontawesome-webfont.woff2 | Bin .../static/font-awesome/less/animated.less | 0 .../font-awesome/less/bordered-pulled.less | 0 .../static/font-awesome/less/core.less | 0 .../static/font-awesome/less/fixed-width.less | 0 .../font-awesome/less/font-awesome.less | 0 .../static/font-awesome/less/icons.less | 0 .../static/font-awesome/less/larger.less | 0 .../static/font-awesome/less/list.less | 0 .../static/font-awesome/less/mixins.less | 0 .../static/font-awesome/less/path.less | 0 .../font-awesome/less/rotated-flipped.less | 0 .../font-awesome/less/screen-reader.less | 0 .../static/font-awesome/less/stacked.less | 0 .../static/font-awesome/less/variables.less | 0 .../static/font-awesome/scss/_animated.scss | 0 .../font-awesome/scss/_bordered-pulled.scss | 0 .../static/font-awesome/scss/_core.scss | 0 .../font-awesome/scss/_fixed-width.scss | 0 .../static/font-awesome/scss/_icons.scss | 0 .../static/font-awesome/scss/_larger.scss | 0 .../static/font-awesome/scss/_list.scss | 0 .../static/font-awesome/scss/_mixins.scss | 0 .../static/font-awesome/scss/_path.scss | 0 .../font-awesome/scss/_rotated-flipped.scss | 0 .../font-awesome/scss/_screen-reader.scss | 0 .../static/font-awesome/scss/_stacked.scss | 0 .../static/font-awesome/scss/_variables.scss | 0 .../font-awesome/scss/font-awesome.scss | 0 .../fonts/glyphicons-halflings-regular.eot | Bin .../fonts/glyphicons-halflings-regular.svg | 0 .../fonts/glyphicons-halflings-regular.ttf | Bin .../fonts/glyphicons-halflings-regular.woff | Bin .../fonts/glyphicons-halflings-regular.woff2 | Bin {gestioncof => cof}/static/images/no.png | Bin {gestioncof => cof}/static/images/none.png | Bin {gestioncof => cof}/static/images/yes.png | Bin .../static/js/bootstrap.min.js | 0 .../js/joequery-Stupid-Table-Plugin/LICENSE | 0 .../js/joequery-Stupid-Table-Plugin/README.md | 0 .../examples/basic.html | 0 .../examples/colspan.html | 0 .../examples/complex.html | 0 .../examples/large-table.html | 0 .../stupidtable.js | 0 .../stupidtable.min.js | 0 .../static/js/jquery-ui.min.js | 0 {gestioncof => cof}/static/js/jquery.min.js | 0 .../static/js/jquery.ui.touch-punch.min.js | 0 {gestioncof => cof}/templates/404.html | 0 {gestioncof => cof}/templates/500.html | 0 .../templates/autocomplete_user.html | 0 {gestioncof => cof}/templates/base.html | 0 {gestioncof => cof}/templates/base_title.html | 2 +- .../templates/base_title_petitscours.html | 0 {gestioncof => cof}/templates/cof-denied.html | 0 .../templates/cof}/banner_update.html | 0 .../templates/cof}/base_header.html | 0 .../templates/cof}/calendar_subscription.html | 0 .../cof}/details_demande_petit_cours.html | 0 .../templates/cof}/event.html | 0 .../templates/cof}/profile.html | 0 .../templates/cof}/registration_form.html | 0 .../templates/cof}/registration_post.html | 2 +- .../templates/cof}/survey.html | 0 .../cof}/traitement_demande_petit_cours.html | 0 ...ment_demande_petit_cours_autre_niveau.html | 0 ...raitement_demande_petit_cours_success.html | 0 .../templates/cof}/utile_cof.html | 0 .../templates/demande-petit-cours-raw.html | 0 .../templates/demande-petit-cours.html | 0 .../details_demande_petit_cours_infos.html | 0 {gestioncof => cof}/templates/error.html | 0 .../templates/event_status.html | 2 +- {gestioncof => cof}/templates/home.html | 2 +- .../inscription-petit-cours-formset.html | 0 .../templates/inscription-petit-cours.html | 0 .../templates/liste_clubs.html | 0 .../templates/liste_mails.html | 0 {gestioncof => cof}/templates/login.html | 0 .../templates/login_switch.html | 0 .../templates/membres_clubs.html | 0 .../templates/petits_cours_demandes_list.html | 0 .../templates/registration.html | 0 .../registration/password_change_done.html | 0 .../registration/password_change_form.html | 0 .../templates/survey_status.html | 2 +- .../templates/tristate_js.html | 0 {gestioncof => cof}/templates/utile_bda.html | 0 .../templatetags}/__init__.py | 0 {gestioncof => cof}/templatetags/utils.py | 0 .../commands => cof/tests}/__init__.py | 0 {gestioncof => cof}/tests/test_legacy.py | 2 +- {gestioncof => cof}/tests/test_views.py | 4 +- {gestioncof => cof}/tests/testcases.py | 0 {gestioncof => cof}/tests/utils.py | 0 cof/urls.py | 175 +++++++----------- {gestioncof => cof}/views.py | 39 ++-- {gestioncof => cof}/widgets.py | 0 .../migrations => gestioCOF}/__init__.py | 0 {cof => gestioCOF}/asgi.py | 2 +- .../locale}/__init__.py | 0 .../tests => gestioCOF/locale/fr}/__init__.py | 0 {cof => gestioCOF}/locale/fr/formats.py | 0 {cof => gestioCOF}/routing.py | 0 {cof => gestioCOF}/settings/.gitignore | 0 gestioCOF/settings/__init__.py | 0 {cof => gestioCOF}/settings/common.py | 16 +- {cof => gestioCOF}/settings/dev.py | 2 +- {cof => gestioCOF}/settings/local.py | 4 +- {cof => gestioCOF}/settings/prod.py | 2 +- {cof => gestioCOF}/settings/secret_example.py | 0 gestioCOF/urls.py | 116 ++++++++++++ gestioncof/__init__.py | 1 - gestioncof/urls.py | 67 ------- kfet/auth/tests.py | 4 +- kfet/autocomplete.py | 2 +- kfet/forms.py | 2 +- kfet/management/commands/loadkfetdevdata.py | 4 +- kfet/migrations/0001_initial.py | 4 +- kfet/migrations/0059_create_generic.py | 2 +- kfet/models.py | 2 +- kfet/open/tests.py | 6 +- kfet/tests/test_config.py | 2 +- kfet/tests/test_statistic.py | 2 +- kfet/tests/test_tests_utils.py | 8 +- kfet/tests/testcases.py | 2 +- kfet/views.py | 2 +- manage.py | 2 +- provisioning/bootstrap.sh | 8 +- provisioning/daphne.service | 4 +- provisioning/worker.service | 2 +- shared/tests/testcases.py | 2 +- 190 files changed, 338 insertions(+), 338 deletions(-) rename {gestioncof => cof}/admin.py (98%) rename {gestioncof => cof}/apps.py (59%) rename {gestioncof => cof}/autocomplete.py (96%) rename {gestioncof => cof}/csv_views.py (100%) rename {gestioncof => cof}/decorators.py (100%) rename {gestioncof => cof}/fixtures/gestion.json (78%) rename {gestioncof => cof}/fixtures/sites.json (100%) rename {gestioncof => cof}/forms.py (99%) rename cof/{locale => management}/__init__.py (100%) rename {gestioncof => cof}/management/base.py (100%) rename cof/{locale/fr => management/commands}/__init__.py (100%) rename {gestioncof => cof}/management/commands/loaddevdata.py (97%) rename {gestioncof => cof}/management/commands/syncmails.py (97%) rename {gestioncof => cof}/management/data/custommail.json (99%) rename {gestioncof => cof}/management/data/gaulois.json (100%) rename {gestioncof => cof}/management/data/romains.json (100%) rename {gestioncof => cof}/migrations/0001_initial.py (93%) rename {gestioncof => cof}/migrations/0002_enable_unprocessed_demandes.py (91%) rename {gestioncof => cof}/migrations/0003_event_image.py (87%) rename {gestioncof => cof}/migrations/0004_registration_mail.py (91%) rename {gestioncof => cof}/migrations/0005_encoding.py (97%) rename {gestioncof => cof}/migrations/0006_add_calendar.py (97%) rename {gestioncof => cof}/migrations/0007_alter_club.py (97%) rename {gestioncof => cof}/migrations/0008_py3.py (98%) rename {gestioncof => cof}/migrations/0009_delete_clipper.py (88%) rename {gestioncof => cof}/migrations/0010_delete_custommail.py (82%) rename {gestioncof => cof}/migrations/0011_longer_clippers.py (89%) rename {gestioncof => cof}/migrations/0011_remove_cofprofile_num.py (85%) rename {gestioncof => cof}/migrations/0012_merge.py (66%) rename {gestioncof => cof}/migrations/0013_pei.py (97%) rename {gestioncof => cof}/migrations/0014_cofprofile_mailing_unernestaparis.py (92%) rename cof/{settings => migrations}/__init__.py (100%) rename {gestioncof => cof}/models.py (99%) rename {gestioncof => cof}/petits_cours_forms.py (95%) rename {gestioncof => cof}/petits_cours_models.py (100%) rename {gestioncof => cof}/petits_cours_views.py (96%) create mode 120000 cof/settings/secret.py rename {gestioncof => cof}/shared.py (95%) rename {gestioncof => cof}/signals.py (100%) rename {gestioncof => cof}/static/css/bootstrap.min.css (100%) rename {gestioncof => cof}/static/css/bootstrap.min.css.map (100%) rename {gestioncof => cof}/static/css/cof.css (100%) rename {gestioncof => cof}/static/css/droidserif.woff (100%) rename {gestioncof => cof}/static/css/jquery-ui.min.css (100%) rename {gestioncof => cof}/static/font-awesome/HELP-US-OUT.txt (100%) rename {gestioncof => cof}/static/font-awesome/css/font-awesome.css (100%) rename {gestioncof => cof}/static/font-awesome/css/font-awesome.min.css (100%) rename {gestioncof => cof}/static/font-awesome/fonts/FontAwesome.otf (100%) rename {gestioncof => cof}/static/font-awesome/fonts/fontawesome-webfont.eot (100%) rename {gestioncof => cof}/static/font-awesome/fonts/fontawesome-webfont.svg (100%) rename {gestioncof => cof}/static/font-awesome/fonts/fontawesome-webfont.ttf (100%) rename {gestioncof => cof}/static/font-awesome/fonts/fontawesome-webfont.woff (100%) rename {gestioncof => cof}/static/font-awesome/fonts/fontawesome-webfont.woff2 (100%) rename {gestioncof => cof}/static/font-awesome/less/animated.less (100%) rename {gestioncof => cof}/static/font-awesome/less/bordered-pulled.less (100%) rename {gestioncof => cof}/static/font-awesome/less/core.less (100%) rename {gestioncof => cof}/static/font-awesome/less/fixed-width.less (100%) rename {gestioncof => cof}/static/font-awesome/less/font-awesome.less (100%) rename {gestioncof => cof}/static/font-awesome/less/icons.less (100%) rename {gestioncof => cof}/static/font-awesome/less/larger.less (100%) rename {gestioncof => cof}/static/font-awesome/less/list.less (100%) rename {gestioncof => cof}/static/font-awesome/less/mixins.less (100%) rename {gestioncof => cof}/static/font-awesome/less/path.less (100%) rename {gestioncof => cof}/static/font-awesome/less/rotated-flipped.less (100%) rename {gestioncof => cof}/static/font-awesome/less/screen-reader.less (100%) rename {gestioncof => cof}/static/font-awesome/less/stacked.less (100%) rename {gestioncof => cof}/static/font-awesome/less/variables.less (100%) rename {gestioncof => cof}/static/font-awesome/scss/_animated.scss (100%) rename {gestioncof => cof}/static/font-awesome/scss/_bordered-pulled.scss (100%) rename {gestioncof => cof}/static/font-awesome/scss/_core.scss (100%) rename {gestioncof => cof}/static/font-awesome/scss/_fixed-width.scss (100%) rename {gestioncof => cof}/static/font-awesome/scss/_icons.scss (100%) rename {gestioncof => cof}/static/font-awesome/scss/_larger.scss (100%) rename {gestioncof => cof}/static/font-awesome/scss/_list.scss (100%) rename {gestioncof => cof}/static/font-awesome/scss/_mixins.scss (100%) rename {gestioncof => cof}/static/font-awesome/scss/_path.scss (100%) rename {gestioncof => cof}/static/font-awesome/scss/_rotated-flipped.scss (100%) rename {gestioncof => cof}/static/font-awesome/scss/_screen-reader.scss (100%) rename {gestioncof => cof}/static/font-awesome/scss/_stacked.scss (100%) rename {gestioncof => cof}/static/font-awesome/scss/_variables.scss (100%) rename {gestioncof => cof}/static/font-awesome/scss/font-awesome.scss (100%) rename {gestioncof => cof}/static/fonts/glyphicons-halflings-regular.eot (100%) rename {gestioncof => cof}/static/fonts/glyphicons-halflings-regular.svg (100%) rename {gestioncof => cof}/static/fonts/glyphicons-halflings-regular.ttf (100%) rename {gestioncof => cof}/static/fonts/glyphicons-halflings-regular.woff (100%) rename {gestioncof => cof}/static/fonts/glyphicons-halflings-regular.woff2 (100%) rename {gestioncof => cof}/static/images/no.png (100%) rename {gestioncof => cof}/static/images/none.png (100%) rename {gestioncof => cof}/static/images/yes.png (100%) rename {gestioncof => cof}/static/js/bootstrap.min.js (100%) rename {gestioncof => cof}/static/js/joequery-Stupid-Table-Plugin/LICENSE (100%) rename {gestioncof => cof}/static/js/joequery-Stupid-Table-Plugin/README.md (100%) rename {gestioncof => cof}/static/js/joequery-Stupid-Table-Plugin/examples/basic.html (100%) rename {gestioncof => cof}/static/js/joequery-Stupid-Table-Plugin/examples/colspan.html (100%) rename {gestioncof => cof}/static/js/joequery-Stupid-Table-Plugin/examples/complex.html (100%) rename {gestioncof => cof}/static/js/joequery-Stupid-Table-Plugin/examples/large-table.html (100%) rename {gestioncof => cof}/static/js/joequery-Stupid-Table-Plugin/stupidtable.js (100%) rename {gestioncof => cof}/static/js/joequery-Stupid-Table-Plugin/stupidtable.min.js (100%) rename {gestioncof => cof}/static/js/jquery-ui.min.js (100%) rename {gestioncof => cof}/static/js/jquery.min.js (100%) rename {gestioncof => cof}/static/js/jquery.ui.touch-punch.min.js (100%) rename {gestioncof => cof}/templates/404.html (100%) rename {gestioncof => cof}/templates/500.html (100%) rename {gestioncof => cof}/templates/autocomplete_user.html (100%) rename {gestioncof => cof}/templates/base.html (100%) rename {gestioncof => cof}/templates/base_title.html (93%) rename {gestioncof => cof}/templates/base_title_petitscours.html (100%) rename {gestioncof => cof}/templates/cof-denied.html (100%) rename {gestioncof/templates/gestioncof => cof/templates/cof}/banner_update.html (100%) rename {gestioncof/templates/gestioncof => cof/templates/cof}/base_header.html (100%) rename {gestioncof/templates/gestioncof => cof/templates/cof}/calendar_subscription.html (100%) rename {gestioncof/templates/gestioncof => cof/templates/cof}/details_demande_petit_cours.html (100%) rename {gestioncof/templates/gestioncof => cof/templates/cof}/event.html (100%) rename {gestioncof/templates/gestioncof => cof/templates/cof}/profile.html (100%) rename {gestioncof/templates/gestioncof => cof/templates/cof}/registration_form.html (100%) rename {gestioncof/templates/gestioncof => cof/templates/cof}/registration_post.html (74%) rename {gestioncof/templates/gestioncof => cof/templates/cof}/survey.html (100%) rename {gestioncof/templates/gestioncof => cof/templates/cof}/traitement_demande_petit_cours.html (100%) rename {gestioncof/templates/gestioncof => cof/templates/cof}/traitement_demande_petit_cours_autre_niveau.html (100%) rename {gestioncof/templates/gestioncof => cof/templates/cof}/traitement_demande_petit_cours_success.html (100%) rename {gestioncof/templates/gestioncof => cof/templates/cof}/utile_cof.html (100%) rename {gestioncof => cof}/templates/demande-petit-cours-raw.html (100%) rename {gestioncof => cof}/templates/demande-petit-cours.html (100%) rename {gestioncof => cof}/templates/details_demande_petit_cours_infos.html (100%) rename {gestioncof => cof}/templates/error.html (100%) rename {gestioncof => cof}/templates/event_status.html (93%) rename {gestioncof => cof}/templates/home.html (99%) rename {gestioncof => cof}/templates/inscription-petit-cours-formset.html (100%) rename {gestioncof => cof}/templates/inscription-petit-cours.html (100%) rename {gestioncof => cof}/templates/liste_clubs.html (100%) rename {gestioncof => cof}/templates/liste_mails.html (100%) rename {gestioncof => cof}/templates/login.html (100%) rename {gestioncof => cof}/templates/login_switch.html (100%) rename {gestioncof => cof}/templates/membres_clubs.html (100%) rename {gestioncof => cof}/templates/petits_cours_demandes_list.html (100%) rename {gestioncof => cof}/templates/registration.html (100%) rename {gestioncof => cof}/templates/registration/password_change_done.html (100%) rename {gestioncof => cof}/templates/registration/password_change_form.html (100%) rename {gestioncof => cof}/templates/survey_status.html (93%) rename {gestioncof => cof}/templates/tristate_js.html (100%) rename {gestioncof => cof}/templates/utile_bda.html (100%) rename {gestioncof/management => cof/templatetags}/__init__.py (100%) rename {gestioncof => cof}/templatetags/utils.py (100%) rename {gestioncof/management/commands => cof/tests}/__init__.py (100%) rename {gestioncof => cof}/tests/test_legacy.py (95%) rename {gestioncof => cof}/tests/test_views.py (99%) rename {gestioncof => cof}/tests/testcases.py (100%) rename {gestioncof => cof}/tests/utils.py (100%) rename {gestioncof => cof}/views.py (96%) rename {gestioncof => cof}/widgets.py (100%) rename {gestioncof/migrations => gestioCOF}/__init__.py (100%) rename {cof => gestioCOF}/asgi.py (65%) rename {gestioncof/templatetags => gestioCOF/locale}/__init__.py (100%) rename {gestioncof/tests => gestioCOF/locale/fr}/__init__.py (100%) rename {cof => gestioCOF}/locale/fr/formats.py (100%) rename {cof => gestioCOF}/routing.py (100%) rename {cof => gestioCOF}/settings/.gitignore (100%) create mode 100644 gestioCOF/settings/__init__.py rename {cof => gestioCOF}/settings/common.py (95%) rename {cof => gestioCOF}/settings/dev.py (95%) rename {cof => gestioCOF}/settings/local.py (87%) rename {cof => gestioCOF}/settings/prod.py (91%) rename {cof => gestioCOF}/settings/secret_example.py (100%) create mode 100644 gestioCOF/urls.py delete mode 100644 gestioncof/__init__.py delete mode 100644 gestioncof/urls.py diff --git a/bda/management/commands/loadbdadevdata.py b/bda/management/commands/loadbdadevdata.py index a8e3f298..a8851e3d 100644 --- a/bda/management/commands/loadbdadevdata.py +++ b/bda/management/commands/loadbdadevdata.py @@ -8,7 +8,7 @@ import random from django.utils import timezone from django.contrib.auth.models import User -from gestioncof.management.base import MyBaseCommand +from cof.management.base import MyBaseCommand from bda.models import Tirage, Spectacle, Salle, Participant, ChoixSpectacle from bda.views import do_tirage diff --git a/bda/tests/test_models.py b/bda/tests/test_models.py index 95ce8646..54d5327e 100644 --- a/bda/tests/test_models.py +++ b/bda/tests/test_models.py @@ -14,7 +14,7 @@ User = get_user_model() class SpectacleReventeTests(TestCase): - fixtures = ['gestioncof/management/data/custommail.json'] + fixtures = ['cof/management/data/custommail.json'] def setUp(self): now = timezone.now() diff --git a/bda/urls.py b/bda/urls.py index 7264d7b3..e3611e0e 100644 --- a/bda/urls.py +++ b/bda/urls.py @@ -1,5 +1,5 @@ from django.conf.urls import url -from gestioncof.decorators import buro_required +from cof.decorators import buro_required from bda.views import SpectacleListView from bda import views diff --git a/bda/views.py b/bda/views.py index b49eb030..df830c87 100644 --- a/bda/views.py +++ b/bda/views.py @@ -20,7 +20,7 @@ from django.core.urlresolvers import reverse from django.conf import settings from django.utils import timezone, formats from django.views.generic.list import ListView -from gestioncof.decorators import cof_required, buro_required +from cof.decorators import cof_required, buro_required from bda.models import ( Spectacle, Participant, ChoixSpectacle, Attribution, Tirage, SpectacleRevente, Salle, CategorieSpectacle diff --git a/cof/__init__.py b/cof/__init__.py index e69de29b..361348f7 100644 --- a/cof/__init__.py +++ b/cof/__init__.py @@ -0,0 +1 @@ +default_app_config = 'cof.apps.CofConfig' diff --git a/gestioncof/admin.py b/cof/admin.py similarity index 98% rename from gestioncof/admin.py rename to cof/admin.py index 54a6a5a0..91a17d10 100644 --- a/gestioncof/admin.py +++ b/cof/admin.py @@ -1,10 +1,10 @@ from django import forms from django.contrib import admin from django.utils.translation import ugettext_lazy as _ -from gestioncof.models import SurveyQuestionAnswer, SurveyQuestion, \ +from cof.models import SurveyQuestionAnswer, SurveyQuestion, \ CofProfile, EventOption, EventOptionChoice, Event, Club, \ Survey, EventCommentField, EventRegistration -from gestioncof.petits_cours_models import PetitCoursDemande, \ +from cof.petits_cours_models import PetitCoursDemande, \ PetitCoursSubject, PetitCoursAbility, PetitCoursAttribution, \ PetitCoursAttributionCounter from django.contrib.auth.models import User, Group, Permission @@ -189,7 +189,7 @@ class UserProfileAdmin(UserAdmin): # Si le groupe COF n'était pas déjà dans la bdd # On lui assigne les bonnes permissions perms = Permission.objects.filter( - Q(content_type__app_label='gestioncof') + Q(content_type__app_label='cof') | Q(content_type__app_label='bda') | (Q(content_type__app_label='auth') & Q(content_type__model='user'))) diff --git a/gestioncof/apps.py b/cof/apps.py similarity index 59% rename from gestioncof/apps.py rename to cof/apps.py index 78120ef4..256a8352 100644 --- a/gestioncof/apps.py +++ b/cof/apps.py @@ -1,8 +1,8 @@ from django.apps import AppConfig -class GestioncofConfig(AppConfig): - name = 'gestioncof' +class CofConfig(AppConfig): + name = 'cof' verbose_name = "Gestion des adhérents du COF" def ready(self): @@ -11,5 +11,5 @@ class GestioncofConfig(AppConfig): def register_config(self): import djconfig - from .forms import GestioncofConfigForm - djconfig.register(GestioncofConfigForm) + from .forms import CofConfigForm + djconfig.register(CofConfigForm) diff --git a/gestioncof/autocomplete.py b/cof/autocomplete.py similarity index 96% rename from gestioncof/autocomplete.py rename to cof/autocomplete.py index 1d60cd78..ed8bc3fb 100644 --- a/gestioncof/autocomplete.py +++ b/cof/autocomplete.py @@ -6,8 +6,8 @@ from django.db.models import Q from django.contrib.auth.models import User from django.conf import settings -from gestioncof.models import CofProfile -from gestioncof.decorators import buro_required +from cof.models import CofProfile +from cof.decorators import buro_required class Clipper(object): diff --git a/gestioncof/csv_views.py b/cof/csv_views.py similarity index 100% rename from gestioncof/csv_views.py rename to cof/csv_views.py diff --git a/gestioncof/decorators.py b/cof/decorators.py similarity index 100% rename from gestioncof/decorators.py rename to cof/decorators.py diff --git a/gestioncof/fixtures/gestion.json b/cof/fixtures/gestion.json similarity index 78% rename from gestioncof/fixtures/gestion.json rename to cof/fixtures/gestion.json index ae6466f8..6d1bd76f 100644 --- a/gestioncof/fixtures/gestion.json +++ b/cof/fixtures/gestion.json @@ -6,7 +6,7 @@ "survey_open": true, "title": "Sort du barde" }, - "model": "gestioncof.survey", + "model": "cof.survey", "pk": 1 }, { @@ -15,7 +15,7 @@ "survey": 1, "multi_answers": true }, - "model": "gestioncof.surveyquestion", + "model": "cof.surveyquestion", "pk": 1 }, { @@ -24,7 +24,7 @@ "survey": 1, "multi_answers": false }, - "model": "gestioncof.surveyquestion", + "model": "cof.surveyquestion", "pk": 2 }, { @@ -32,7 +32,7 @@ "answer": "On l'ernestise", "survey_question": 1 }, - "model": "gestioncof.surveyquestionanswer", + "model": "cof.surveyquestionanswer", "pk": 1 }, { @@ -40,7 +40,7 @@ "answer": "On ligote", "survey_question": 1 }, - "model": "gestioncof.surveyquestionanswer", + "model": "cof.surveyquestionanswer", "pk": 2 }, { @@ -48,7 +48,7 @@ "answer": "On le prive de banquet", "survey_question": 1 }, - "model": "gestioncof.surveyquestionanswer", + "model": "cof.surveyquestionanswer", "pk": 3 }, { @@ -56,7 +56,7 @@ "answer": "Oui", "survey_question": 2 }, - "model": "gestioncof.surveyquestionanswer", + "model": "cof.surveyquestionanswer", "pk": 4 }, { @@ -64,7 +64,7 @@ "answer": "Non", "survey_question": 2 }, - "model": "gestioncof.surveyquestionanswer", + "model": "cof.surveyquestionanswer", "pk": 5 }, { @@ -78,7 +78,7 @@ "registration_open": true, "start_date": "2016-09-09T00:00:00Z" }, - "model": "gestioncof.event", + "model": "cof.event", "pk": 1 }, { @@ -88,7 +88,7 @@ "fieldtype": "text", "name": "Commentaires" }, - "model": "gestioncof.eventcommentfield", + "model": "cof.eventcommentfield", "pk": 1 }, { @@ -97,7 +97,7 @@ "event": 1, "name": "Potion magique" }, - "model": "gestioncof.eventoption", + "model": "cof.eventoption", "pk": 1 }, { @@ -105,7 +105,7 @@ "event_option": 1, "value": "Je suis alergique" }, - "model": "gestioncof.eventoptionchoice", + "model": "cof.eventoptionchoice", "pk": 1 }, { @@ -113,7 +113,7 @@ "event_option": 1, "value": "J'en veux" }, - "model": "gestioncof.eventoptionchoice", + "model": "cof.eventoptionchoice", "pk": 2 }, { @@ -121,35 +121,35 @@ "event_option": 1, "value": "Je suis tomb\u00e9 dans la marmite quand j'\u00e9tais petit" }, - "model": "gestioncof.eventoptionchoice", + "model": "cof.eventoptionchoice", "pk": 3 }, { "fields": { "name": "Bagarre" }, - "model": "gestioncof.petitcourssubject", + "model": "cof.petitcourssubject", "pk": 1 }, { "fields": { "name": "Lancer de menhir" }, - "model": "gestioncof.petitcourssubject", + "model": "cof.petitcourssubject", "pk": 2 }, { "fields": { "name": "Pr\u00e9paration de potions" }, - "model": "gestioncof.petitcourssubject", + "model": "cof.petitcourssubject", "pk": 3 }, { "fields": { "name": "Chant" }, - "model": "gestioncof.petitcourssubject", + "model": "cof.petitcourssubject", "pk": 4 }, { @@ -171,7 +171,7 @@ "email": "jules.cesar@polytechnique.edu", "processed": null }, - "model": "gestioncof.petitcoursdemande", + "model": "cof.petitcoursdemande", "pk": 1 }, { @@ -193,7 +193,7 @@ "email": "jules.cesar@polytechnique.edu", "processed": null }, - "model": "gestioncof.petitcoursdemande", + "model": "cof.petitcoursdemande", "pk": 2 } ] diff --git a/gestioncof/fixtures/sites.json b/cof/fixtures/sites.json similarity index 100% rename from gestioncof/fixtures/sites.json rename to cof/fixtures/sites.json diff --git a/gestioncof/forms.py b/cof/forms.py similarity index 99% rename from gestioncof/forms.py rename to cof/forms.py index 4ad9b058..04e3674e 100644 --- a/gestioncof/forms.py +++ b/cof/forms.py @@ -6,9 +6,9 @@ from django.forms.formsets import BaseFormSet, formset_factory from djconfig.forms import ConfigForm -from gestioncof.models import CofProfile, EventCommentValue, \ +from cof.models import CofProfile, EventCommentValue, \ CalendarSubscription, Club -from gestioncof.widgets import TriStateCheckbox +from cof.widgets import TriStateCheckbox from bda.models import Spectacle @@ -386,7 +386,7 @@ class ClubsForm(forms.Form): # TODO: move this to the `gestion` app once the supportBDS branch is merged # --- -class GestioncofConfigForm(ConfigForm): +class CofConfigForm(ConfigForm): gestion_banner = forms.CharField( label=_("Announcements banner"), help_text=_("An empty banner disables annoucements"), diff --git a/cof/locale/__init__.py b/cof/management/__init__.py similarity index 100% rename from cof/locale/__init__.py rename to cof/management/__init__.py diff --git a/gestioncof/management/base.py b/cof/management/base.py similarity index 100% rename from gestioncof/management/base.py rename to cof/management/base.py diff --git a/cof/locale/fr/__init__.py b/cof/management/commands/__init__.py similarity index 100% rename from cof/locale/fr/__init__.py rename to cof/management/commands/__init__.py diff --git a/gestioncof/management/commands/loaddevdata.py b/cof/management/commands/loaddevdata.py similarity index 97% rename from gestioncof/management/commands/loaddevdata.py rename to cof/management/commands/loaddevdata.py index 7358c695..11755cef 100644 --- a/gestioncof/management/commands/loaddevdata.py +++ b/cof/management/commands/loaddevdata.py @@ -13,8 +13,8 @@ import random from django.contrib.auth.models import User from django.core.management import call_command -from gestioncof.management.base import MyBaseCommand -from gestioncof.petits_cours_models import ( +from cof.management.base import MyBaseCommand +from cof.petits_cours_models import ( PetitCoursAbility, PetitCoursSubject, LEVELS_CHOICES, PetitCoursAttributionCounter ) diff --git a/gestioncof/management/commands/syncmails.py b/cof/management/commands/syncmails.py similarity index 97% rename from gestioncof/management/commands/syncmails.py rename to cof/management/commands/syncmails.py index 689da716..0dd17aea 100644 --- a/gestioncof/management/commands/syncmails.py +++ b/cof/management/commands/syncmails.py @@ -12,7 +12,7 @@ from django.contrib.contenttypes.models import ContentType class Command(BaseCommand): help = ("Va chercher les données mails de GestioCOF stocké au format json " - "dans /gestioncof/management/data/custommails.json. Le format des " + "dans /cof/management/data/custommails.json. Le format des " "données est celui donné par la commande :" " `python manage.py dumpdata custommail --natural-foreign` " "La bonne façon de mettre à jour ce fichier est donc de le " diff --git a/gestioncof/management/data/custommail.json b/cof/management/data/custommail.json similarity index 99% rename from gestioncof/management/data/custommail.json rename to cof/management/data/custommail.json index 691043e9..115cc8d4 100644 --- a/gestioncof/management/data/custommail.json +++ b/cof/management/data/custommail.json @@ -66,7 +66,7 @@ "fields": { "kind": "model", "content_type": [ - "gestioncof", + "cof", "petitcoursdemande" ], "inner1": null, @@ -129,7 +129,7 @@ "fields": { "kind": "model", "content_type": [ - "gestioncof", + "cof", "petitcourssubject" ], "inner1": null, diff --git a/gestioncof/management/data/gaulois.json b/cof/management/data/gaulois.json similarity index 100% rename from gestioncof/management/data/gaulois.json rename to cof/management/data/gaulois.json diff --git a/gestioncof/management/data/romains.json b/cof/management/data/romains.json similarity index 100% rename from gestioncof/management/data/romains.json rename to cof/management/data/romains.json diff --git a/gestioncof/migrations/0001_initial.py b/cof/migrations/0001_initial.py similarity index 93% rename from gestioncof/migrations/0001_initial.py rename to cof/migrations/0001_initial.py index c6bb6151..0c3a1f39 100644 --- a/gestioncof/migrations/0001_initial.py +++ b/cof/migrations/0001_initial.py @@ -91,7 +91,7 @@ class Migration(migrations.Migration): ('name', models.CharField(max_length=200, verbose_name=b'Champ')), ('fieldtype', models.CharField(default=b'text', max_length=10, verbose_name=b'Type', choices=[(b'text', 'Texte long'), (b'char', 'Texte court')])), ('default', models.TextField(verbose_name=b'Valeur par d\xc3\xa9faut', blank=True)), - ('event', models.ForeignKey(related_name='commentfields', to='gestioncof.Event', on_delete=models.CASCADE)), + ('event', models.ForeignKey(related_name='commentfields', to='cof.Event', on_delete=models.CASCADE)), ], options={ 'verbose_name': 'Champ', @@ -102,7 +102,7 @@ class Migration(migrations.Migration): fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('content', models.TextField(null=True, verbose_name=b'Contenu', blank=True)), - ('commentfield', models.ForeignKey(related_name='values', to='gestioncof.EventCommentField', on_delete=models.CASCADE)), + ('commentfield', models.ForeignKey(related_name='values', to='cof.EventCommentField', on_delete=models.CASCADE)), ], ), migrations.CreateModel( @@ -111,7 +111,7 @@ class Migration(migrations.Migration): ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('name', models.CharField(max_length=200, verbose_name=b'Option')), ('multi_choices', models.BooleanField(default=False, verbose_name=b'Choix multiples')), - ('event', models.ForeignKey(related_name='options', to='gestioncof.Event', on_delete=models.CASCADE)), + ('event', models.ForeignKey(related_name='options', to='cof.Event', on_delete=models.CASCADE)), ], options={ 'verbose_name': 'Option', @@ -122,7 +122,7 @@ class Migration(migrations.Migration): fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('value', models.CharField(max_length=200, verbose_name=b'Valeur')), - ('event_option', models.ForeignKey(related_name='choices', to='gestioncof.EventOption', on_delete=models.CASCADE)), + ('event_option', models.ForeignKey(related_name='choices', to='cof.EventOption', on_delete=models.CASCADE)), ], options={ 'verbose_name': 'Choix', @@ -133,9 +133,9 @@ class Migration(migrations.Migration): fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('paid', models.BooleanField(default=False, verbose_name=b'A pay\xc3\xa9')), - ('event', models.ForeignKey(to='gestioncof.Event', on_delete=models.CASCADE)), - ('filledcomments', models.ManyToManyField(to='gestioncof.EventCommentField', through='gestioncof.EventCommentValue')), - ('options', models.ManyToManyField(to='gestioncof.EventOptionChoice')), + ('event', models.ForeignKey(to='cof.Event', on_delete=models.CASCADE)), + ('filledcomments', models.ManyToManyField(to='cof.EventCommentField', through='cof.EventCommentValue')), + ('options', models.ManyToManyField(to='cof.EventOptionChoice')), ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL, on_delete=models.CASCADE)), ], options={ @@ -205,7 +205,7 @@ class Migration(migrations.Migration): fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('name', models.CharField(max_length=30, verbose_name='Mati\xe8re')), - ('users', models.ManyToManyField(related_name='petits_cours_matieres', through='gestioncof.PetitCoursAbility', to=settings.AUTH_USER_MODEL)), + ('users', models.ManyToManyField(related_name='petits_cours_matieres', through='cof.PetitCoursAbility', to=settings.AUTH_USER_MODEL)), ], options={ 'verbose_name': 'Mati\xe8re de petits cours', @@ -240,7 +240,7 @@ class Migration(migrations.Migration): ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('question', models.CharField(max_length=200, verbose_name=b'Question')), ('multi_answers', models.BooleanField(default=False, verbose_name=b'Choix multiples')), - ('survey', models.ForeignKey(related_name='questions', to='gestioncof.Survey', on_delete=models.CASCADE)), + ('survey', models.ForeignKey(related_name='questions', to='cof.Survey', on_delete=models.CASCADE)), ], options={ 'verbose_name': 'Question', @@ -251,7 +251,7 @@ class Migration(migrations.Migration): fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('answer', models.CharField(max_length=200, verbose_name=b'R\xc3\xa9ponse')), - ('survey_question', models.ForeignKey(related_name='answers', to='gestioncof.SurveyQuestion', on_delete=models.CASCADE)), + ('survey_question', models.ForeignKey(related_name='answers', to='cof.SurveyQuestion', on_delete=models.CASCADE)), ], options={ 'verbose_name': 'R\xe9ponse', @@ -260,12 +260,12 @@ class Migration(migrations.Migration): migrations.AddField( model_name='surveyanswer', name='answers', - field=models.ManyToManyField(related_name='selected_by', to='gestioncof.SurveyQuestionAnswer'), + field=models.ManyToManyField(related_name='selected_by', to='cof.SurveyQuestionAnswer'), ), migrations.AddField( model_name='surveyanswer', name='survey', - field=models.ForeignKey(to='gestioncof.Survey', on_delete=models.CASCADE), + field=models.ForeignKey(to='cof.Survey', on_delete=models.CASCADE), ), migrations.AddField( model_name='surveyanswer', @@ -275,7 +275,7 @@ class Migration(migrations.Migration): migrations.AddField( model_name='petitcoursdemande', name='matieres', - field=models.ManyToManyField(related_name='demandes', verbose_name='Mati\xe8res', to='gestioncof.PetitCoursSubject'), + field=models.ManyToManyField(related_name='demandes', verbose_name='Mati\xe8res', to='cof.PetitCoursSubject'), ), migrations.AddField( model_name='petitcoursdemande', @@ -285,7 +285,7 @@ class Migration(migrations.Migration): migrations.AddField( model_name='petitcoursattributioncounter', name='matiere', - field=models.ForeignKey(verbose_name='Matiere', to='gestioncof.PetitCoursSubject', on_delete=models.CASCADE), + field=models.ForeignKey(verbose_name='Matiere', to='cof.PetitCoursSubject', on_delete=models.CASCADE), ), migrations.AddField( model_name='petitcoursattributioncounter', @@ -295,12 +295,12 @@ class Migration(migrations.Migration): migrations.AddField( model_name='petitcoursattribution', name='demande', - field=models.ForeignKey(verbose_name='Demande', to='gestioncof.PetitCoursDemande', on_delete=models.CASCADE), + field=models.ForeignKey(verbose_name='Demande', to='cof.PetitCoursDemande', on_delete=models.CASCADE), ), migrations.AddField( model_name='petitcoursattribution', name='matiere', - field=models.ForeignKey(verbose_name='Mati\xe8re', to='gestioncof.PetitCoursSubject', on_delete=models.CASCADE), + field=models.ForeignKey(verbose_name='Mati\xe8re', to='cof.PetitCoursSubject', on_delete=models.CASCADE), ), migrations.AddField( model_name='petitcoursattribution', @@ -310,7 +310,7 @@ class Migration(migrations.Migration): migrations.AddField( model_name='petitcoursability', name='matiere', - field=models.ForeignKey(verbose_name='Mati\xe8re', to='gestioncof.PetitCoursSubject', on_delete=models.CASCADE), + field=models.ForeignKey(verbose_name='Mati\xe8re', to='cof.PetitCoursSubject', on_delete=models.CASCADE), ), migrations.AddField( model_name='petitcoursability', @@ -320,7 +320,7 @@ class Migration(migrations.Migration): migrations.AddField( model_name='eventcommentvalue', name='registration', - field=models.ForeignKey(related_name='comments', to='gestioncof.EventRegistration', on_delete=models.CASCADE), + field=models.ForeignKey(related_name='comments', to='cof.EventRegistration', on_delete=models.CASCADE), ), migrations.AlterUniqueTogether( name='surveyanswer', diff --git a/gestioncof/migrations/0002_enable_unprocessed_demandes.py b/cof/migrations/0002_enable_unprocessed_demandes.py similarity index 91% rename from gestioncof/migrations/0002_enable_unprocessed_demandes.py rename to cof/migrations/0002_enable_unprocessed_demandes.py index 18006588..43fca7ae 100644 --- a/gestioncof/migrations/0002_enable_unprocessed_demandes.py +++ b/cof/migrations/0002_enable_unprocessed_demandes.py @@ -7,7 +7,7 @@ from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ - ('gestioncof', '0001_initial'), + ('cof', '0001_initial'), ] operations = [ diff --git a/gestioncof/migrations/0003_event_image.py b/cof/migrations/0003_event_image.py similarity index 87% rename from gestioncof/migrations/0003_event_image.py rename to cof/migrations/0003_event_image.py index 6d65b1a6..2f967f6a 100644 --- a/gestioncof/migrations/0003_event_image.py +++ b/cof/migrations/0003_event_image.py @@ -7,7 +7,7 @@ from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ - ('gestioncof', '0002_enable_unprocessed_demandes'), + ('cof', '0002_enable_unprocessed_demandes'), ] operations = [ diff --git a/gestioncof/migrations/0004_registration_mail.py b/cof/migrations/0004_registration_mail.py similarity index 91% rename from gestioncof/migrations/0004_registration_mail.py rename to cof/migrations/0004_registration_mail.py index d72900bf..03685f3d 100644 --- a/gestioncof/migrations/0004_registration_mail.py +++ b/cof/migrations/0004_registration_mail.py @@ -5,7 +5,7 @@ from django.db import migrations def create_mail(apps, schema_editor): - CustomMail = apps.get_model("gestioncof", "CustomMail") + CustomMail = apps.get_model("cof", "CustomMail") db_alias = schema_editor.connection.alias if CustomMail.objects.filter(shortname="bienvenue").count() == 0: CustomMail.objects.using(db_alias).bulk_create([ @@ -24,7 +24,7 @@ def create_mail(apps, schema_editor): class Migration(migrations.Migration): dependencies = [ - ('gestioncof', '0003_event_image'), + ('cof', '0003_event_image'), ] operations = [ diff --git a/gestioncof/migrations/0005_encoding.py b/cof/migrations/0005_encoding.py similarity index 97% rename from gestioncof/migrations/0005_encoding.py rename to cof/migrations/0005_encoding.py index 4f565a5d..5b25cc2e 100644 --- a/gestioncof/migrations/0005_encoding.py +++ b/cof/migrations/0005_encoding.py @@ -7,7 +7,7 @@ from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ - ('gestioncof', '0004_registration_mail'), + ('cof', '0004_registration_mail'), ] operations = [ diff --git a/gestioncof/migrations/0006_add_calendar.py b/cof/migrations/0006_add_calendar.py similarity index 97% rename from gestioncof/migrations/0006_add_calendar.py rename to cof/migrations/0006_add_calendar.py index 27852f61..d1658e4f 100644 --- a/gestioncof/migrations/0006_add_calendar.py +++ b/cof/migrations/0006_add_calendar.py @@ -10,7 +10,7 @@ class Migration(migrations.Migration): dependencies = [ ('bda', '0004_mails-rappel'), migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ('gestioncof', '0005_encoding'), + ('cof', '0005_encoding'), ] operations = [ diff --git a/gestioncof/migrations/0007_alter_club.py b/cof/migrations/0007_alter_club.py similarity index 97% rename from gestioncof/migrations/0007_alter_club.py rename to cof/migrations/0007_alter_club.py index 324c59a6..ca1a6d0b 100644 --- a/gestioncof/migrations/0007_alter_club.py +++ b/cof/migrations/0007_alter_club.py @@ -8,7 +8,7 @@ from django.conf import settings class Migration(migrations.Migration): dependencies = [ - ('gestioncof', '0006_add_calendar'), + ('cof', '0006_add_calendar'), ] operations = [ diff --git a/gestioncof/migrations/0008_py3.py b/cof/migrations/0008_py3.py similarity index 98% rename from gestioncof/migrations/0008_py3.py rename to cof/migrations/0008_py3.py index 7d94d7ce..612d06ac 100644 --- a/gestioncof/migrations/0008_py3.py +++ b/cof/migrations/0008_py3.py @@ -5,14 +5,14 @@ from django.db import models, migrations def forwards(apps, schema_editor): - Profile = apps.get_model("gestioncof", "CofProfile") + Profile = apps.get_model("cof", "CofProfile") Profile.objects.update(comments="") class Migration(migrations.Migration): dependencies = [ - ('gestioncof', '0007_alter_club'), + ('cof', '0007_alter_club'), ] operations = [ diff --git a/gestioncof/migrations/0009_delete_clipper.py b/cof/migrations/0009_delete_clipper.py similarity index 88% rename from gestioncof/migrations/0009_delete_clipper.py rename to cof/migrations/0009_delete_clipper.py index e537107b..5d98de73 100644 --- a/gestioncof/migrations/0009_delete_clipper.py +++ b/cof/migrations/0009_delete_clipper.py @@ -7,7 +7,7 @@ from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ - ('gestioncof', '0008_py3'), + ('cof', '0008_py3'), ] operations = [ diff --git a/gestioncof/migrations/0010_delete_custommail.py b/cof/migrations/0010_delete_custommail.py similarity index 82% rename from gestioncof/migrations/0010_delete_custommail.py rename to cof/migrations/0010_delete_custommail.py index 63ebeca7..55bd2d9d 100644 --- a/gestioncof/migrations/0010_delete_custommail.py +++ b/cof/migrations/0010_delete_custommail.py @@ -6,7 +6,7 @@ from django.db import migrations class Migration(migrations.Migration): dependencies = [ - ('gestioncof', '0009_delete_clipper'), + ('cof', '0009_delete_clipper'), ] operations = [ diff --git a/gestioncof/migrations/0011_longer_clippers.py b/cof/migrations/0011_longer_clippers.py similarity index 89% rename from gestioncof/migrations/0011_longer_clippers.py rename to cof/migrations/0011_longer_clippers.py index 631d0ea8..90f72352 100644 --- a/gestioncof/migrations/0011_longer_clippers.py +++ b/cof/migrations/0011_longer_clippers.py @@ -7,7 +7,7 @@ from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ - ('gestioncof', '0010_delete_custommail'), + ('cof', '0010_delete_custommail'), ] operations = [ diff --git a/gestioncof/migrations/0011_remove_cofprofile_num.py b/cof/migrations/0011_remove_cofprofile_num.py similarity index 85% rename from gestioncof/migrations/0011_remove_cofprofile_num.py rename to cof/migrations/0011_remove_cofprofile_num.py index f39ce367..37e2e93a 100644 --- a/gestioncof/migrations/0011_remove_cofprofile_num.py +++ b/cof/migrations/0011_remove_cofprofile_num.py @@ -7,7 +7,7 @@ from django.db import migrations class Migration(migrations.Migration): dependencies = [ - ('gestioncof', '0010_delete_custommail'), + ('cof', '0010_delete_custommail'), ] operations = [ diff --git a/gestioncof/migrations/0012_merge.py b/cof/migrations/0012_merge.py similarity index 66% rename from gestioncof/migrations/0012_merge.py rename to cof/migrations/0012_merge.py index 39879346..735a8400 100644 --- a/gestioncof/migrations/0012_merge.py +++ b/cof/migrations/0012_merge.py @@ -7,8 +7,8 @@ from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ - ('gestioncof', '0011_remove_cofprofile_num'), - ('gestioncof', '0011_longer_clippers'), + ('cof', '0011_remove_cofprofile_num'), + ('cof', '0011_longer_clippers'), ] operations = [ diff --git a/gestioncof/migrations/0013_pei.py b/cof/migrations/0013_pei.py similarity index 97% rename from gestioncof/migrations/0013_pei.py rename to cof/migrations/0013_pei.py index 2fbddf1f..37cabb83 100644 --- a/gestioncof/migrations/0013_pei.py +++ b/cof/migrations/0013_pei.py @@ -7,7 +7,7 @@ from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ - ('gestioncof', '0012_merge'), + ('cof', '0012_merge'), ] operations = [ diff --git a/gestioncof/migrations/0014_cofprofile_mailing_unernestaparis.py b/cof/migrations/0014_cofprofile_mailing_unernestaparis.py similarity index 92% rename from gestioncof/migrations/0014_cofprofile_mailing_unernestaparis.py rename to cof/migrations/0014_cofprofile_mailing_unernestaparis.py index 1d842329..1aed104b 100644 --- a/gestioncof/migrations/0014_cofprofile_mailing_unernestaparis.py +++ b/cof/migrations/0014_cofprofile_mailing_unernestaparis.py @@ -8,7 +8,7 @@ from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ - ('gestioncof', '0013_pei'), + ('cof', '0013_pei'), ] operations = [ diff --git a/cof/settings/__init__.py b/cof/migrations/__init__.py similarity index 100% rename from cof/settings/__init__.py rename to cof/migrations/__init__.py diff --git a/gestioncof/models.py b/cof/models.py similarity index 99% rename from gestioncof/models.py rename to cof/models.py index 8a5b6a53..fd3575db 100644 --- a/gestioncof/models.py +++ b/cof/models.py @@ -4,7 +4,7 @@ from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _ from django.db.models.signals import post_save, post_delete -from gestioncof.petits_cours_models import choices_length +from cof.petits_cours_models import choices_length from bda.models import Spectacle diff --git a/gestioncof/petits_cours_forms.py b/cof/petits_cours_forms.py similarity index 95% rename from gestioncof/petits_cours_forms.py rename to cof/petits_cours_forms.py index e8f067bf..ca04c39e 100644 --- a/gestioncof/petits_cours_forms.py +++ b/cof/petits_cours_forms.py @@ -5,7 +5,7 @@ from django.forms import ModelForm from django.forms.models import inlineformset_factory, BaseInlineFormSet from django.contrib.auth.models import User -from gestioncof.petits_cours_models import PetitCoursDemande, PetitCoursAbility +from cof.petits_cours_models import PetitCoursDemande, PetitCoursAbility class BaseMatieresFormSet(BaseInlineFormSet): diff --git a/gestioncof/petits_cours_models.py b/cof/petits_cours_models.py similarity index 100% rename from gestioncof/petits_cours_models.py rename to cof/petits_cours_models.py diff --git a/gestioncof/petits_cours_views.py b/cof/petits_cours_views.py similarity index 96% rename from gestioncof/petits_cours_views.py rename to cof/petits_cours_views.py index 6b8c8610..d3c2b373 100644 --- a/gestioncof/petits_cours_views.py +++ b/cof/petits_cours_views.py @@ -12,13 +12,13 @@ from django.contrib import messages from django.db import transaction from django.utils import timezone -from gestioncof.models import CofProfile -from gestioncof.petits_cours_models import ( +from cof.models import CofProfile +from cof.petits_cours_models import ( PetitCoursDemande, PetitCoursAttribution, PetitCoursAttributionCounter, PetitCoursAbility ) -from gestioncof.petits_cours_forms import DemandeForm, MatieresFormSet -from gestioncof.decorators import buro_required +from cof.petits_cours_forms import DemandeForm, MatieresFormSet +from cof.decorators import buro_required class DemandeListView(ListView): @@ -38,7 +38,7 @@ class DemandeDetailView(DetailView): .prefetch_related('petitcoursattribution_set', 'matieres') ) - template_name = "gestioncof/details_demande_petit_cours.html" + template_name = "cof/details_demande_petit_cours.html" context_object_name = "demande" def get_context_data(self, **kwargs): @@ -109,7 +109,7 @@ def _finalize_traitement(request, demande, proposals, proposed_for, if errors is not None: for error in errors: messages.error(request, error) - return render(request, "gestioncof/traitement_demande_petit_cours.html", + return render(request, "cof/traitement_demande_petit_cours.html", {"demande": demande, "unsatisfied": unsatisfied, "proposals": proposals, @@ -219,7 +219,7 @@ def _traitement_other(request, demande, redo): proposals = proposals.items() proposed_for = proposed_for.items() return render(request, - "gestioncof/traitement_demande_petit_cours_autre_niveau.html", + "cof/traitement_demande_petit_cours_autre_niveau.html", {"demande": demande, "unsatisfied": unsatisfied, "proposals": proposals, @@ -288,7 +288,7 @@ def _traitement_post(request, demande): demande.processed = timezone.now() demande.save() return render(request, - "gestioncof/traitement_demande_petit_cours_success.html", + "cof/traitement_demande_petit_cours_success.html", {"demande": demande, "redo": redo, }) diff --git a/cof/settings/secret.py b/cof/settings/secret.py new file mode 120000 index 00000000..f1c3d3f7 --- /dev/null +++ b/cof/settings/secret.py @@ -0,0 +1 @@ +secret_example.py \ No newline at end of file diff --git a/gestioncof/shared.py b/cof/shared.py similarity index 95% rename from gestioncof/shared.py rename to cof/shared.py index fdab9a45..e74acdab 100644 --- a/gestioncof/shared.py +++ b/cof/shared.py @@ -3,7 +3,7 @@ from django.contrib.sites.models import Site from django_cas_ng.backends import CASBackend -from gestioncof.models import CofProfile +from cof.models import CofProfile class COFCASBackend(CASBackend): diff --git a/gestioncof/signals.py b/cof/signals.py similarity index 100% rename from gestioncof/signals.py rename to cof/signals.py diff --git a/gestioncof/static/css/bootstrap.min.css b/cof/static/css/bootstrap.min.css similarity index 100% rename from gestioncof/static/css/bootstrap.min.css rename to cof/static/css/bootstrap.min.css diff --git a/gestioncof/static/css/bootstrap.min.css.map b/cof/static/css/bootstrap.min.css.map similarity index 100% rename from gestioncof/static/css/bootstrap.min.css.map rename to cof/static/css/bootstrap.min.css.map diff --git a/gestioncof/static/css/cof.css b/cof/static/css/cof.css similarity index 100% rename from gestioncof/static/css/cof.css rename to cof/static/css/cof.css diff --git a/gestioncof/static/css/droidserif.woff b/cof/static/css/droidserif.woff similarity index 100% rename from gestioncof/static/css/droidserif.woff rename to cof/static/css/droidserif.woff diff --git a/gestioncof/static/css/jquery-ui.min.css b/cof/static/css/jquery-ui.min.css similarity index 100% rename from gestioncof/static/css/jquery-ui.min.css rename to cof/static/css/jquery-ui.min.css diff --git a/gestioncof/static/font-awesome/HELP-US-OUT.txt b/cof/static/font-awesome/HELP-US-OUT.txt similarity index 100% rename from gestioncof/static/font-awesome/HELP-US-OUT.txt rename to cof/static/font-awesome/HELP-US-OUT.txt diff --git a/gestioncof/static/font-awesome/css/font-awesome.css b/cof/static/font-awesome/css/font-awesome.css similarity index 100% rename from gestioncof/static/font-awesome/css/font-awesome.css rename to cof/static/font-awesome/css/font-awesome.css diff --git a/gestioncof/static/font-awesome/css/font-awesome.min.css b/cof/static/font-awesome/css/font-awesome.min.css similarity index 100% rename from gestioncof/static/font-awesome/css/font-awesome.min.css rename to cof/static/font-awesome/css/font-awesome.min.css diff --git a/gestioncof/static/font-awesome/fonts/FontAwesome.otf b/cof/static/font-awesome/fonts/FontAwesome.otf similarity index 100% rename from gestioncof/static/font-awesome/fonts/FontAwesome.otf rename to cof/static/font-awesome/fonts/FontAwesome.otf diff --git a/gestioncof/static/font-awesome/fonts/fontawesome-webfont.eot b/cof/static/font-awesome/fonts/fontawesome-webfont.eot similarity index 100% rename from gestioncof/static/font-awesome/fonts/fontawesome-webfont.eot rename to cof/static/font-awesome/fonts/fontawesome-webfont.eot diff --git a/gestioncof/static/font-awesome/fonts/fontawesome-webfont.svg b/cof/static/font-awesome/fonts/fontawesome-webfont.svg similarity index 100% rename from gestioncof/static/font-awesome/fonts/fontawesome-webfont.svg rename to cof/static/font-awesome/fonts/fontawesome-webfont.svg diff --git a/gestioncof/static/font-awesome/fonts/fontawesome-webfont.ttf b/cof/static/font-awesome/fonts/fontawesome-webfont.ttf similarity index 100% rename from gestioncof/static/font-awesome/fonts/fontawesome-webfont.ttf rename to cof/static/font-awesome/fonts/fontawesome-webfont.ttf diff --git a/gestioncof/static/font-awesome/fonts/fontawesome-webfont.woff b/cof/static/font-awesome/fonts/fontawesome-webfont.woff similarity index 100% rename from gestioncof/static/font-awesome/fonts/fontawesome-webfont.woff rename to cof/static/font-awesome/fonts/fontawesome-webfont.woff diff --git a/gestioncof/static/font-awesome/fonts/fontawesome-webfont.woff2 b/cof/static/font-awesome/fonts/fontawesome-webfont.woff2 similarity index 100% rename from gestioncof/static/font-awesome/fonts/fontawesome-webfont.woff2 rename to cof/static/font-awesome/fonts/fontawesome-webfont.woff2 diff --git a/gestioncof/static/font-awesome/less/animated.less b/cof/static/font-awesome/less/animated.less similarity index 100% rename from gestioncof/static/font-awesome/less/animated.less rename to cof/static/font-awesome/less/animated.less diff --git a/gestioncof/static/font-awesome/less/bordered-pulled.less b/cof/static/font-awesome/less/bordered-pulled.less similarity index 100% rename from gestioncof/static/font-awesome/less/bordered-pulled.less rename to cof/static/font-awesome/less/bordered-pulled.less diff --git a/gestioncof/static/font-awesome/less/core.less b/cof/static/font-awesome/less/core.less similarity index 100% rename from gestioncof/static/font-awesome/less/core.less rename to cof/static/font-awesome/less/core.less diff --git a/gestioncof/static/font-awesome/less/fixed-width.less b/cof/static/font-awesome/less/fixed-width.less similarity index 100% rename from gestioncof/static/font-awesome/less/fixed-width.less rename to cof/static/font-awesome/less/fixed-width.less diff --git a/gestioncof/static/font-awesome/less/font-awesome.less b/cof/static/font-awesome/less/font-awesome.less similarity index 100% rename from gestioncof/static/font-awesome/less/font-awesome.less rename to cof/static/font-awesome/less/font-awesome.less diff --git a/gestioncof/static/font-awesome/less/icons.less b/cof/static/font-awesome/less/icons.less similarity index 100% rename from gestioncof/static/font-awesome/less/icons.less rename to cof/static/font-awesome/less/icons.less diff --git a/gestioncof/static/font-awesome/less/larger.less b/cof/static/font-awesome/less/larger.less similarity index 100% rename from gestioncof/static/font-awesome/less/larger.less rename to cof/static/font-awesome/less/larger.less diff --git a/gestioncof/static/font-awesome/less/list.less b/cof/static/font-awesome/less/list.less similarity index 100% rename from gestioncof/static/font-awesome/less/list.less rename to cof/static/font-awesome/less/list.less diff --git a/gestioncof/static/font-awesome/less/mixins.less b/cof/static/font-awesome/less/mixins.less similarity index 100% rename from gestioncof/static/font-awesome/less/mixins.less rename to cof/static/font-awesome/less/mixins.less diff --git a/gestioncof/static/font-awesome/less/path.less b/cof/static/font-awesome/less/path.less similarity index 100% rename from gestioncof/static/font-awesome/less/path.less rename to cof/static/font-awesome/less/path.less diff --git a/gestioncof/static/font-awesome/less/rotated-flipped.less b/cof/static/font-awesome/less/rotated-flipped.less similarity index 100% rename from gestioncof/static/font-awesome/less/rotated-flipped.less rename to cof/static/font-awesome/less/rotated-flipped.less diff --git a/gestioncof/static/font-awesome/less/screen-reader.less b/cof/static/font-awesome/less/screen-reader.less similarity index 100% rename from gestioncof/static/font-awesome/less/screen-reader.less rename to cof/static/font-awesome/less/screen-reader.less diff --git a/gestioncof/static/font-awesome/less/stacked.less b/cof/static/font-awesome/less/stacked.less similarity index 100% rename from gestioncof/static/font-awesome/less/stacked.less rename to cof/static/font-awesome/less/stacked.less diff --git a/gestioncof/static/font-awesome/less/variables.less b/cof/static/font-awesome/less/variables.less similarity index 100% rename from gestioncof/static/font-awesome/less/variables.less rename to cof/static/font-awesome/less/variables.less diff --git a/gestioncof/static/font-awesome/scss/_animated.scss b/cof/static/font-awesome/scss/_animated.scss similarity index 100% rename from gestioncof/static/font-awesome/scss/_animated.scss rename to cof/static/font-awesome/scss/_animated.scss diff --git a/gestioncof/static/font-awesome/scss/_bordered-pulled.scss b/cof/static/font-awesome/scss/_bordered-pulled.scss similarity index 100% rename from gestioncof/static/font-awesome/scss/_bordered-pulled.scss rename to cof/static/font-awesome/scss/_bordered-pulled.scss diff --git a/gestioncof/static/font-awesome/scss/_core.scss b/cof/static/font-awesome/scss/_core.scss similarity index 100% rename from gestioncof/static/font-awesome/scss/_core.scss rename to cof/static/font-awesome/scss/_core.scss diff --git a/gestioncof/static/font-awesome/scss/_fixed-width.scss b/cof/static/font-awesome/scss/_fixed-width.scss similarity index 100% rename from gestioncof/static/font-awesome/scss/_fixed-width.scss rename to cof/static/font-awesome/scss/_fixed-width.scss diff --git a/gestioncof/static/font-awesome/scss/_icons.scss b/cof/static/font-awesome/scss/_icons.scss similarity index 100% rename from gestioncof/static/font-awesome/scss/_icons.scss rename to cof/static/font-awesome/scss/_icons.scss diff --git a/gestioncof/static/font-awesome/scss/_larger.scss b/cof/static/font-awesome/scss/_larger.scss similarity index 100% rename from gestioncof/static/font-awesome/scss/_larger.scss rename to cof/static/font-awesome/scss/_larger.scss diff --git a/gestioncof/static/font-awesome/scss/_list.scss b/cof/static/font-awesome/scss/_list.scss similarity index 100% rename from gestioncof/static/font-awesome/scss/_list.scss rename to cof/static/font-awesome/scss/_list.scss diff --git a/gestioncof/static/font-awesome/scss/_mixins.scss b/cof/static/font-awesome/scss/_mixins.scss similarity index 100% rename from gestioncof/static/font-awesome/scss/_mixins.scss rename to cof/static/font-awesome/scss/_mixins.scss diff --git a/gestioncof/static/font-awesome/scss/_path.scss b/cof/static/font-awesome/scss/_path.scss similarity index 100% rename from gestioncof/static/font-awesome/scss/_path.scss rename to cof/static/font-awesome/scss/_path.scss diff --git a/gestioncof/static/font-awesome/scss/_rotated-flipped.scss b/cof/static/font-awesome/scss/_rotated-flipped.scss similarity index 100% rename from gestioncof/static/font-awesome/scss/_rotated-flipped.scss rename to cof/static/font-awesome/scss/_rotated-flipped.scss diff --git a/gestioncof/static/font-awesome/scss/_screen-reader.scss b/cof/static/font-awesome/scss/_screen-reader.scss similarity index 100% rename from gestioncof/static/font-awesome/scss/_screen-reader.scss rename to cof/static/font-awesome/scss/_screen-reader.scss diff --git a/gestioncof/static/font-awesome/scss/_stacked.scss b/cof/static/font-awesome/scss/_stacked.scss similarity index 100% rename from gestioncof/static/font-awesome/scss/_stacked.scss rename to cof/static/font-awesome/scss/_stacked.scss diff --git a/gestioncof/static/font-awesome/scss/_variables.scss b/cof/static/font-awesome/scss/_variables.scss similarity index 100% rename from gestioncof/static/font-awesome/scss/_variables.scss rename to cof/static/font-awesome/scss/_variables.scss diff --git a/gestioncof/static/font-awesome/scss/font-awesome.scss b/cof/static/font-awesome/scss/font-awesome.scss similarity index 100% rename from gestioncof/static/font-awesome/scss/font-awesome.scss rename to cof/static/font-awesome/scss/font-awesome.scss diff --git a/gestioncof/static/fonts/glyphicons-halflings-regular.eot b/cof/static/fonts/glyphicons-halflings-regular.eot similarity index 100% rename from gestioncof/static/fonts/glyphicons-halflings-regular.eot rename to cof/static/fonts/glyphicons-halflings-regular.eot diff --git a/gestioncof/static/fonts/glyphicons-halflings-regular.svg b/cof/static/fonts/glyphicons-halflings-regular.svg similarity index 100% rename from gestioncof/static/fonts/glyphicons-halflings-regular.svg rename to cof/static/fonts/glyphicons-halflings-regular.svg diff --git a/gestioncof/static/fonts/glyphicons-halflings-regular.ttf b/cof/static/fonts/glyphicons-halflings-regular.ttf similarity index 100% rename from gestioncof/static/fonts/glyphicons-halflings-regular.ttf rename to cof/static/fonts/glyphicons-halflings-regular.ttf diff --git a/gestioncof/static/fonts/glyphicons-halflings-regular.woff b/cof/static/fonts/glyphicons-halflings-regular.woff similarity index 100% rename from gestioncof/static/fonts/glyphicons-halflings-regular.woff rename to cof/static/fonts/glyphicons-halflings-regular.woff diff --git a/gestioncof/static/fonts/glyphicons-halflings-regular.woff2 b/cof/static/fonts/glyphicons-halflings-regular.woff2 similarity index 100% rename from gestioncof/static/fonts/glyphicons-halflings-regular.woff2 rename to cof/static/fonts/glyphicons-halflings-regular.woff2 diff --git a/gestioncof/static/images/no.png b/cof/static/images/no.png similarity index 100% rename from gestioncof/static/images/no.png rename to cof/static/images/no.png diff --git a/gestioncof/static/images/none.png b/cof/static/images/none.png similarity index 100% rename from gestioncof/static/images/none.png rename to cof/static/images/none.png diff --git a/gestioncof/static/images/yes.png b/cof/static/images/yes.png similarity index 100% rename from gestioncof/static/images/yes.png rename to cof/static/images/yes.png diff --git a/gestioncof/static/js/bootstrap.min.js b/cof/static/js/bootstrap.min.js similarity index 100% rename from gestioncof/static/js/bootstrap.min.js rename to cof/static/js/bootstrap.min.js diff --git a/gestioncof/static/js/joequery-Stupid-Table-Plugin/LICENSE b/cof/static/js/joequery-Stupid-Table-Plugin/LICENSE similarity index 100% rename from gestioncof/static/js/joequery-Stupid-Table-Plugin/LICENSE rename to cof/static/js/joequery-Stupid-Table-Plugin/LICENSE diff --git a/gestioncof/static/js/joequery-Stupid-Table-Plugin/README.md b/cof/static/js/joequery-Stupid-Table-Plugin/README.md similarity index 100% rename from gestioncof/static/js/joequery-Stupid-Table-Plugin/README.md rename to cof/static/js/joequery-Stupid-Table-Plugin/README.md diff --git a/gestioncof/static/js/joequery-Stupid-Table-Plugin/examples/basic.html b/cof/static/js/joequery-Stupid-Table-Plugin/examples/basic.html similarity index 100% rename from gestioncof/static/js/joequery-Stupid-Table-Plugin/examples/basic.html rename to cof/static/js/joequery-Stupid-Table-Plugin/examples/basic.html diff --git a/gestioncof/static/js/joequery-Stupid-Table-Plugin/examples/colspan.html b/cof/static/js/joequery-Stupid-Table-Plugin/examples/colspan.html similarity index 100% rename from gestioncof/static/js/joequery-Stupid-Table-Plugin/examples/colspan.html rename to cof/static/js/joequery-Stupid-Table-Plugin/examples/colspan.html diff --git a/gestioncof/static/js/joequery-Stupid-Table-Plugin/examples/complex.html b/cof/static/js/joequery-Stupid-Table-Plugin/examples/complex.html similarity index 100% rename from gestioncof/static/js/joequery-Stupid-Table-Plugin/examples/complex.html rename to cof/static/js/joequery-Stupid-Table-Plugin/examples/complex.html diff --git a/gestioncof/static/js/joequery-Stupid-Table-Plugin/examples/large-table.html b/cof/static/js/joequery-Stupid-Table-Plugin/examples/large-table.html similarity index 100% rename from gestioncof/static/js/joequery-Stupid-Table-Plugin/examples/large-table.html rename to cof/static/js/joequery-Stupid-Table-Plugin/examples/large-table.html diff --git a/gestioncof/static/js/joequery-Stupid-Table-Plugin/stupidtable.js b/cof/static/js/joequery-Stupid-Table-Plugin/stupidtable.js similarity index 100% rename from gestioncof/static/js/joequery-Stupid-Table-Plugin/stupidtable.js rename to cof/static/js/joequery-Stupid-Table-Plugin/stupidtable.js diff --git a/gestioncof/static/js/joequery-Stupid-Table-Plugin/stupidtable.min.js b/cof/static/js/joequery-Stupid-Table-Plugin/stupidtable.min.js similarity index 100% rename from gestioncof/static/js/joequery-Stupid-Table-Plugin/stupidtable.min.js rename to cof/static/js/joequery-Stupid-Table-Plugin/stupidtable.min.js diff --git a/gestioncof/static/js/jquery-ui.min.js b/cof/static/js/jquery-ui.min.js similarity index 100% rename from gestioncof/static/js/jquery-ui.min.js rename to cof/static/js/jquery-ui.min.js diff --git a/gestioncof/static/js/jquery.min.js b/cof/static/js/jquery.min.js similarity index 100% rename from gestioncof/static/js/jquery.min.js rename to cof/static/js/jquery.min.js diff --git a/gestioncof/static/js/jquery.ui.touch-punch.min.js b/cof/static/js/jquery.ui.touch-punch.min.js similarity index 100% rename from gestioncof/static/js/jquery.ui.touch-punch.min.js rename to cof/static/js/jquery.ui.touch-punch.min.js diff --git a/gestioncof/templates/404.html b/cof/templates/404.html similarity index 100% rename from gestioncof/templates/404.html rename to cof/templates/404.html diff --git a/gestioncof/templates/500.html b/cof/templates/500.html similarity index 100% rename from gestioncof/templates/500.html rename to cof/templates/500.html diff --git a/gestioncof/templates/autocomplete_user.html b/cof/templates/autocomplete_user.html similarity index 100% rename from gestioncof/templates/autocomplete_user.html rename to cof/templates/autocomplete_user.html diff --git a/gestioncof/templates/base.html b/cof/templates/base.html similarity index 100% rename from gestioncof/templates/base.html rename to cof/templates/base.html diff --git a/gestioncof/templates/base_title.html b/cof/templates/base_title.html similarity index 93% rename from gestioncof/templates/base_title.html rename to cof/templates/base_title.html index 2e9687dd..935648ce 100644 --- a/gestioncof/templates/base_title.html +++ b/cof/templates/base_title.html @@ -1,4 +1,4 @@ -{% extends "gestioncof/base_header.html" %} +{% extends "cof/base_header.html" %} {% block interm_content %} diff --git a/gestioncof/templates/base_title_petitscours.html b/cof/templates/base_title_petitscours.html similarity index 100% rename from gestioncof/templates/base_title_petitscours.html rename to cof/templates/base_title_petitscours.html diff --git a/gestioncof/templates/cof-denied.html b/cof/templates/cof-denied.html similarity index 100% rename from gestioncof/templates/cof-denied.html rename to cof/templates/cof-denied.html diff --git a/gestioncof/templates/gestioncof/banner_update.html b/cof/templates/cof/banner_update.html similarity index 100% rename from gestioncof/templates/gestioncof/banner_update.html rename to cof/templates/cof/banner_update.html diff --git a/gestioncof/templates/gestioncof/base_header.html b/cof/templates/cof/base_header.html similarity index 100% rename from gestioncof/templates/gestioncof/base_header.html rename to cof/templates/cof/base_header.html diff --git a/gestioncof/templates/gestioncof/calendar_subscription.html b/cof/templates/cof/calendar_subscription.html similarity index 100% rename from gestioncof/templates/gestioncof/calendar_subscription.html rename to cof/templates/cof/calendar_subscription.html diff --git a/gestioncof/templates/gestioncof/details_demande_petit_cours.html b/cof/templates/cof/details_demande_petit_cours.html similarity index 100% rename from gestioncof/templates/gestioncof/details_demande_petit_cours.html rename to cof/templates/cof/details_demande_petit_cours.html diff --git a/gestioncof/templates/gestioncof/event.html b/cof/templates/cof/event.html similarity index 100% rename from gestioncof/templates/gestioncof/event.html rename to cof/templates/cof/event.html diff --git a/gestioncof/templates/gestioncof/profile.html b/cof/templates/cof/profile.html similarity index 100% rename from gestioncof/templates/gestioncof/profile.html rename to cof/templates/cof/profile.html diff --git a/gestioncof/templates/gestioncof/registration_form.html b/cof/templates/cof/registration_form.html similarity index 100% rename from gestioncof/templates/gestioncof/registration_form.html rename to cof/templates/cof/registration_form.html diff --git a/gestioncof/templates/gestioncof/registration_post.html b/cof/templates/cof/registration_post.html similarity index 74% rename from gestioncof/templates/gestioncof/registration_post.html rename to cof/templates/cof/registration_post.html index 5eca28c9..0c6dec9c 100644 --- a/gestioncof/templates/gestioncof/registration_post.html +++ b/cof/templates/cof/registration_post.html @@ -3,6 +3,6 @@ {% block realcontent %}

Inscription d'un nouveau membre

- {% include "gestioncof/registration_form.html" %} + {% include "cof/registration_form.html" %}
{% endblock %} diff --git a/gestioncof/templates/gestioncof/survey.html b/cof/templates/cof/survey.html similarity index 100% rename from gestioncof/templates/gestioncof/survey.html rename to cof/templates/cof/survey.html diff --git a/gestioncof/templates/gestioncof/traitement_demande_petit_cours.html b/cof/templates/cof/traitement_demande_petit_cours.html similarity index 100% rename from gestioncof/templates/gestioncof/traitement_demande_petit_cours.html rename to cof/templates/cof/traitement_demande_petit_cours.html diff --git a/gestioncof/templates/gestioncof/traitement_demande_petit_cours_autre_niveau.html b/cof/templates/cof/traitement_demande_petit_cours_autre_niveau.html similarity index 100% rename from gestioncof/templates/gestioncof/traitement_demande_petit_cours_autre_niveau.html rename to cof/templates/cof/traitement_demande_petit_cours_autre_niveau.html diff --git a/gestioncof/templates/gestioncof/traitement_demande_petit_cours_success.html b/cof/templates/cof/traitement_demande_petit_cours_success.html similarity index 100% rename from gestioncof/templates/gestioncof/traitement_demande_petit_cours_success.html rename to cof/templates/cof/traitement_demande_petit_cours_success.html diff --git a/gestioncof/templates/gestioncof/utile_cof.html b/cof/templates/cof/utile_cof.html similarity index 100% rename from gestioncof/templates/gestioncof/utile_cof.html rename to cof/templates/cof/utile_cof.html diff --git a/gestioncof/templates/demande-petit-cours-raw.html b/cof/templates/demande-petit-cours-raw.html similarity index 100% rename from gestioncof/templates/demande-petit-cours-raw.html rename to cof/templates/demande-petit-cours-raw.html diff --git a/gestioncof/templates/demande-petit-cours.html b/cof/templates/demande-petit-cours.html similarity index 100% rename from gestioncof/templates/demande-petit-cours.html rename to cof/templates/demande-petit-cours.html diff --git a/gestioncof/templates/details_demande_petit_cours_infos.html b/cof/templates/details_demande_petit_cours_infos.html similarity index 100% rename from gestioncof/templates/details_demande_petit_cours_infos.html rename to cof/templates/details_demande_petit_cours_infos.html diff --git a/gestioncof/templates/error.html b/cof/templates/error.html similarity index 100% rename from gestioncof/templates/error.html rename to cof/templates/error.html diff --git a/gestioncof/templates/event_status.html b/cof/templates/event_status.html similarity index 93% rename from gestioncof/templates/event_status.html rename to cof/templates/event_status.html index 40bda7db..ac62ef3a 100644 --- a/gestioncof/templates/event_status.html +++ b/cof/templates/event_status.html @@ -4,7 +4,7 @@ {% block page_size %}col-sm-8{% endblock %} {% block realcontent %} -

Événement: {{ event.title }}{% if user.is_staff %} Administration{% endif %}

+

Événement: {{ event.title }}{% if user.is_staff %} Administration{% endif %}

{% if event.details %}

{{ event.details }}


diff --git a/gestioncof/templates/home.html b/cof/templates/home.html similarity index 99% rename from gestioncof/templates/home.html rename to cof/templates/home.html index b14c0a82..5a240583 100644 --- a/gestioncof/templates/home.html +++ b/cof/templates/home.html @@ -1,4 +1,4 @@ -{% extends "gestioncof/base_header.html" %} +{% extends "cof/base_header.html" %} {% load wagtailcore_tags %} {% block homelink %} diff --git a/gestioncof/templates/inscription-petit-cours-formset.html b/cof/templates/inscription-petit-cours-formset.html similarity index 100% rename from gestioncof/templates/inscription-petit-cours-formset.html rename to cof/templates/inscription-petit-cours-formset.html diff --git a/gestioncof/templates/inscription-petit-cours.html b/cof/templates/inscription-petit-cours.html similarity index 100% rename from gestioncof/templates/inscription-petit-cours.html rename to cof/templates/inscription-petit-cours.html diff --git a/gestioncof/templates/liste_clubs.html b/cof/templates/liste_clubs.html similarity index 100% rename from gestioncof/templates/liste_clubs.html rename to cof/templates/liste_clubs.html diff --git a/gestioncof/templates/liste_mails.html b/cof/templates/liste_mails.html similarity index 100% rename from gestioncof/templates/liste_mails.html rename to cof/templates/liste_mails.html diff --git a/gestioncof/templates/login.html b/cof/templates/login.html similarity index 100% rename from gestioncof/templates/login.html rename to cof/templates/login.html diff --git a/gestioncof/templates/login_switch.html b/cof/templates/login_switch.html similarity index 100% rename from gestioncof/templates/login_switch.html rename to cof/templates/login_switch.html diff --git a/gestioncof/templates/membres_clubs.html b/cof/templates/membres_clubs.html similarity index 100% rename from gestioncof/templates/membres_clubs.html rename to cof/templates/membres_clubs.html diff --git a/gestioncof/templates/petits_cours_demandes_list.html b/cof/templates/petits_cours_demandes_list.html similarity index 100% rename from gestioncof/templates/petits_cours_demandes_list.html rename to cof/templates/petits_cours_demandes_list.html diff --git a/gestioncof/templates/registration.html b/cof/templates/registration.html similarity index 100% rename from gestioncof/templates/registration.html rename to cof/templates/registration.html diff --git a/gestioncof/templates/registration/password_change_done.html b/cof/templates/registration/password_change_done.html similarity index 100% rename from gestioncof/templates/registration/password_change_done.html rename to cof/templates/registration/password_change_done.html diff --git a/gestioncof/templates/registration/password_change_form.html b/cof/templates/registration/password_change_form.html similarity index 100% rename from gestioncof/templates/registration/password_change_form.html rename to cof/templates/registration/password_change_form.html diff --git a/gestioncof/templates/survey_status.html b/cof/templates/survey_status.html similarity index 93% rename from gestioncof/templates/survey_status.html rename to cof/templates/survey_status.html index 0e630c6e..d4898041 100644 --- a/gestioncof/templates/survey_status.html +++ b/cof/templates/survey_status.html @@ -4,7 +4,7 @@ {% block page_size %}col-sm-8{% endblock %} {% block realcontent %} -

Sondage: {{ survey.title }}{% if user.is_staff %} Administration{% endif %}

+

Sondage: {{ survey.title }}{% if user.is_staff %} Administration{% endif %}

{% if survey.details %}

{{ survey.details }}


diff --git a/gestioncof/templates/tristate_js.html b/cof/templates/tristate_js.html similarity index 100% rename from gestioncof/templates/tristate_js.html rename to cof/templates/tristate_js.html diff --git a/gestioncof/templates/utile_bda.html b/cof/templates/utile_bda.html similarity index 100% rename from gestioncof/templates/utile_bda.html rename to cof/templates/utile_bda.html diff --git a/gestioncof/management/__init__.py b/cof/templatetags/__init__.py similarity index 100% rename from gestioncof/management/__init__.py rename to cof/templatetags/__init__.py diff --git a/gestioncof/templatetags/utils.py b/cof/templatetags/utils.py similarity index 100% rename from gestioncof/templatetags/utils.py rename to cof/templatetags/utils.py diff --git a/gestioncof/management/commands/__init__.py b/cof/tests/__init__.py similarity index 100% rename from gestioncof/management/commands/__init__.py rename to cof/tests/__init__.py diff --git a/gestioncof/tests/test_legacy.py b/cof/tests/test_legacy.py similarity index 95% rename from gestioncof/tests/test_legacy.py rename to cof/tests/test_legacy.py index 85673edd..30531153 100644 --- a/gestioncof/tests/test_legacy.py +++ b/cof/tests/test_legacy.py @@ -7,7 +7,7 @@ Replace this with more appropriate tests for your application. from django.test import TestCase -from gestioncof.models import CofProfile, User +from cof.models import CofProfile, User class SimpleTest(TestCase): diff --git a/gestioncof/tests/test_views.py b/cof/tests/test_views.py similarity index 99% rename from gestioncof/tests/test_views.py rename to cof/tests/test_views.py index f6dd7eb9..e1dbef42 100644 --- a/gestioncof/tests/test_views.py +++ b/cof/tests/test_views.py @@ -9,10 +9,10 @@ from django.test import Client, TestCase from django.urls import reverse from bda.models import Salle, Tirage -from gestioncof.models import ( +from cof.models import ( CalendarSubscription, Club, Event, Survey, SurveyAnswer ) -from gestioncof.tests.testcases import ViewTestCaseMixin +from cof.tests.testcases import ViewTestCaseMixin from .utils import create_member, create_root, create_user diff --git a/gestioncof/tests/testcases.py b/cof/tests/testcases.py similarity index 100% rename from gestioncof/tests/testcases.py rename to cof/tests/testcases.py diff --git a/gestioncof/tests/utils.py b/cof/tests/utils.py similarity index 100% rename from gestioncof/tests/utils.py rename to cof/tests/utils.py diff --git a/cof/urls.py b/cof/urls.py index a1d0c9bf..8fe5149f 100644 --- a/cof/urls.py +++ b/cof/urls.py @@ -1,116 +1,67 @@ -""" -Fichier principal de configuration des urls du projet GestioCOF -""" +from django.conf.urls import url +from cof.petits_cours_views import DemandeListView, DemandeDetailView +from cof import views, petits_cours_views +from cof.decorators import buro_required -from django.conf import settings -from django.conf.urls import include, url -from django.conf.urls.static import static -from django.contrib import admin -from django.views.generic.base import TemplateView -from django.contrib.auth import views as django_views -from django_cas_ng import views as django_cas_views - -from wagtail.wagtailadmin import urls as wagtailadmin_urls -from wagtail.wagtailcore import urls as wagtail_urls -from wagtail.wagtaildocs import urls as wagtaildocs_urls - -from gestioncof import views as gestioncof_views, csv_views -from gestioncof.urls import export_patterns, petitcours_patterns, \ - surveys_patterns, events_patterns, calendar_patterns, \ - clubs_patterns -from gestioncof.autocomplete import autocomplete - -admin.autodiscover() - -urlpatterns = [ - # Page d'accueil - url(r'^$', gestioncof_views.home, name='home'), - # Le BdA - url(r'^bda/', include('bda.urls')), - # Les exports - url(r'^export/', include(export_patterns)), - # Les petits cours - url(r'^petitcours/', include(petitcours_patterns)), - # Les sondages - url(r'^survey/', include(surveys_patterns)), - # Evenements - url(r'^event/', include(events_patterns)), - # Calendrier - url(r'^calendar/', include(calendar_patterns)), - # Clubs - url(r'^clubs/', include(clubs_patterns)), - # Authentification - url(r'^cof/denied$', TemplateView.as_view(template_name='cof-denied.html'), - name="cof-denied"), - url(r'^cas/login$', django_cas_views.login, name="cas_login_view"), - url(r'^cas/logout$', django_cas_views.logout), - url(r'^outsider/login$', gestioncof_views.login_ext, - name="ext_login_view"), - url(r'^outsider/logout$', django_views.logout, {'next_page': 'home'}), - url(r'^login$', gestioncof_views.login, name="cof-login"), - url(r'^logout$', gestioncof_views.logout, name="cof-logout"), - # Infos persos - url(r'^profile$', gestioncof_views.profile, - name='profile'), - url(r'^outsider/password-change$', django_views.password_change, - name='password_change'), - url(r'^outsider/password-change-done$', - django_views.password_change_done, - name='password_change_done'), - # Inscription d'un nouveau membre - url(r'^registration$', gestioncof_views.registration, - name='registration'), - url(r'^registration/clipper/(?P[\w-]+)/' - r'(?P.*)$', - gestioncof_views.registration_form2, name="clipper-registration"), - url(r'^registration/user/(?P.+)$', - gestioncof_views.registration_form2, name="user-registration"), - url(r'^registration/empty$', gestioncof_views.registration_form2, - name="empty-registration"), - # Autocompletion - url(r'^autocomplete/registration$', autocomplete, - name="cof.registration.autocomplete"), - url(r'^user/autocomplete$', gestioncof_views.user_autocomplete, - name='cof-user-autocomplete'), - # Interface admin - url(r'^admin/logout/', gestioncof_views.logout), - url(r'^admin/doc/', include('django.contrib.admindocs.urls')), - url(r'^admin/(?P[\d\w]+)/(?P[\d\w]+)/csv/', - csv_views.admin_list_export, - {'fields': ['username', ]}), - url(r'^admin/', include(admin.site.urls)), - # Liens utiles du COF et du BdA - url(r'^utile_cof$', gestioncof_views.utile_cof, - name='utile_cof'), - url(r'^utile_bda$', gestioncof_views.utile_bda, - name='utile_bda'), - url(r'^utile_bda/bda_diff$', gestioncof_views.liste_bdadiff, - name="ml_diffbda"), - url(r'^utile_cof/diff_cof$', gestioncof_views.liste_diffcof, - name='ml_diffcof'), - url(r'^utile_bda/bda_revente$', gestioncof_views.liste_bdarevente, - name="ml_bda_revente"), - url(r'^k-fet/', include('kfet.urls')), - url(r'^cms/', include(wagtailadmin_urls)), - url(r'^documents/', include(wagtaildocs_urls)), - # djconfig - url(r"^config", gestioncof_views.ConfigUpdate.as_view(), - name='config.edit'), +export_patterns = [ + url(r'^members$', views.export_members, + name='cof.membres_export'), + url(r'^mega/avecremarques$', views.export_mega_remarksonly, + 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.+)$', views.export_mega_bytype), + url(r'^mega$', views.export_mega, + name='cof.mega_export'), ] -if 'debug_toolbar' in settings.INSTALLED_APPS: - import debug_toolbar - urlpatterns += [ - url(r'^__debug__/', include(debug_toolbar.urls)), - ] - -if settings.DEBUG: - # Si on est en production, MEDIA_ROOT est servi par Apache. - # Il faut dire à Django de servir MEDIA_ROOT lui-même en développement. - urlpatterns += static(settings.MEDIA_URL, - document_root=settings.MEDIA_ROOT) - -# Wagtail for uncatched -urlpatterns += [ - url(r'', include(wagtail_urls)), +petitcours_patterns = [ + url(r'^inscription$', petits_cours_views.inscription, + name='petits-cours-inscription'), + url(r'^demande$', petits_cours_views.demande, + name='petits-cours-demande'), + url(r'^demande-raw$', petits_cours_views.demande_raw, + name='petits-cours-demande-raw'), + url(r'^demandes$', + buro_required(DemandeListView.as_view()), + name='petits-cours-demandes-list'), + url(r'^demandes/(?P\d+)$', + buro_required(DemandeDetailView.as_view()), + name='petits-cours-demande-details'), + url(r'^demandes/(?P\d+)/traitement$', + petits_cours_views.traitement, + name='petits-cours-demande-traitement'), + url(r'^demandes/(?P\d+)/retraitement$', + petits_cours_views.retraitement, + name='petits-cours-demande-retraitement'), +] + +surveys_patterns = [ + url(r'^(?P\d+)/status$', views.survey_status, + name='survey.details.status'), + url(r'^(?P\d+)$', views.survey, + name='survey.details'), +] + +events_patterns = [ + url(r'^(?P\d+)$', views.event, + name='event.details'), + url(r'^(?P\d+)/status$', views.event_status, + name='event.details.status'), +] + +calendar_patterns = [ + url(r'^subscription$', views.calendar, + name='calendar'), + url(r'^(?P[a-z0-9-]+)/calendar.ics$', views.calendar_ics, + name='calendar.ics'), +] + +clubs_patterns = [ + url(r'^membres/(?P\w+)', views.membres_club, name='membres-club'), + url(r'^liste', views.liste_clubs, name='liste-clubs'), + url(r'^change_respo/(?P\w+)/(?P\d+)', + views.change_respo, name='change-respo'), ] diff --git a/gestioncof/views.py b/cof/views.py similarity index 96% rename from gestioncof/views.py rename to cof/views.py index d77794bb..686c1a0d 100644 --- a/gestioncof/views.py +++ b/cof/views.py @@ -23,19 +23,18 @@ from django_cas_ng.views import logout as cas_logout_view from utils.views.autocomplete import Select2QuerySetView -from gestioncof.models import Survey, SurveyAnswer, SurveyQuestion, \ +from cof.models import Survey, SurveyAnswer, SurveyQuestion, \ SurveyQuestionAnswer -from gestioncof.models import Event, EventRegistration, EventOption, \ +from cof.models import Event, EventRegistration, EventOption, \ EventOptionChoice -from gestioncof.models import EventCommentField, EventCommentValue, \ +from cof.models import EventCommentField, EventCommentValue, \ CalendarSubscription -from gestioncof.models import CofProfile, Club -from gestioncof.decorators import buro_required, cof_required -from gestioncof.forms import ( - UserForm, ProfileForm, - EventStatusFilterForm, SurveyForm, SurveyStatusFilterForm, +from cof.models import CofProfile, Club +from cof.decorators import buro_required, cof_required +from cof.forms import ( + UserForm, ProfileForm, EventStatusFilterForm, SurveyForm, SurveyStatusFilterForm, RegistrationUserForm, RegistrationProfileForm, EventForm, CalendarForm, - EventFormset, RegistrationPassUserForm, ClubsForm, GestioncofConfigForm + EventFormset, RegistrationPassUserForm, ClubsForm, CofConfigForm ) from bda.models import Tirage, Spectacle @@ -178,7 +177,7 @@ def survey(request, survey_id): "Votre réponse a bien été enregistrée ! Vous " "pouvez cependant la modifier jusqu'à la fin " "du sondage.") - return render(request, "gestioncof/survey.html", { + return render(request, "cof/survey.html", { "survey": survey, "form": form, "current_answer": current_answer @@ -247,7 +246,7 @@ def event(request, event_id): messages.success(request, "Votre inscription a bien été enregistrée ! " "Vous pouvez cependant la modifier jusqu'à " "la fin des inscriptions.") - return render(request, "gestioncof/event.html", + return render(request, "cof/event.html", {"event": event, "form": form}) @@ -348,7 +347,7 @@ def profile(request): _("Votre profil a été mis à jour avec succès !") ) context = {"user_form": user_form, "profile_form": profile_form} - return render(request, "gestioncof/profile.html", context) + return render(request, "cof/profile.html", context) def registration_set_ro_fields(user_form, profile_form): @@ -410,7 +409,7 @@ def registration_form2(request, login_clipper=None, username=None, profile_form = RegistrationProfileForm() event_formset = EventFormset(events=events, prefix='events') clubs_form = ClubsForm() - return render(request, "gestioncof/registration_form.html", + return render(request, "cof/registration_form.html", {"member": member, "login_clipper": login_clipper, "user_form": user_form, "profile_form": profile_form, @@ -523,7 +522,7 @@ def registration(request): msg += "\nIl est désormais membre du COF n°{:d} !".format( member.profile.id) messages.success(request, msg, extra_tags='safe') - return render(request, "gestioncof/registration_post.html", + return render(request, "cof/registration_post.html", {"user_form": user_form, "profile_form": profile_form, "member": member, @@ -700,7 +699,7 @@ def export_mega(request): @buro_required def utile_cof(request): - return render(request, "gestioncof/utile_cof.html", {}) + return render(request, "cof/utile_cof.html", {}) @buro_required @@ -751,15 +750,15 @@ def calendar(request): form.save_m2m() messages.success(request, "Calendrier mis à jour avec succès.") - return render(request, "gestioncof/calendar_subscription.html", + return render(request, "cof/calendar_subscription.html", {'form': form, 'token': str(subscription.token)}) else: messages.error(request, "Formulaire incorrect.") - return render(request, "gestioncof/calendar_subscription.html", + return render(request, "cof/calendar_subscription.html", {'form': form}) else: - return render(request, "gestioncof/calendar_subscription.html", + return render(request, "cof/calendar_subscription.html", {'form': CalendarForm(instance=instance), 'token': instance.token if instance else None}) @@ -800,8 +799,8 @@ def calendar_ics(request, token): class ConfigUpdate(FormView): - form_class = GestioncofConfigForm - template_name = "gestioncof/banner_update.html" + form_class = CofConfigForm + template_name = "cof/banner_update.html" success_url = reverse_lazy("home") def dispatch(self, request, *args, **kwargs): diff --git a/gestioncof/widgets.py b/cof/widgets.py similarity index 100% rename from gestioncof/widgets.py rename to cof/widgets.py diff --git a/gestioncof/migrations/__init__.py b/gestioCOF/__init__.py similarity index 100% rename from gestioncof/migrations/__init__.py rename to gestioCOF/__init__.py diff --git a/cof/asgi.py b/gestioCOF/asgi.py similarity index 65% rename from cof/asgi.py rename to gestioCOF/asgi.py index a34621c7..40a86e06 100644 --- a/cof/asgi.py +++ b/gestioCOF/asgi.py @@ -2,6 +2,6 @@ import os from channels.asgi import get_channel_layer if "DJANGO_SETTINGS_MODULE" not in os.environ: - os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cof.settings") + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "gestioCOF.settings") channel_layer = get_channel_layer() diff --git a/gestioncof/templatetags/__init__.py b/gestioCOF/locale/__init__.py similarity index 100% rename from gestioncof/templatetags/__init__.py rename to gestioCOF/locale/__init__.py diff --git a/gestioncof/tests/__init__.py b/gestioCOF/locale/fr/__init__.py similarity index 100% rename from gestioncof/tests/__init__.py rename to gestioCOF/locale/fr/__init__.py diff --git a/cof/locale/fr/formats.py b/gestioCOF/locale/fr/formats.py similarity index 100% rename from cof/locale/fr/formats.py rename to gestioCOF/locale/fr/formats.py diff --git a/cof/routing.py b/gestioCOF/routing.py similarity index 100% rename from cof/routing.py rename to gestioCOF/routing.py diff --git a/cof/settings/.gitignore b/gestioCOF/settings/.gitignore similarity index 100% rename from cof/settings/.gitignore rename to gestioCOF/settings/.gitignore diff --git a/gestioCOF/settings/__init__.py b/gestioCOF/settings/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/cof/settings/common.py b/gestioCOF/settings/common.py similarity index 95% rename from cof/settings/common.py rename to gestioCOF/settings/common.py index 02c796ad..21b3886f 100644 --- a/cof/settings/common.py +++ b/gestioCOF/settings/common.py @@ -1,5 +1,5 @@ """ -Django common settings for cof project. +Django common settings for gestioCOF project. Everything which is supposed to be identical between the production server and the local development server should be here. @@ -50,14 +50,14 @@ BASE_DIR = os.path.dirname( os.path.dirname(os.path.dirname(os.path.abspath(__file__))) ) -TESTING = sys.argv[1] == 'test' +TESTING = len(sys.argv) > 1 and sys.argv[1] == 'test' # Application definition INSTALLED_APPS = [ 'shared', - 'gestioncof', + 'cof', # Must be before 'django.contrib.admin'. # https://django-autocomplete-light.readthedocs.io/en/master/install.html @@ -119,7 +119,7 @@ MIDDLEWARE = [ 'wagtail.wagtailredirects.middleware.RedirectMiddleware', ] -ROOT_URLCONF = 'cof.urls' +ROOT_URLCONF = 'gestioCOF.urls' TEMPLATES = [ { @@ -137,7 +137,7 @@ TEMPLATES = [ 'django.template.context_processors.static', 'wagtailmenus.context_processors.wagtailmenus', 'djconfig.context_processors.config', - 'gestioncof.shared.context_processor', + 'cof.shared.context_processor', 'kfet.auth.context_processors.temporary_auth', 'kfet.context_processors.config', ], @@ -200,7 +200,7 @@ CAS_EMAIL_FORMAT = "%s@clipper.ens.fr" AUTHENTICATION_BACKENDS = ( 'django.contrib.auth.backends.ModelBackend', - 'gestioncof.shared.COFCASBackend', + 'cof.shared.COFCASBackend', 'kfet.auth.backends.GenericBackend', ) @@ -245,11 +245,11 @@ CHANNEL_LAYERS = { port=REDIS_PORT, db=REDIS_DB) )], }, - "ROUTING": "cof.routing.routing", + "ROUTING": "gestioCOF.routing.routing", } } -FORMAT_MODULE_PATH = 'cof.locale' +FORMAT_MODULE_PATH = 'gestioCOF.locale' # Wagtail settings diff --git a/cof/settings/dev.py b/gestioCOF/settings/dev.py similarity index 95% rename from cof/settings/dev.py rename to gestioCOF/settings/dev.py index 114f37da..2aad7a49 100644 --- a/cof/settings/dev.py +++ b/gestioCOF/settings/dev.py @@ -1,5 +1,5 @@ """ -Django development settings for the cof project. +Django development settings for the gestioCOF project. The settings that are not listed here are imported from .common """ diff --git a/cof/settings/local.py b/gestioCOF/settings/local.py similarity index 87% rename from cof/settings/local.py rename to gestioCOF/settings/local.py index 6e1f0802..5a9a32d0 100644 --- a/cof/settings/local.py +++ b/gestioCOF/settings/local.py @@ -1,5 +1,5 @@ """ -Django local settings for the cof project. +Django local settings for the gestioCOF project. The settings that are not listed here are imported from .common """ @@ -28,7 +28,7 @@ CACHES = { CHANNEL_LAYERS = { "default": { "BACKEND": "asgiref.inmemory.ChannelLayer", - "ROUTING": "cof.routing.routing", + "ROUTING": "gestioCOF.routing.routing", } } diff --git a/cof/settings/prod.py b/gestioCOF/settings/prod.py similarity index 91% rename from cof/settings/prod.py rename to gestioCOF/settings/prod.py index fcdb3fdb..9bf46975 100644 --- a/cof/settings/prod.py +++ b/gestioCOF/settings/prod.py @@ -1,5 +1,5 @@ """ -Django development settings for the cof project. +Django development settings for the gestioCOF project. The settings that are not listed here are imported from .common """ diff --git a/cof/settings/secret_example.py b/gestioCOF/settings/secret_example.py similarity index 100% rename from cof/settings/secret_example.py rename to gestioCOF/settings/secret_example.py diff --git a/gestioCOF/urls.py b/gestioCOF/urls.py new file mode 100644 index 00000000..bce7d8ed --- /dev/null +++ b/gestioCOF/urls.py @@ -0,0 +1,116 @@ +""" +Fichier principal de configuration des urls du projet GestioCOF +""" + +from django.conf import settings +from django.conf.urls import include, url +from django.conf.urls.static import static +from django.contrib import admin +from django.views.generic.base import TemplateView +from django.contrib.auth import views as django_views +from django_cas_ng import views as django_cas_views + +from wagtail.wagtailadmin import urls as wagtailadmin_urls +from wagtail.wagtailcore import urls as wagtail_urls +from wagtail.wagtaildocs import urls as wagtaildocs_urls + +from cof import views as cof_views, csv_views +from cof.urls import export_patterns, petitcours_patterns, \ + surveys_patterns, events_patterns, calendar_patterns, \ + clubs_patterns +from cof.autocomplete import autocomplete + +admin.autodiscover() + +urlpatterns = [ + # Page d'accueil + url(r'^$', cof_views.home, name='home'), + # Le BdA + url(r'^bda/', include('bda.urls')), + # Les exports + url(r'^export/', include(export_patterns)), + # Les petits cours + url(r'^petitcours/', include(petitcours_patterns)), + # Les sondages + url(r'^survey/', include(surveys_patterns)), + # Evenements + url(r'^event/', include(events_patterns)), + # Calendrier + url(r'^calendar/', include(calendar_patterns)), + # Clubs + url(r'^clubs/', include(clubs_patterns)), + # Authentification + url(r'^cof/denied$', TemplateView.as_view(template_name='cof-denied.html'), + name="cof-denied"), + url(r'^cas/login$', django_cas_views.login, name="cas_login_view"), + url(r'^cas/logout$', django_cas_views.logout), + url(r'^outsider/login$', cof_views.login_ext, + name="ext_login_view"), + url(r'^outsider/logout$', django_views.logout, {'next_page': 'home'}), + url(r'^login$', cof_views.login, name="cof-login"), + url(r'^logout$', cof_views.logout, name="cof-logout"), + # Infos persos + url(r'^profile$', cof_views.profile, + name='profile'), + url(r'^outsider/password-change$', django_views.password_change, + name='password_change'), + url(r'^outsider/password-change-done$', + django_views.password_change_done, + name='password_change_done'), + # Inscription d'un nouveau membre + url(r'^registration$', cof_views.registration, + name='registration'), + url(r'^registration/clipper/(?P[\w-]+)/' + r'(?P.*)$', + cof_views.registration_form2, name="clipper-registration"), + url(r'^registration/user/(?P.+)$', + cof_views.registration_form2, name="user-registration"), + url(r'^registration/empty$', cof_views.registration_form2, + name="empty-registration"), + # Autocompletion + url(r'^autocomplete/registration$', autocomplete, + name="cof.registration.autocomplete"), + url(r'^user/autocomplete$', cof_views.user_autocomplete, + name='cof-user-autocomplete'), + # Interface admin + url(r'^admin/logout/', cof_views.logout), + url(r'^admin/doc/', include('django.contrib.admindocs.urls')), + url(r'^admin/(?P[\d\w]+)/(?P[\d\w]+)/csv/', + csv_views.admin_list_export, + {'fields': ['username', ]}), + url(r'^admin/', include(admin.site.urls)), + # Liens utiles du COF et du BdA + url(r'^utile_cof$', cof_views.utile_cof, + name='utile_cof'), + url(r'^utile_bda$', cof_views.utile_bda, + name='utile_bda'), + url(r'^utile_bda/bda_diff$', cof_views.liste_bdadiff, + name="ml_diffbda"), + url(r'^utile_cof/diff_cof$', cof_views.liste_diffcof, + name='ml_diffcof'), + url(r'^utile_bda/bda_revente$', cof_views.liste_bdarevente, + name="ml_bda_revente"), + url(r'^k-fet/', include('kfet.urls')), + url(r'^cms/', include(wagtailadmin_urls)), + url(r'^documents/', include(wagtaildocs_urls)), + # djconfig + url(r"^config", cof_views.ConfigUpdate.as_view(), + name='config.edit'), +] + +if 'debug_toolbar' in settings.INSTALLED_APPS: + import debug_toolbar + urlpatterns += [ + url(r'^__debug__/', include(debug_toolbar.urls)), + ] + +if settings.DEBUG: + # Si on est en production, MEDIA_ROOT est servi par Apache. + # Il faut dire à Django de servir MEDIA_ROOT lui-même en développement. + urlpatterns += static(settings.MEDIA_URL, + document_root=settings.MEDIA_ROOT) + +# Wagtail for uncatched +urlpatterns += [ + url(r'', include(wagtail_urls)), +] diff --git a/gestioncof/__init__.py b/gestioncof/__init__.py deleted file mode 100644 index b77fdb94..00000000 --- a/gestioncof/__init__.py +++ /dev/null @@ -1 +0,0 @@ -default_app_config = 'gestioncof.apps.GestioncofConfig' diff --git a/gestioncof/urls.py b/gestioncof/urls.py deleted file mode 100644 index f8ce8f6d..00000000 --- a/gestioncof/urls.py +++ /dev/null @@ -1,67 +0,0 @@ -from django.conf.urls import url -from gestioncof.petits_cours_views import DemandeListView, DemandeDetailView -from gestioncof import views, petits_cours_views -from gestioncof.decorators import buro_required - -export_patterns = [ - url(r'^members$', views.export_members, - name='cof.membres_export'), - url(r'^mega/avecremarques$', views.export_mega_remarksonly, - 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.+)$', views.export_mega_bytype), - url(r'^mega$', views.export_mega, - name='cof.mega_export'), -] - -petitcours_patterns = [ - url(r'^inscription$', petits_cours_views.inscription, - name='petits-cours-inscription'), - url(r'^demande$', petits_cours_views.demande, - name='petits-cours-demande'), - url(r'^demande-raw$', petits_cours_views.demande_raw, - name='petits-cours-demande-raw'), - url(r'^demandes$', - buro_required(DemandeListView.as_view()), - name='petits-cours-demandes-list'), - url(r'^demandes/(?P\d+)$', - buro_required(DemandeDetailView.as_view()), - name='petits-cours-demande-details'), - url(r'^demandes/(?P\d+)/traitement$', - petits_cours_views.traitement, - name='petits-cours-demande-traitement'), - url(r'^demandes/(?P\d+)/retraitement$', - petits_cours_views.retraitement, - name='petits-cours-demande-retraitement'), -] - -surveys_patterns = [ - url(r'^(?P\d+)/status$', views.survey_status, - name='survey.details.status'), - url(r'^(?P\d+)$', views.survey, - name='survey.details'), -] - -events_patterns = [ - url(r'^(?P\d+)$', views.event, - name='event.details'), - url(r'^(?P\d+)/status$', views.event_status, - name='event.details.status'), -] - -calendar_patterns = [ - url(r'^subscription$', views.calendar, - name='calendar'), - url(r'^(?P[a-z0-9-]+)/calendar.ics$', views.calendar_ics, - name='calendar.ics'), -] - -clubs_patterns = [ - url(r'^membres/(?P\w+)', views.membres_club, name='membres-club'), - url(r'^liste', views.liste_clubs, name='liste-clubs'), - url(r'^change_respo/(?P\w+)/(?P\d+)', - views.change_respo, name='change-respo'), -] diff --git a/kfet/auth/tests.py b/kfet/auth/tests.py index 62f870e8..a0dd6969 100644 --- a/kfet/auth/tests.py +++ b/kfet/auth/tests.py @@ -134,7 +134,7 @@ class GenericBackendTests(TestCase): class GenericLoginViewTests(TestCase): def setUp(self): - patcher_messages = mock.patch('gestioncof.signals.messages') + patcher_messages = mock.patch('cof.signals.messages') patcher_messages.start() self.addCleanup(patcher_messages.stop) @@ -279,7 +279,7 @@ class GenericLoginViewTests(TestCase): class TemporaryAuthTests(TestCase): def setUp(self): - patcher_messages = mock.patch('gestioncof.signals.messages') + patcher_messages = mock.patch('cof.signals.messages') patcher_messages.start() self.addCleanup(patcher_messages.stop) diff --git a/kfet/autocomplete.py b/kfet/autocomplete.py index 0d1904d6..b123d13a 100644 --- a/kfet/autocomplete.py +++ b/kfet/autocomplete.py @@ -4,7 +4,7 @@ from django.http import Http404 from django.db.models import Q from django.conf import settings -from gestioncof.models import User +from cof.models import User from kfet.decorators import teamkfet_required from kfet.models import Account diff --git a/kfet/forms.py b/kfet/forms.py index 522f20de..13a6f39d 100644 --- a/kfet/forms.py +++ b/kfet/forms.py @@ -13,7 +13,7 @@ from kfet.models import ( Account, Checkout, Article, OperationGroup, Operation, CheckoutStatement, ArticleCategory, AccountNegative, Transfer, TransferGroup, Supplier) -from gestioncof.models import CofProfile +from cof.models import CofProfile from .auth.forms import UserGroupForm # noqa diff --git a/kfet/management/commands/loadkfetdevdata.py b/kfet/management/commands/loadkfetdevdata.py index 6dd25f29..6cf464c8 100644 --- a/kfet/management/commands/loadkfetdevdata.py +++ b/kfet/management/commands/loadkfetdevdata.py @@ -10,8 +10,8 @@ from django.utils import timezone from django.contrib.auth.models import User, Group, Permission, ContentType from django.core.management import call_command -from gestioncof.management.base import MyBaseCommand -from gestioncof.models import CofProfile +from cof.management.base import MyBaseCommand +from cof.models import CofProfile from kfet.models import (Account, Checkout, CheckoutStatement, Supplier, SupplierArticle, Article) diff --git a/kfet/migrations/0001_initial.py b/kfet/migrations/0001_initial.py index 8f9b14fa..84d81205 100644 --- a/kfet/migrations/0001_initial.py +++ b/kfet/migrations/0001_initial.py @@ -10,7 +10,7 @@ import datetime class Migration(migrations.Migration): dependencies = [ - ('gestioncof', '0007_alter_club'), + ('cof', '0007_alter_club'), ] operations = [ @@ -24,7 +24,7 @@ class Migration(migrations.Migration): ('promo', models.IntegerField(null=True, blank=True, choices=[(1980, 1980), (1981, 1981), (1982, 1982), (1983, 1983), (1984, 1984), (1985, 1985), (1986, 1986), (1987, 1987), (1988, 1988), (1989, 1989), (1990, 1990), (1991, 1991), (1992, 1992), (1993, 1993), (1994, 1994), (1995, 1995), (1996, 1996), (1997, 1997), (1998, 1998), (1999, 1999), (2000, 2000), (2001, 2001), (2002, 2002), (2003, 2003), (2004, 2004), (2005, 2005), (2006, 2006), (2007, 2007), (2008, 2008), (2009, 2009), (2010, 2010), (2011, 2011), (2012, 2012), (2013, 2013), (2014, 2014), (2015, 2015), (2016, 2016)], default=2015)), ('nickname', models.CharField(max_length=255, blank=True, default='')), ('password', models.CharField(max_length=255, blank=True, null=True, unique=True, default=None)), - ('cofprofile', models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, related_name='account_kfet', to='gestioncof.CofProfile')), + ('cofprofile', models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, related_name='account_kfet', to='cof.CofProfile')), ], ), migrations.CreateModel( diff --git a/kfet/migrations/0059_create_generic.py b/kfet/migrations/0059_create_generic.py index 4f04770c..bdcd2f15 100644 --- a/kfet/migrations/0059_create_generic.py +++ b/kfet/migrations/0059_create_generic.py @@ -16,7 +16,7 @@ def setup_kfet_generic_user(apps, schema_editor): See also setup_kfet_generic_user from kfet.auth.utils module. """ User = apps.get_model('auth', 'User') - CofProfile = apps.get_model('gestioncof', 'CofProfile') + CofProfile = apps.get_model('cof', 'CofProfile') Account = apps.get_model('kfet', 'Account') user, _ = User.objects.update_or_create( diff --git a/kfet/models.py b/kfet/models.py index e952e85a..01173f16 100644 --- a/kfet/models.py +++ b/kfet/models.py @@ -3,7 +3,7 @@ from functools import reduce from django.db import models from django.core.validators import RegexValidator from django.contrib.auth.models import User -from gestioncof.models import CofProfile +from cof.models import CofProfile from django.urls import reverse from django.utils.six.moves import reduce from django.utils import timezone diff --git a/kfet/open/tests.py b/kfet/open/tests.py index 476eb6c0..59fe6146 100644 --- a/kfet/open/tests.py +++ b/kfet/open/tests.py @@ -120,7 +120,7 @@ class OpenKfetViewsTest(ChannelTestCase): def setUp(self): # Need this (and here) because of '.login' in setUp - patcher_messages = mock.patch('gestioncof.signals.messages') + patcher_messages = mock.patch('cof.signals.messages') patcher_messages.start() self.addCleanup(patcher_messages.stop) @@ -200,7 +200,7 @@ class OpenKfetConsumerTest(ChannelTestCase): OpenKfetConsumer.group_send('kfet.open.team', {'test': 'plop'}) self.assertIsNone(c.receive()) - @mock.patch('gestioncof.signals.messages') + @mock.patch('cof.signals.messages') def test_team_user(self, mock_messages): """Team user is added to kfet.open.team group.""" # setup team user and its client @@ -232,7 +232,7 @@ class OpenKfetScenarioTest(ChannelTestCase): def setUp(self): # Need this (and here) because of '.login' in setUp - patcher_messages = mock.patch('gestioncof.signals.messages') + patcher_messages = mock.patch('cof.signals.messages') patcher_messages.start() self.addCleanup(patcher_messages.stop) diff --git a/kfet/tests/test_config.py b/kfet/tests/test_config.py index 43497ca8..2d6ae0b2 100644 --- a/kfet/tests/test_config.py +++ b/kfet/tests/test_config.py @@ -5,7 +5,7 @@ from django.utils import timezone import djconfig -from gestioncof.models import User +from cof.models import User from kfet.config import kfet_config from kfet.models import Account diff --git a/kfet/tests/test_statistic.py b/kfet/tests/test_statistic.py index 93de27a0..4b1ca173 100644 --- a/kfet/tests/test_statistic.py +++ b/kfet/tests/test_statistic.py @@ -8,7 +8,7 @@ from kfet.models import Account, Article, ArticleCategory class TestStats(TestCase): - @patch('gestioncof.signals.messages') + @patch('cof.signals.messages') def test_user_stats(self, mock_messages): """ Checks that we can get the stat-related pages without any problem. diff --git a/kfet/tests/test_tests_utils.py b/kfet/tests/test_tests_utils.py index 8308bd5b..c846bb56 100644 --- a/kfet/tests/test_tests_utils.py +++ b/kfet/tests/test_tests_utils.py @@ -3,7 +3,7 @@ from django.contrib.auth.models import Permission from django.contrib.contenttypes.models import ContentType from django.test import TestCase -from gestioncof.models import CofProfile +from cof.models import CofProfile from ..models import Account from .testcases import TestCaseMixin @@ -76,17 +76,17 @@ class PermHelpersTest(TestCaseMixin, TestCase): ) def test_get_perms(self): - perms = get_perms('kfet.test_perm', 'gestioncof.another_test_perm') + perms = get_perms('kfet.test_perm', 'cof.another_test_perm') self.assertDictEqual(perms, { 'kfet.test_perm': self.perm1, - 'gestioncof.another_test_perm': self.perm2, + 'cof.another_test_perm': self.perm2, }) def test_user_add_perms(self): user = User.objects.create_user(username='user', password='user') user.user_permissions.add(self.perm1) - user_add_perms(user, ['kfet.is_team', 'gestioncof.another_test_perm']) + user_add_perms(user, ['kfet.is_team', 'cof.another_test_perm']) self.assertQuerysetEqual( user.user_permissions.all(), diff --git a/kfet/tests/testcases.py b/kfet/tests/testcases.py index aa2fb1b6..3e705a26 100644 --- a/kfet/tests/testcases.py +++ b/kfet/tests/testcases.py @@ -228,7 +228,7 @@ class ViewTestCaseMixin(TestCaseMixin): # Signals handlers on login/logout send messages. # Due to the way the Django' test Client performs login, this raise an # error. As workaround, we mock the Django' messages module. - patcher_messages = mock.patch('gestioncof.signals.messages') + patcher_messages = mock.patch('cof.signals.messages') patcher_messages.start() self.addCleanup(patcher_messages.stop) diff --git a/kfet/views.py b/kfet/views.py index 29f7411a..5d8d2daf 100644 --- a/kfet/views.py +++ b/kfet/views.py @@ -20,7 +20,7 @@ from django.db.models.functions import Coalesce from django.utils import timezone from django.utils.decorators import method_decorator -from gestioncof.models import CofProfile +from cof.models import CofProfile from kfet.config import kfet_config from kfet.decorators import teamkfet_required diff --git a/manage.py b/manage.py index 094ec16f..784a7319 100755 --- a/manage.py +++ b/manage.py @@ -3,7 +3,7 @@ import os import sys if __name__ == "__main__": - os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cof.settings.local") + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "gestioCOF.settings.local") from django.core.management import execute_from_command_line diff --git a/provisioning/bootstrap.sh b/provisioning/bootstrap.sh index cb6917a7..c460bdcd 100644 --- a/provisioning/bootstrap.sh +++ b/provisioning/bootstrap.sh @@ -44,11 +44,11 @@ sudo -H -u ubuntu ~ubuntu/venv/bin/pip install -r /vagrant/requirements-devel.tx # Préparation de Django cd /vagrant -ln -s -f secret_example.py cof/settings/secret.py +ln -s -f secret_example.py gestioCOF/settings/secret.py sudo -H -u ubuntu \ - DJANGO_SETTINGS_MODULE='cof.settings.dev' \ + DJANGO_SETTINGS_MODULE='gestioCOF.settings.dev' \ bash -c ". ~/venv/bin/activate && bash provisioning/prepare_django.sh" -/home/ubuntu/venv/bin/python manage.py collectstatic --noinput --settings cof.settings.dev +/home/ubuntu/venv/bin/python manage.py collectstatic --noinput --settings gestioCOF.settings.dev # Installation du cron pour les mails de rappels sudo -H -u ubuntu crontab provisioning/cron.dev @@ -64,7 +64,7 @@ systemctl start worker.service # Mise en place du .bash_profile pour tout configurer lors du `vagrant ssh` cat >> ~ubuntu/.bashrc <