forked from DGNum/gestioCOF
Merge branch 'kerl/rename_cof_gestioAsso' into 'master'
Renomme le dossier cof/ en gestioasso/ See merge request klub-dev-ens/gestioCOF!485
This commit is contained in:
commit
46ef12309a
27 changed files with 51 additions and 35 deletions
|
@ -21,8 +21,8 @@ variables:
|
||||||
before_script:
|
before_script:
|
||||||
- mkdir -p vendor/{pip,apt}
|
- mkdir -p vendor/{pip,apt}
|
||||||
- apt-get update -q && apt-get -o dir::cache::archives="vendor/apt" install -yqq postgresql-client libldap2-dev libsasl2-dev
|
- apt-get update -q && apt-get -o dir::cache::archives="vendor/apt" install -yqq postgresql-client libldap2-dev libsasl2-dev
|
||||||
- sed -E 's/^REDIS_HOST.*/REDIS_HOST = "redis"/' cof/settings/secret_example.py > cof/settings/secret.py
|
- sed -E 's/^REDIS_HOST.*/REDIS_HOST = "redis"/' gestioasso/settings/secret_example.py > gestioasso/settings/secret.py
|
||||||
- sed -i.bak -E 's;^REDIS_PASSWD = .*$;REDIS_PASSWD = "";' cof/settings/secret.py
|
- sed -i.bak -E 's;^REDIS_PASSWD = .*$;REDIS_PASSWD = "";' gestioasso/settings/secret.py
|
||||||
# Remove the old test database if it has not been done yet
|
# Remove the old test database if it has not been done yet
|
||||||
- psql --username=$POSTGRES_USER --host=$DBHOST -c "DROP DATABASE IF EXISTS test_$POSTGRES_DB"
|
- psql --username=$POSTGRES_USER --host=$DBHOST -c "DROP DATABASE IF EXISTS test_$POSTGRES_DB"
|
||||||
- pip install --upgrade -r requirements-prod.txt coverage tblib
|
- pip install --upgrade -r requirements-prod.txt coverage tblib
|
||||||
|
@ -44,7 +44,7 @@ coftest:
|
||||||
stage: test
|
stage: test
|
||||||
extends: .test_template
|
extends: .test_template
|
||||||
variables:
|
variables:
|
||||||
DJANGO_SETTINGS_MODULE: "cof.settings.cof_prod"
|
DJANGO_SETTINGS_MODULE: "gestioasso.settings.cof_prod"
|
||||||
script:
|
script:
|
||||||
- coverage run manage.py test gestioncof bda kfet petitscours shared --parallel
|
- coverage run manage.py test gestioncof bda kfet petitscours shared --parallel
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ bdstest:
|
||||||
stage: test
|
stage: test
|
||||||
extends: .test_template
|
extends: .test_template
|
||||||
variables:
|
variables:
|
||||||
DJANGO_SETTINGS_MODULE: "cof.settings.bds_prod"
|
DJANGO_SETTINGS_MODULE: "gestioasso.settings.bds_prod"
|
||||||
script:
|
script:
|
||||||
- coverage run manage.py test bds clubs events --parallel
|
- coverage run manage.py test bds clubs events --parallel
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ linters:
|
||||||
- black --check .
|
- black --check .
|
||||||
- isort --check --diff .
|
- isort --check --diff .
|
||||||
# Print errors only
|
# Print errors only
|
||||||
- flake8 --exit-zero bda bds clubs cof events gestioncof kfet petitscours provisioning shared
|
- flake8 --exit-zero bda bds clubs gestioasso events gestioncof kfet petitscours provisioning shared
|
||||||
cache:
|
cache:
|
||||||
key: linters
|
key: linters
|
||||||
paths:
|
paths:
|
||||||
|
@ -75,11 +75,11 @@ linters:
|
||||||
migration_checks:
|
migration_checks:
|
||||||
stage: test
|
stage: test
|
||||||
variables:
|
variables:
|
||||||
DJANGO_SETTINGS_MODULE: "cof.settings.local"
|
DJANGO_SETTINGS_MODULE: "gestioasso.settings.local"
|
||||||
before_script:
|
before_script:
|
||||||
- mkdir -p vendor/{pip,apt}
|
- mkdir -p vendor/{pip,apt}
|
||||||
- apt-get update -q && apt-get -o dir::cache::archives="vendor/apt" install -yqq postgresql-client libldap2-dev libsasl2-dev
|
- apt-get update -q && apt-get -o dir::cache::archives="vendor/apt" install -yqq postgresql-client libldap2-dev libsasl2-dev
|
||||||
- cp cof/settings/secret_example.py cof/settings/secret.py
|
- cp gestioasso/settings/secret_example.py gestioasso/settings/secret.py
|
||||||
- pip install --upgrade -r requirements-devel.txt
|
- pip install --upgrade -r requirements-devel.txt
|
||||||
- python --version
|
- python --version
|
||||||
script: python manage.py makemigrations --dry-run --check
|
script: python manage.py makemigrations --dry-run --check
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# GestioCOF
|
# GestioCOF / GestioBDS
|
||||||
|
|
||||||
[![pipeline status](https://git.eleves.ens.fr/cof-geek/gestioCOF/badges/master/pipeline.svg)](https://git.eleves.ens.fr/cof-geek/gestioCOF/commits/master)
|
[![pipeline status](https://git.eleves.ens.fr/cof-geek/gestioCOF/badges/master/pipeline.svg)](https://git.eleves.ens.fr/cof-geek/gestioCOF/commits/master)
|
||||||
[![coverage report](https://git.eleves.ens.fr/cof-geek/gestioCOF/badges/master/coverage.svg)](https://git.eleves.ens.fr/cof-geek/gestioCOF/commits/master)
|
[![coverage report](https://git.eleves.ens.fr/cof-geek/gestioCOF/badges/master/coverage.svg)](https://git.eleves.ens.fr/cof-geek/gestioCOF/commits/master)
|
||||||
|
@ -38,11 +38,11 @@ Vous pouvez maintenant installer les dépendances Python depuis le fichier
|
||||||
pip install -U pip # parfois nécessaire la première fois
|
pip install -U pip # parfois nécessaire la première fois
|
||||||
pip install -r requirements-devel.txt
|
pip install -r requirements-devel.txt
|
||||||
|
|
||||||
Pour terminer, copier le fichier `cof/settings/secret_example.py` vers
|
Pour terminer, copier le fichier `gestioasso/settings/secret_example.py` vers
|
||||||
`cof/settings/secret.py`. Sous Linux ou Mac, préférez plutôt un lien symbolique
|
`gestioasso/settings/secret.py`. Sous Linux ou Mac, préférez plutôt un lien symbolique
|
||||||
pour profiter de façon transparente des mises à jour du fichier:
|
pour profiter de façon transparente des mises à jour du fichier:
|
||||||
|
|
||||||
ln -s secret_example.py cof/settings/secret.py
|
ln -s secret_example.py gestioasso/settings/secret.py
|
||||||
|
|
||||||
Nous avons un git hook de pre-commit pour formatter et vérifier que votre code
|
Nous avons un git hook de pre-commit pour formatter et vérifier que votre code
|
||||||
vérifie nos conventions. Pour bénéficier des mises à jour du hook, préférez
|
vérifie nos conventions. Pour bénéficier des mises à jour du hook, préférez
|
||||||
|
|
|
@ -3,6 +3,6 @@ import os
|
||||||
from channels.asgi import get_channel_layer
|
from channels.asgi import get_channel_layer
|
||||||
|
|
||||||
if "DJANGO_SETTINGS_MODULE" not in os.environ:
|
if "DJANGO_SETTINGS_MODULE" not in os.environ:
|
||||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cof.settings")
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "gestioasso.settings")
|
||||||
|
|
||||||
channel_layer = get_channel_layer()
|
channel_layer = get_channel_layer()
|
|
@ -1,7 +1,9 @@
|
||||||
"""
|
"""
|
||||||
Django development settings for the cof project.
|
Settings de production de GestioBDS.
|
||||||
The settings that are not listed here are imported from .common
|
|
||||||
|
Surcharge les settings définis dans common.py
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from .common import * # NOQA
|
from .common import * # NOQA
|
||||||
from .common import INSTALLED_APPS
|
from .common import INSTALLED_APPS
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
"""
|
"""
|
||||||
Django development settings for the cof project.
|
Settings de production de GestioCOF.
|
||||||
The settings that are not listed here are imported from .common
|
|
||||||
|
Surcharge les settings définis dans common.py
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from .common import * # NOQA
|
from .common import * # NOQA
|
||||||
|
@ -149,7 +151,7 @@ CHANNEL_LAYERS = {
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"ROUTING": "cof.routing.routing",
|
"ROUTING": "gestioasso.routing.routing",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
"""
|
"""
|
||||||
Django common settings for cof project.
|
Settings par défaut et settings communs à GestioCOF et GestioBDS.
|
||||||
|
|
||||||
Everything which is supposed to be identical between the production server and
|
|
||||||
the local development server should be here.
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
@ -65,7 +62,7 @@ INSTALLED_APPS = [
|
||||||
"django.contrib.messages",
|
"django.contrib.messages",
|
||||||
"django.contrib.admin",
|
"django.contrib.admin",
|
||||||
"django.contrib.admindocs",
|
"django.contrib.admindocs",
|
||||||
"cof.apps.IgnoreSrcStaticFilesConfig",
|
"gestioasso.apps.IgnoreSrcStaticFilesConfig",
|
||||||
"django_cas_ng",
|
"django_cas_ng",
|
||||||
"bootstrapform",
|
"bootstrapform",
|
||||||
"widget_tweaks",
|
"widget_tweaks",
|
||||||
|
@ -82,7 +79,7 @@ MIDDLEWARE = [
|
||||||
"django.middleware.locale.LocaleMiddleware",
|
"django.middleware.locale.LocaleMiddleware",
|
||||||
]
|
]
|
||||||
|
|
||||||
ROOT_URLCONF = "cof.urls"
|
ROOT_URLCONF = "gestioasso.urls"
|
||||||
|
|
||||||
TEMPLATES = [
|
TEMPLATES = [
|
||||||
{
|
{
|
||||||
|
@ -126,7 +123,7 @@ USE_I18N = True
|
||||||
USE_L10N = True
|
USE_L10N = True
|
||||||
USE_TZ = True
|
USE_TZ = True
|
||||||
LANGUAGES = (("fr", "Français"), ("en", "English"))
|
LANGUAGES = (("fr", "Français"), ("en", "English"))
|
||||||
FORMAT_MODULE_PATH = "cof.locale"
|
FORMAT_MODULE_PATH = "gestioasso.locale"
|
||||||
|
|
||||||
|
|
||||||
# ---
|
# ---
|
|
@ -1,4 +1,10 @@
|
||||||
"""Django local development settings."""
|
"""
|
||||||
|
Settings utilisés dans la VM Vagrant.
|
||||||
|
Active toutes les applications (de GestioCOF et de GestioBDS).
|
||||||
|
|
||||||
|
Surcharge les settings définis dans common.py
|
||||||
|
"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from . import bds_prod
|
from . import bds_prod
|
|
@ -1,4 +1,9 @@
|
||||||
"""Django local development settings."""
|
"""
|
||||||
|
Settings utilisés lors d'un développement en local (dans un virtualenv).
|
||||||
|
Active toutes les applications (de GestioCOF et de GestioBDS).
|
||||||
|
|
||||||
|
Surcharge les settings définis dans common.py
|
||||||
|
"""
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from . import bds_prod
|
from . import bds_prod
|
||||||
|
@ -43,7 +48,7 @@ CACHES = {"default": {"BACKEND": "django.core.cache.backends.locmem.LocMemCache"
|
||||||
CHANNEL_LAYERS = {
|
CHANNEL_LAYERS = {
|
||||||
"default": {
|
"default": {
|
||||||
"BACKEND": "asgiref.inmemory.ChannelLayer",
|
"BACKEND": "asgiref.inmemory.ChannelLayer",
|
||||||
"ROUTING": "cof.routing.routing",
|
"ROUTING": "gestioasso.routing.routing",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
"""
|
||||||
|
Secrets à re-définir en production.
|
||||||
|
"""
|
||||||
|
|
||||||
SECRET_KEY = "q()(zn4m63i%5cp4)f+ww4-28_w+ly3q9=6imw2ciu&_(5_4ah"
|
SECRET_KEY = "q()(zn4m63i%5cp4)f+ww4-28_w+ly3q9=6imw2ciu&_(5_4ah"
|
||||||
ADMINS = None
|
ADMINS = None
|
||||||
SERVER_EMAIL = "root@vagrant"
|
SERVER_EMAIL = "root@vagrant"
|
|
@ -2,5 +2,5 @@ import os
|
||||||
|
|
||||||
from django.core.wsgi import get_wsgi_application
|
from django.core.wsgi import get_wsgi_application
|
||||||
|
|
||||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cof.settings.bds_prod")
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "gestioasso.settings.bds_prod")
|
||||||
application = get_wsgi_application()
|
application = get_wsgi_application()
|
|
@ -3,7 +3,7 @@ import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cof.settings.local")
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "gestioasso.settings.local")
|
||||||
|
|
||||||
from django.core.management import execute_from_command_line
|
from django.core.management import execute_from_command_line
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ readonly DBUSER="cof_gestion"
|
||||||
readonly DBNAME="cof_gestion"
|
readonly DBNAME="cof_gestion"
|
||||||
readonly DBPASSWD="4KZt3nGPLVeWSvtBZPSM3fSzXpzEU4"
|
readonly DBPASSWD="4KZt3nGPLVeWSvtBZPSM3fSzXpzEU4"
|
||||||
readonly REDIS_PASSWD="dummy"
|
readonly REDIS_PASSWD="dummy"
|
||||||
readonly DJANGO_SETTINGS_MODULE="cof.settings.dev"
|
readonly DJANGO_SETTINGS_MODULE="gestioasso.settings.dev"
|
||||||
|
|
||||||
|
|
||||||
# ---
|
# ---
|
||||||
|
@ -83,7 +83,7 @@ sudo -H -u vagrant ~vagrant/venv/bin/pip install \
|
||||||
|
|
||||||
# Préparation de Django
|
# Préparation de Django
|
||||||
cd /vagrant
|
cd /vagrant
|
||||||
ln -s -f secret_example.py cof/settings/secret.py
|
ln -s -f secret_example.py gestioasso/settings/secret.py
|
||||||
sudo -H -u vagrant \
|
sudo -H -u vagrant \
|
||||||
DJANGO_SETTINGS_MODULE="$DJANGO_SETTINGS_MODULE"\
|
DJANGO_SETTINGS_MODULE="$DJANGO_SETTINGS_MODULE"\
|
||||||
/bin/sh -c ". ~vagrant/venv/bin/activate && /bin/sh provisioning/prepare_django.sh"
|
/bin/sh -c ". ~vagrant/venv/bin/activate && /bin/sh provisioning/prepare_django.sh"
|
||||||
|
|
|
@ -8,7 +8,7 @@ User=vagrant
|
||||||
Group=vagrant
|
Group=vagrant
|
||||||
TimeoutSec=300
|
TimeoutSec=300
|
||||||
WorkingDirectory=/vagrant
|
WorkingDirectory=/vagrant
|
||||||
Environment="DJANGO_SETTINGS_MODULE=cof.settings.dev"
|
Environment="DJANGO_SETTINGS_MODULE=gestioasso.settings.dev"
|
||||||
ExecStart=/home/vagrant/venv/bin/daphne \
|
ExecStart=/home/vagrant/venv/bin/daphne \
|
||||||
-u /srv/gestiocof/gestiocof.sock \
|
-u /srv/gestiocof/gestiocof.sock \
|
||||||
cof.asgi:channel_layer
|
cof.asgi:channel_layer
|
||||||
|
|
|
@ -4,5 +4,5 @@ Description=Envoi des mails de rappel des spectales BdA
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
User=vagrant
|
User=vagrant
|
||||||
Environment="DJANGO_SETTINGS_MODULE=cof.settings.dev"
|
Environment="DJANGO_SETTINGS_MODULE=gestioasso.settings.dev"
|
||||||
ExecStart=/home/vagrant/venv/bin/python /vagrant/manage.py sendrappels
|
ExecStart=/home/vagrant/venv/bin/python /vagrant/manage.py sendrappels
|
||||||
|
|
|
@ -4,5 +4,5 @@ Description=Envoi des mails de BdA-Revente
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
User=vagrant
|
User=vagrant
|
||||||
Environment="DJANGO_SETTINGS_MODULE=cof.settings.dev"
|
Environment="DJANGO_SETTINGS_MODULE=gestioasso.settings.dev"
|
||||||
ExecStart=/home/vagrant/venv/bin/python /vagrant/manage.py manage_reventes
|
ExecStart=/home/vagrant/venv/bin/python /vagrant/manage.py manage_reventes
|
||||||
|
|
|
@ -9,7 +9,7 @@ User=vagrant
|
||||||
Group=vagrant
|
Group=vagrant
|
||||||
TimeoutSec=300
|
TimeoutSec=300
|
||||||
WorkingDirectory=/vagrant
|
WorkingDirectory=/vagrant
|
||||||
Environment="DJANGO_SETTINGS_MODULE=cof.settings.dev"
|
Environment="DJANGO_SETTINGS_MODULE=gestioasso.settings.dev"
|
||||||
ExecStart=/home/vagrant/venv/bin/python manage.py runworker
|
ExecStart=/home/vagrant/venv/bin/python manage.py runworker
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
|
Loading…
Add table
Reference in a new issue