Merge branch 'Kerl/test_db' into 'master'
Kerl/test db Ajoute une base de donnée de tests avec - Des utilisateurs dont `root` (mot de passe `root`) avec tous les droits - Un ensemble complet de tirages, spectacles, salles, participants et vœux pour le bda. - Un événement. - Un sondage. - Quelques données de petits cours Pour appliquer ce patch, il faut lancer la commande python manage.py loaddata users bda gestion Fixes #4 _NB._ Les noms des utilisateurs sont honteusement pompés sur www.asterix.com _NB._ Il se passe des choses bizarres si on load cette base dans une base déjà remplie, à bon entendeur. See merge request !38
This commit is contained in:
commit
f91d95a093
7 changed files with 10412 additions and 2 deletions
|
@ -149,7 +149,12 @@ Il ne vous reste plus qu'à initialiser les modèles de Django avec la commande
|
|||
|
||||
python manage.py migrate
|
||||
|
||||
et vous êtes prêts à développer ! Lancer GestioCOF en faisant
|
||||
|
||||
Une base de donnée pré-remplie est disponible en lançant la commande :
|
||||
|
||||
python manage.py loaddata users bda gestion
|
||||
|
||||
Vous êtes prêts à développer ! Lancer GestioCOF en faisant
|
||||
|
||||
python manage.py runserver
|
||||
|
||||
|
|
7630
bda/fixtures/bda.json
Normal file
7630
bda/fixtures/bda.json
Normal file
File diff suppressed because it is too large
Load diff
349
gestioncof/fixtures/gestion.json
Normal file
349
gestioncof/fixtures/gestion.json
Normal file
|
@ -0,0 +1,349 @@
|
|||
[
|
||||
{
|
||||
"fields": {
|
||||
"old": false,
|
||||
"details": "Il nous casse les oreilles, qu'est ce qu'on en fait\u00a0?",
|
||||
"survey_open": true,
|
||||
"title": "Sort du barde"
|
||||
},
|
||||
"model": "gestioncof.survey",
|
||||
"pk": 1
|
||||
},
|
||||
{
|
||||
"fields": {
|
||||
"question": "Sanction s'il chante",
|
||||
"survey": 1,
|
||||
"multi_answers": true
|
||||
},
|
||||
"model": "gestioncof.surveyquestion",
|
||||
"pk": 1
|
||||
},
|
||||
{
|
||||
"fields": {
|
||||
"question": "Est-ce qu'on le garde\u00a0?",
|
||||
"survey": 1,
|
||||
"multi_answers": false
|
||||
},
|
||||
"model": "gestioncof.surveyquestion",
|
||||
"pk": 2
|
||||
},
|
||||
{
|
||||
"fields": {
|
||||
"answer": "On l'ernestise",
|
||||
"survey_question": 1
|
||||
},
|
||||
"model": "gestioncof.surveyquestionanswer",
|
||||
"pk": 1
|
||||
},
|
||||
{
|
||||
"fields": {
|
||||
"answer": "On ligote",
|
||||
"survey_question": 1
|
||||
},
|
||||
"model": "gestioncof.surveyquestionanswer",
|
||||
"pk": 2
|
||||
},
|
||||
{
|
||||
"fields": {
|
||||
"answer": "On le prive de banquet",
|
||||
"survey_question": 1
|
||||
},
|
||||
"model": "gestioncof.surveyquestionanswer",
|
||||
"pk": 3
|
||||
},
|
||||
{
|
||||
"fields": {
|
||||
"answer": "Oui",
|
||||
"survey_question": 2
|
||||
},
|
||||
"model": "gestioncof.surveyquestionanswer",
|
||||
"pk": 4
|
||||
},
|
||||
{
|
||||
"fields": {
|
||||
"answer": "Non",
|
||||
"survey_question": 2
|
||||
},
|
||||
"model": "gestioncof.surveyquestionanswer",
|
||||
"pk": 5
|
||||
},
|
||||
{
|
||||
"fields": {
|
||||
"old": false,
|
||||
"description": "On va casser du romain.",
|
||||
"end_date": "2016-09-12T00:00:00Z",
|
||||
"title": "Bataille de Gergovie",
|
||||
"image": "",
|
||||
"location": "Gergovie",
|
||||
"registration_open": true,
|
||||
"start_date": "2016-09-09T00:00:00Z"
|
||||
},
|
||||
"model": "gestioncof.event",
|
||||
"pk": 1
|
||||
},
|
||||
{
|
||||
"fields": {
|
||||
"default": "",
|
||||
"event": 1,
|
||||
"fieldtype": "text",
|
||||
"name": "Commentaires"
|
||||
},
|
||||
"model": "gestioncof.eventcommentfield",
|
||||
"pk": 1
|
||||
},
|
||||
{
|
||||
"fields": {
|
||||
"multi_choices": true,
|
||||
"event": 1,
|
||||
"name": "Potion magique"
|
||||
},
|
||||
"model": "gestioncof.eventoption",
|
||||
"pk": 1
|
||||
},
|
||||
{
|
||||
"fields": {
|
||||
"event_option": 1,
|
||||
"value": "Je suis alergique"
|
||||
},
|
||||
"model": "gestioncof.eventoptionchoice",
|
||||
"pk": 1
|
||||
},
|
||||
{
|
||||
"fields": {
|
||||
"event_option": 1,
|
||||
"value": "J'en veux"
|
||||
},
|
||||
"model": "gestioncof.eventoptionchoice",
|
||||
"pk": 2
|
||||
},
|
||||
{
|
||||
"fields": {
|
||||
"event_option": 1,
|
||||
"value": "Je suis tomb\u00e9 dans la marmite quand j'\u00e9tais petit"
|
||||
},
|
||||
"model": "gestioncof.eventoptionchoice",
|
||||
"pk": 3
|
||||
},
|
||||
{
|
||||
"fields": {
|
||||
"name": "Bagarre"
|
||||
},
|
||||
"model": "gestioncof.petitcourssubject",
|
||||
"pk": 1
|
||||
},
|
||||
{
|
||||
"fields": {
|
||||
"name": "Lancer de menhir"
|
||||
},
|
||||
"model": "gestioncof.petitcourssubject",
|
||||
"pk": 2
|
||||
},
|
||||
{
|
||||
"fields": {
|
||||
"name": "Pr\u00e9paration de potions"
|
||||
},
|
||||
"model": "gestioncof.petitcourssubject",
|
||||
"pk": 3
|
||||
},
|
||||
{
|
||||
"fields": {
|
||||
"name": "Chant"
|
||||
},
|
||||
"model": "gestioncof.petitcourssubject",
|
||||
"pk": 4
|
||||
},
|
||||
{
|
||||
"fields": {
|
||||
"matiere": 1,
|
||||
"niveau": "college",
|
||||
"user": 11,
|
||||
"agrege": false
|
||||
},
|
||||
"model": "gestioncof.petitcoursability",
|
||||
"pk": 1
|
||||
},
|
||||
{
|
||||
"fields": {
|
||||
"matiere": 1,
|
||||
"niveau": "lycee",
|
||||
"user": 11,
|
||||
"agrege": false
|
||||
},
|
||||
"model": "gestioncof.petitcoursability",
|
||||
"pk": 2
|
||||
},
|
||||
{
|
||||
"fields": {
|
||||
"matiere": 1,
|
||||
"niveau": "prepa1styear",
|
||||
"user": 11,
|
||||
"agrege": false
|
||||
},
|
||||
"model": "gestioncof.petitcoursability",
|
||||
"pk": 3
|
||||
},
|
||||
{
|
||||
"fields": {
|
||||
"matiere": 1,
|
||||
"niveau": "prepa2ndyear",
|
||||
"user": 11,
|
||||
"agrege": false
|
||||
},
|
||||
"model": "gestioncof.petitcoursability",
|
||||
"pk": 4
|
||||
},
|
||||
{
|
||||
"fields": {
|
||||
"matiere": 1,
|
||||
"niveau": "licence3",
|
||||
"user": 11,
|
||||
"agrege": false
|
||||
},
|
||||
"model": "gestioncof.petitcoursability",
|
||||
"pk": 5
|
||||
},
|
||||
{
|
||||
"fields": {
|
||||
"matiere": 1,
|
||||
"niveau": "prepa1styear",
|
||||
"user": 43,
|
||||
"agrege": true
|
||||
},
|
||||
"model": "gestioncof.petitcoursability",
|
||||
"pk": 6
|
||||
},
|
||||
{
|
||||
"fields": {
|
||||
"matiere": 1,
|
||||
"niveau": "prepa2ndyear",
|
||||
"user": 43,
|
||||
"agrege": true
|
||||
},
|
||||
"model": "gestioncof.petitcoursability",
|
||||
"pk": 7
|
||||
},
|
||||
{
|
||||
"fields": {
|
||||
"matiere": 1,
|
||||
"niveau": "licence3",
|
||||
"user": 43,
|
||||
"agrege": true
|
||||
},
|
||||
"model": "gestioncof.petitcoursability",
|
||||
"pk": 8
|
||||
},
|
||||
{
|
||||
"fields": {
|
||||
"matiere": 2,
|
||||
"niveau": "college",
|
||||
"user": 43,
|
||||
"agrege": false
|
||||
},
|
||||
"model": "gestioncof.petitcoursability",
|
||||
"pk": 9
|
||||
},
|
||||
{
|
||||
"fields": {
|
||||
"matiere": 2,
|
||||
"niveau": "lycee",
|
||||
"user": 43,
|
||||
"agrege": false
|
||||
},
|
||||
"model": "gestioncof.petitcoursability",
|
||||
"pk": 10
|
||||
},
|
||||
{
|
||||
"fields": {
|
||||
"matiere": 3,
|
||||
"niveau": "lycee",
|
||||
"user": 48,
|
||||
"agrege": true
|
||||
},
|
||||
"model": "gestioncof.petitcoursability",
|
||||
"pk": 11
|
||||
},
|
||||
{
|
||||
"fields": {
|
||||
"matiere": 3,
|
||||
"niveau": "prepa1styear",
|
||||
"user": 48,
|
||||
"agrege": true
|
||||
},
|
||||
"model": "gestioncof.petitcoursability",
|
||||
"pk": 12
|
||||
},
|
||||
{
|
||||
"fields": {
|
||||
"matiere": 3,
|
||||
"niveau": "prepa2ndyear",
|
||||
"user": 48,
|
||||
"agrege": true
|
||||
},
|
||||
"model": "gestioncof.petitcoursability",
|
||||
"pk": 13
|
||||
},
|
||||
{
|
||||
"fields": {
|
||||
"matiere": 3,
|
||||
"niveau": "licence3",
|
||||
"user": 48,
|
||||
"agrege": true
|
||||
},
|
||||
"model": "gestioncof.petitcoursability",
|
||||
"pk": 14
|
||||
},
|
||||
{
|
||||
"fields": {
|
||||
"matiere": 4,
|
||||
"niveau": "college",
|
||||
"user": 10,
|
||||
"agrege": false
|
||||
},
|
||||
"model": "gestioncof.petitcoursability",
|
||||
"pk": 15
|
||||
},
|
||||
{
|
||||
"fields": {
|
||||
"traitee": false,
|
||||
"remarques": "En grande difficult\u00e9",
|
||||
"quand": "weekend (dimanche) / soir apr\u00e8s les cours",
|
||||
"name": "Jules C\u00e9sar",
|
||||
"created": "2016-07-15T11:12:35Z",
|
||||
"niveau": "prepa1styear",
|
||||
"agrege_requis": false,
|
||||
"phone": "",
|
||||
"traitee_par": null,
|
||||
"matieres": [
|
||||
1
|
||||
],
|
||||
"lieu": "Al\u00e9sia",
|
||||
"freq": "3 fois / semaine",
|
||||
"email": "jules.cesar@polytechnique.edu",
|
||||
"processed": null
|
||||
},
|
||||
"model": "gestioncof.petitcoursdemande",
|
||||
"pk": 1
|
||||
},
|
||||
{
|
||||
"fields": {
|
||||
"traitee": false,
|
||||
"remarques": "",
|
||||
"quand": "Weekends",
|
||||
"name": "Jules C\u00e9sar",
|
||||
"created": "2016-07-15T11:13:26Z",
|
||||
"niveau": "lycee",
|
||||
"agrege_requis": true,
|
||||
"phone": "",
|
||||
"traitee_par": null,
|
||||
"matieres": [
|
||||
3
|
||||
],
|
||||
"lieu": "\u00e0 domicile",
|
||||
"freq": "toutes les semaines",
|
||||
"email": "jules.cesar@polytechnique.edu",
|
||||
"processed": null
|
||||
},
|
||||
"model": "gestioncof.petitcoursdemande",
|
||||
"pk": 2
|
||||
}
|
||||
]
|
41
gestioncof/fixtures/root.json
Normal file
41
gestioncof/fixtures/root.json
Normal file
|
@ -0,0 +1,41 @@
|
|||
[
|
||||
{
|
||||
"fields": {
|
||||
"username": "root",
|
||||
"first_name": "super",
|
||||
"last_name": "user",
|
||||
"is_active": true,
|
||||
"is_superuser": true,
|
||||
"is_staff": true,
|
||||
"last_login": null,
|
||||
"groups": [],
|
||||
"user_permissions": [],
|
||||
"password": "pbkdf2_sha256$12000$yRpkPuayQ8De$h6bDe+Q4kMikzwEbLNw2I9/V/1/v3F3yLIjEZIFSHrY=",
|
||||
"email": "root@localhost",
|
||||
"date_joined": "2016-06-15T17:50:57Z"
|
||||
},
|
||||
"model": "auth.user",
|
||||
"pk": 62
|
||||
},
|
||||
{
|
||||
"fields": {
|
||||
"departement": "",
|
||||
"type_cotiz": "normalien",
|
||||
"petits_cours_remarques": "",
|
||||
"is_buro": true,
|
||||
"is_cof": true,
|
||||
"mailing_cof": true,
|
||||
"comments": "Super utilisateur",
|
||||
"login_clipper": "",
|
||||
"phone": "",
|
||||
"num": 62,
|
||||
"mailing_bda_revente": true,
|
||||
"user": 62,
|
||||
"petits_cours_accept": false,
|
||||
"mailing_bda": true,
|
||||
"occupation": "1A"
|
||||
},
|
||||
"model": "gestioncof.cofprofile",
|
||||
"pk": 62
|
||||
}
|
||||
]
|
2381
gestioncof/fixtures/users.json
Normal file
2381
gestioncof/fixtures/users.json
Normal file
File diff suppressed because it is too large
Load diff
|
@ -45,4 +45,4 @@ cd /vagrant
|
|||
sudo -H -u vagrant pip install --user -r requirements.txt -r requirements-devel.txt
|
||||
|
||||
# Préparation de Django
|
||||
sudo -H -u vagrant DJANGO_SETTINGS_MODULE='cof.settings_dev' DBUSER=$DBUSER DBNAME=$DBNAME DBPASSWD=$DBPASSWD python manage.py migrate
|
||||
sudo -H -u vagrant DJANGO_SETTINGS_MODULE='cof.settings_dev' DBUSER=$DBUSER DBNAME=$DBNAME DBPASSWD=$DBPASSWD sh provisioning/prepare_django.sh
|
||||
|
|
4
provisioning/prepare_django.sh
Normal file
4
provisioning/prepare_django.sh
Normal file
|
@ -0,0 +1,4 @@
|
|||
# Doit être lancé par bootstrap.sh
|
||||
|
||||
python manage.py migrate
|
||||
python manage.py loaddata users root bda gestion
|
Loading…
Reference in a new issue