From 5ab9facac55aa7cde5795f9668d933f3b46e79f3 Mon Sep 17 00:00:00 2001 From: Evarin Date: Tue, 20 Jun 2017 19:30:10 +0200 Subject: [PATCH] Chassons les mauvaises habitudes : migrations sur git --- .gitignore | 2 - avisstage/migrations/0001_initial.py | 142 +++++++++++++++++++++++++++ 2 files changed, 142 insertions(+), 2 deletions(-) create mode 100644 avisstage/migrations/0001_initial.py diff --git a/.gitignore b/.gitignore index 20e932c..e09edb1 100644 --- a/.gitignore +++ b/.gitignore @@ -102,8 +102,6 @@ $RECYCLE.BIN/ tpathtxt test.py -# Migrations -migrations/ *venv/ *~ \#* diff --git a/avisstage/migrations/0001_initial.py b/avisstage/migrations/0001_initial.py new file mode 100644 index 0000000..0266ecc --- /dev/null +++ b/avisstage/migrations/0001_initial.py @@ -0,0 +1,142 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.6 on 2017-06-20 17:23 +from __future__ import unicode_literals + +from django.conf import settings +import django.contrib.gis.db.models.fields +from django.db import migrations, models +import django.db.models.deletion +import django.utils.timezone +import taggit_autosuggest.managers +import tinymce.models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ('taggit', '0002_auto_20150616_2121'), + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='AvisLieu', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('order', models.IntegerField(default=0, verbose_name='Ordre')), + ('chapo', models.TextField(blank=True, verbose_name='En quelques mots')), + ('avis_lieustage', tinymce.models.HTMLField(blank=True, verbose_name='Les lieux de travail')), + ('avis_pratique', tinymce.models.HTMLField(blank=True, verbose_name="S'installer - conseils pratiques")), + ('avis_tourisme', tinymce.models.HTMLField(blank=True, verbose_name='Dans les parages')), + ('les_plus', models.TextField(blank=True, verbose_name='Les plus du lieu')), + ('les_moins', models.TextField(blank=True, verbose_name='Les moins du lieu')), + ], + options={ + 'verbose_name': 'Avis sur un lieu de stage', + 'verbose_name_plural': 'Avis sur un lieu de stage', + }, + ), + migrations.CreateModel( + name='AvisStage', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('chapo', models.TextField(blank=True, verbose_name='En quelques mots')), + ('avis_ambiance', tinymce.models.HTMLField(blank=True, verbose_name="L'ambiance de travail")), + ('avis_sujet', tinymce.models.HTMLField(blank=True, verbose_name='La mission')), + ('avis_admin', tinymce.models.HTMLField(blank=True, verbose_name='Formalit\xe9s et administration')), + ('les_plus', models.TextField(blank=True, verbose_name='Les plus de cette exp\xe9rience')), + ('les_moins', models.TextField(blank=True, verbose_name='Les moins de cette exp\xe9rience')), + ], + ), + migrations.CreateModel( + name='Lieu', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('nom', models.CharField(max_length=250, verbose_name="Nom de l'institution d'accueil")), + ('type_lieu', models.CharField(choices=[(b'universite', 'Universit\xe9'), (b'entreprise', 'Entreprise'), (b'centrerecherche', 'Centre de recherche'), (b'administration', 'Administration'), (b'autre', 'Autre')], default='universite', max_length=15, verbose_name="Type de structure d'accueil")), + ('ville', models.CharField(max_length=200, verbose_name='Ville')), + ('pays', models.CharField(choices=[(b'AF', 'Afghanistan'), (b'AL', 'Albanie'), (b'AQ', 'Antarctique'), (b'DZ', 'Alg\xe9rie'), (b'AS', 'Samoa Am\xe9ricaines'), (b'AD', 'Andorre'), (b'AO', 'Angola'), (b'AG', 'Antigua-et-Barbuda'), (b'AZ', 'Azerba\xefdjan'), (b'AR', 'Argentine'), (b'AU', 'Australie'), (b'AT', 'Autriche'), (b'BS', 'Bahamas'), (b'BH', 'Bahre\xefn'), (b'BD', 'Bangladesh'), (b'AM', 'Arm\xe9nie'), (b'BB', 'Barbade'), (b'BE', 'Belgique'), (b'BM', 'Bermudes'), (b'BT', 'Bhoutan'), (b'BO', 'Bolivie'), (b'BA', 'Bosnie-Herz\xe9govine'), (b'BW', 'Botswana'), (b'BV', '\xcele Bouvet'), (b'BR', 'Br\xe9sil'), (b'BZ', 'Belize'), (b'IO', "Territoire Britannique de l'Oc\xe9an Indien"), (b'SB', '\xceles Salomon'), (b'VG', '\xceles Vierges Britanniques'), (b'BN', 'Brun\xe9i Darussalam'), (b'BG', 'Bulgarie'), (b'MM', 'Myanmar'), (b'BI', 'Burundi'), (b'BY', 'B\xe9larus'), (b'KH', 'Cambodge'), (b'CM', 'Cameroun'), (b'CA', 'Canada'), (b'CV', 'Cap-vert'), (b'KY', '\xceles Ca\xefmanes'), (b'CF', 'R\xe9publique Centrafricaine'), (b'LK', 'Sri Lanka'), (b'TD', 'Tchad'), (b'CL', 'Chili'), (b'CN', 'Chine'), (b'TW', 'Ta\xefwan'), (b'CX', '\xcele Christmas'), (b'CC', '\xceles Cocos (Keeling)'), (b'CO', 'Colombie'), (b'KM', 'Comores'), (b'YT', 'Mayotte'), (b'CG', 'R\xe9publique du Congo'), (b'CD', 'R\xe9publique D\xe9mocratique du Congo'), (b'CK', '\xceles Cook'), (b'CR', 'Costa Rica'), (b'HR', 'Croatie'), (b'CU', 'Cuba'), (b'CY', 'Chypre'), (b'CZ', 'R\xe9publique Tch\xe8que'), (b'BJ', 'B\xe9nin'), (b'DK', 'Danemark'), (b'DM', 'Dominique'), (b'DO', 'R\xe9publique Dominicaine'), (b'EC', '\xc9quateur'), (b'SV', 'El Salvador'), (b'GQ', 'Guin\xe9e \xc9quatoriale'), (b'ET', '\xc9thiopie'), (b'ER', '\xc9rythr\xe9e'), (b'EE', 'Estonie'), (b'FO', '\xceles F\xe9ro\xe9'), (b'FK', '\xceles (malvinas) Falkland'), (b'GS', 'G\xe9orgie du Sud et les \xceles Sandwich du Sud'), (b'FJ', 'Fidji'), (b'FI', 'Finlande'), (b'AX', '\xceles \xc5land'), (b'FR', 'France'), (b'GF', 'Guyane Fran\xe7aise'), (b'PF', 'Polyn\xe9sie Fran\xe7aise'), (b'TF', 'Terres Australes Fran\xe7aises'), (b'DJ', 'Djibouti'), (b'GA', 'Gabon'), (b'GE', 'G\xe9orgie'), (b'GM', 'Gambie'), (b'PS', 'Territoire Palestinien Occup\xe9'), (b'DE', 'Allemagne'), (b'GH', 'Ghana'), (b'GI', 'Gibraltar'), (b'KI', 'Kiribati'), (b'GR', 'Gr\xe8ce'), (b'GL', 'Groenland'), (b'GD', 'Grenade'), (b'GP', 'Guadeloupe'), (b'GU', 'Guam'), (b'GT', 'Guatemala'), (b'GN', 'Guin\xe9e'), (b'GY', 'Guyana'), (b'HT', 'Ha\xefti'), (b'HM', '\xceles Heard et Mcdonald'), (b'VA', 'Saint-Si\xe8ge (\xe9tat de la Cit\xe9 du Vatican)'), (b'HN', 'Honduras'), (b'HK', 'Hong-Kong'), (b'HU', 'Hongrie'), (b'IS', 'Islande'), (b'IN', 'Inde'), (b'ID', 'Indon\xe9sie'), (b'IR', "R\xe9publique Islamique d'Iran"), (b'IQ', 'Iraq'), (b'IE', 'Irlande'), (b'IL', 'Isra\xebl'), (b'IT', 'Italie'), (b'CI', "C\xf4te d'Ivoire"), (b'JM', 'Jama\xefque'), (b'JP', 'Japon'), (b'KZ', 'Kazakhstan'), (b'JO', 'Jordanie'), (b'KE', 'Kenya'), (b'KP', 'R\xe9publique Populaire D\xe9mocratique de Cor\xe9e'), (b'KR', 'R\xe9publique de Cor\xe9e'), (b'KW', 'Kowe\xeft'), (b'KG', 'Kirghizistan'), (b'LA', 'R\xe9publique D\xe9mocratique Populaire Lao'), (b'LB', 'Liban'), (b'LS', 'Lesotho'), (b'LV', 'Lettonie'), (b'LR', 'Lib\xe9ria'), (b'LY', 'Jamahiriya Arabe Libyenne'), (b'LI', 'Liechtenstein'), (b'LT', 'Lituanie'), (b'LU', 'Luxembourg'), (b'MO', 'Macao'), (b'MG', 'Madagascar'), (b'MW', 'Malawi'), (b'MY', 'Malaisie'), (b'MV', 'Maldives'), (b'ML', 'Mali'), (b'MT', 'Malte'), (b'MQ', 'Martinique'), (b'MR', 'Mauritanie'), (b'MU', 'Maurice'), (b'MX', 'Mexique'), (b'MC', 'Monaco'), (b'MN', 'Mongolie'), (b'MD', 'R\xe9publique de Moldova'), (b'MS', 'Montserrat'), (b'MA', 'Maroc'), (b'MZ', 'Mozambique'), (b'OM', 'Oman'), (b'NA', 'Namibie'), (b'NR', 'Nauru'), (b'NP', 'N\xe9pal'), (b'NL', 'Pays-Bas'), (b'AN', 'Antilles N\xe9erlandaises'), (b'AW', 'Aruba'), (b'NC', 'Nouvelle-Cal\xe9donie'), (b'VU', 'Vanuatu'), (b'NZ', 'Nouvelle-Z\xe9lande'), (b'NI', 'Nicaragua'), (b'NE', 'Niger'), (b'NG', 'Nig\xe9ria'), (b'NU', 'Niu\xe9'), (b'NF', '\xcele Norfolk'), (b'NO', 'Norv\xe8ge'), (b'MP', '\xceles Mariannes du Nord'), (b'UM', '\xceles Mineures \xc9loign\xe9es des \xc9tats-Unis'), (b'FM', '\xc9tats F\xe9d\xe9r\xe9s de Micron\xe9sie'), (b'MH', '\xceles Marshall'), (b'PW', 'Palaos'), (b'PK', 'Pakistan'), (b'PA', 'Panama'), (b'PG', 'Papouasie-Nouvelle-Guin\xe9e'), (b'PY', 'Paraguay'), (b'PE', 'P\xe9rou'), (b'PH', 'Philippines'), (b'PN', 'Pitcairn'), (b'PL', 'Pologne'), (b'PT', 'Portugal'), (b'GW', 'Guin\xe9e-Bissau'), (b'TL', 'Timor-Leste'), (b'PR', 'Porto Rico'), (b'QA', 'Qatar'), (b'RE', 'R\xe9union'), (b'RO', 'Roumanie'), (b'RU', 'F\xe9d\xe9ration de Russie'), (b'RW', 'Rwanda'), (b'SH', 'Sainte-H\xe9l\xe8ne'), (b'KN', 'Saint-Kitts-et-Nevis'), (b'AI', 'Anguilla'), (b'LC', 'Sainte-Lucie'), (b'PM', 'Saint-Pierre-et-Miquelon'), (b'VC', 'Saint-Vincent-et-les Grenadines'), (b'SM', 'Saint-Marin'), (b'ST', 'Sao Tom\xe9-et-Principe'), (b'SA', 'Arabie Saoudite'), (b'SN', 'S\xe9n\xe9gal'), (b'SC', 'Seychelles'), (b'SL', 'Sierra Leone'), (b'SG', 'Singapour'), (b'SK', 'Slovaquie'), (b'VN', 'Viet Nam'), (b'SI', 'Slov\xe9nie'), (b'SO', 'Somalie'), (b'ZA', 'Afrique du Sud'), (b'ZW', 'Zimbabwe'), (b'ES', 'Espagne'), (b'EH', 'Sahara Occidental'), (b'SD', 'Soudan'), (b'SR', 'Suriname'), (b'SJ', 'Svalbard et\xcele Jan Mayen'), (b'SZ', 'Swaziland'), (b'SE', 'Su\xe8de'), (b'CH', 'Suisse'), (b'SY', 'R\xe9publique Arabe Syrienne'), (b'TJ', 'Tadjikistan'), (b'TH', 'Tha\xeflande'), (b'TG', 'Togo'), (b'TK', 'Tokelau'), (b'TO', 'Tonga'), (b'TT', 'Trinit\xe9-et-Tobago'), (b'AE', '\xc9mirats Arabes Unis'), (b'TN', 'Tunisie'), (b'TR', 'Turquie'), (b'TM', 'Turkm\xe9nistan'), (b'TC', '\xceles Turks et Ca\xefques'), (b'TV', 'Tuvalu'), (b'UG', 'Ouganda'), (b'UA', 'Ukraine'), (b'MK', "L'ex-R\xe9publique Yougoslave de Mac\xe9doine"), (b'EG', '\xc9gypte'), (b'GB', 'Royaume-Uni'), (b'IM', '\xcele de Man'), (b'TZ', 'R\xe9publique-Unie de Tanzanie'), (b'US', '\xc9tats-Unis'), (b'VI', '\xceles Vierges des \xc9tats-Unis'), (b'BF', 'Burkina Faso'), (b'UY', 'Uruguay'), (b'UZ', 'Ouzb\xe9kistan'), (b'VE', 'Venezuela'), (b'WF', 'Wallis et Futuna'), (b'WS', 'Samoa'), (b'YE', 'Y\xe9men'), (b'CS', 'Serbie-et-Mont\xe9n\xe9gro'), (b'ZM', 'Zambie')], max_length=2, verbose_name='Pays')), + ('coord', django.contrib.gis.db.models.fields.PointField(geography=True, srid=4326, verbose_name='Coordonn\xe9es')), + ], + options={ + 'verbose_name': 'Lieu', + 'verbose_name_plural': 'Lieux', + }, + ), + migrations.CreateModel( + name='Normalien', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('nom', models.CharField(blank=True, max_length=255, verbose_name='Nom complet')), + ('promotion', models.CharField(blank=True, max_length=40, verbose_name='Promotion')), + ('mail', models.EmailField(blank=True, max_length=200, verbose_name='Adresse e-mail permanente')), + ('contactez_moi', models.BooleanField(default=True, verbose_name='Inviter les visiteurs \xe0 me contacter')), + ('bio', models.TextField(blank=True, default='', verbose_name='\xc0 propos de moi')), + ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='profil', to=settings.AUTH_USER_MODEL)), + ], + options={ + 'verbose_name': 'Profil \xe9l\xe8ve', + 'verbose_name_plural': 'Profils \xe9l\xe8ves', + }, + ), + migrations.CreateModel( + name='Stage', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('public', models.BooleanField(default=False, verbose_name='Visible publiquement')), + ('date_creation', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Cr\xe9\xe9 le')), + ('date_maj', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Mis \xe0 jour le')), + ('sujet', models.CharField(max_length=500, verbose_name='Sujet')), + ('date_debut', models.DateField(null=True, verbose_name='Date de d\xe9but')), + ('date_fin', models.DateField(null=True, verbose_name='Date de fin')), + ('type_stage', models.CharField(choices=[('Recherche :', ((b'recherche', 'Stage acad\xe9mique'), (b'recherche_autre', 'Stage non-acad\xe9mique'), (b'sejour_dri', 'S\xe9jour de recherche DRI'))), ('Stage sans vis\xe9e de recherche :', ((b'pro', 'Stage en entreprise'), (b'admin', 'Stage en admin./ONG/orga. internationale'))), ('Enseignement :', ((b'lectorat', 'Lectorat DRI'), (b'autre_teach', "Autre exp\xe9rience d'enseignement"))), (b'autre', 'Autre')], default='stage', max_length=31, verbose_name='Type')), + ('niveau_scol', models.CharField(blank=True, choices=[(b'L3', 'Licence 3'), (b'M1', 'Master 1'), (b'M2', 'Master 2'), (b'DOC', 'Pr\xe9-doctorat'), (b'CST', 'C\xe9sure'), (b'BLA', 'Ann\xe9e blanche'), (b'VAC', 'Vacances scolaires'), (b'MIT', 'Mi-temps en parall\xe8le des \xe9tudes'), (b'', 'Autre')], default='', max_length=3, verbose_name='Ann\xe9e de scolarit\xe9')), + ('encadrants', models.CharField(blank=True, max_length=500, verbose_name='Encadrant\u22c5e\u22c5s')), + ('structure', models.CharField(blank=True, max_length=500, verbose_name="Structure d'accueil")), + ('auteur', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='stages', to='avisstage.Normalien')), + ('lieux', models.ManyToManyField(blank=True, related_name='stages', through='avisstage.AvisLieu', to='avisstage.Lieu')), + ], + options={ + 'verbose_name': 'Stage', + }, + ), + migrations.CreateModel( + name='StageMatiere', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('nom', models.CharField(max_length=30, verbose_name='Nom')), + ('slug', models.SlugField()), + ], + options={ + 'verbose_name': 'Mati\xe8re des stages', + 'verbose_name_plural': 'Mati\xe8res des stages', + }, + ), + migrations.AddField( + model_name='stage', + name='matieres', + field=models.ManyToManyField(related_name='stages', to='avisstage.StageMatiere', verbose_name='Mati\xe8re(s)'), + ), + migrations.AddField( + model_name='stage', + name='thematiques', + field=taggit_autosuggest.managers.TaggableManager(blank=True, help_text='A comma-separated list of tags.', through='taggit.TaggedItem', to='taggit.Tag', verbose_name='Th\xe9matiques'), + ), + migrations.AddField( + model_name='avisstage', + name='stage', + field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='avis_stage', to='avisstage.Stage'), + ), + migrations.AddField( + model_name='avislieu', + name='lieu', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='avisstage.Lieu'), + ), + migrations.AddField( + model_name='avislieu', + name='stage', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='avisstage.Stage'), + ), + ]