summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Dauvergne <bdauvergne@entrouvert.com>2020-04-15 08:46:49 (GMT)
committerBenjamin Dauvergne <bdauvergne@entrouvert.com>2020-04-15 08:47:26 (GMT)
commitc8de0807ac7ea34b5762d96d15d5e2b78ae6b3fb (patch)
tree8bad9dd7c8c106d089878cc0474bcc1f273c908c
parente971a8f8a4ccfbf246a16d2119620bd855252193 (diff)
downloadpasserelle-atreal-openads-c8de0807ac7ea34b5762d96d15d5e2b78ae6b3fb.zip
passerelle-atreal-openads-c8de0807ac7ea34b5762d96d15d5e2b78ae6b3fb.tar.gz
passerelle-atreal-openads-c8de0807ac7ea34b5762d96d15d5e2b78ae6b3fb.tar.bz2
misc: add proper 0002 migration (#39544)
0001 should never be modified apart from cosmetic changes.
-rw-r--r--atreal_openads/migrations/0002_auto_20200415_0341.py241
-rwxr-xr-xmanage.py3
2 files changed, 243 insertions, 1 deletions
diff --git a/atreal_openads/migrations/0002_auto_20200415_0341.py b/atreal_openads/migrations/0002_auto_20200415_0341.py
new file mode 100644
index 0000000..3f63157
--- /dev/null
+++ b/atreal_openads/migrations/0002_auto_20200415_0341.py
@@ -0,0 +1,241 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.11.29 on 2020-04-15 08:41
+from __future__ import unicode_literals
+
+import atreal_openads.utils
+from django.db import migrations, models
+import django.db.models.deletion
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('atreal_openads', '0001_initial'),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='Collectivite',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('name', models.CharField(blank=True, default='', max_length=150, verbose_name='Name')),
+ ('openADS_id', models.PositiveIntegerField(help_text='ex: 3', verbose_name='openADS identifier')),
+ ],
+ options={
+ 'verbose_name': 'Collectivite',
+ 'ordering': ['name'],
+ },
+ bases=(models.Model, atreal_openads.utils.BaseModel),
+ ),
+ migrations.CreateModel(
+ name='Guichet',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('ouverture_jour_h', models.TimeField(help_text='ex: 08:30', verbose_name='Hour of opening (each day)')),
+ ('fermeture_jour_h', models.TimeField(help_text='ex: 17:00', verbose_name='Hour of closing (each day)')),
+ ('ouverture_sem_d', models.PositiveIntegerField(choices=[(1, 'Monday'), (2, 'Tuesday'), (3, 'Wednesday'), (4, 'Thursday'), (5, 'Friday'), (6, 'Saturday'), (7, 'Sunday')], default=1, help_text='ex: Lundi', verbose_name='Day of opening (each week)')),
+ ('fermeture_sem_d', models.PositiveIntegerField(choices=[(1, 'Monday'), (2, 'Tuesday'), (3, 'Wednesday'), (4, 'Thursday'), (5, 'Friday'), (6, 'Saturday'), (7, 'Sunday')], default=6, help_text='ex: Samedi', verbose_name='Day of closing (each week)')),
+ ('ouverture_sem_h', models.TimeField(help_text='ex: 08:30', verbose_name='Hour of opening (on opening day)')),
+ ('fermeture_sem_h', models.TimeField(help_text='ex: 12:15', verbose_name='Hour of closing (on closing day)')),
+ ],
+ options={
+ 'verbose_name': 'Guichet',
+ 'verbose_name_plural': 'Guichets',
+ 'ordering': ['collectivite'],
+ },
+ bases=(models.Model, atreal_openads.utils.BaseModel),
+ ),
+ migrations.AlterModelOptions(
+ name='atrealopenads',
+ options={'ordering': ['openADS_API_url'], 'verbose_name': 'openADS', 'verbose_name_plural': 'openADS'},
+ ),
+ migrations.AlterModelOptions(
+ name='forwardfile',
+ options={'ordering': ['-last_update_datetime'], 'verbose_name': 'Forward File'},
+ ),
+ migrations.RemoveField(
+ model_name='atrealopenads',
+ name='collectivite',
+ ),
+ migrations.RemoveField(
+ model_name='atrealopenads',
+ name='myjobs',
+ ),
+ migrations.RemoveField(
+ model_name='atrealopenads',
+ name='openADS_API_key',
+ ),
+ migrations.AddField(
+ model_name='atrealopenads',
+ name='basic_auth_password',
+ field=models.CharField(blank=True, max_length=128, verbose_name='Basic authentication password'),
+ ),
+ migrations.AddField(
+ model_name='atrealopenads',
+ name='basic_auth_username',
+ field=models.CharField(blank=True, max_length=128, verbose_name='Basic authentication username'),
+ ),
+ migrations.AddField(
+ model_name='atrealopenads',
+ name='client_certificate',
+ field=models.FileField(blank=True, null=True, upload_to='', verbose_name='TLS client certificate'),
+ ),
+ migrations.AddField(
+ model_name='atrealopenads',
+ name='default_collectivite_openADS_id',
+ field=models.PositiveIntegerField(blank=True, default=0, help_text='ex: 3', verbose_name="Default 'collectivite' (identifier in openADS)"),
+ ),
+ migrations.AddField(
+ model_name='atrealopenads',
+ name='http_proxy',
+ field=models.CharField(blank=True, max_length=128, verbose_name='HTTP and HTTPS proxy'),
+ ),
+ migrations.AddField(
+ model_name='atrealopenads',
+ name='trusted_certificate_authorities',
+ field=models.FileField(blank=True, null=True, upload_to='', verbose_name='TLS trusted CAs'),
+ ),
+ migrations.AddField(
+ model_name='atrealopenads',
+ name='verify_cert',
+ field=models.BooleanField(default=True, verbose_name='TLS verify certificates'),
+ ),
+ migrations.AddField(
+ model_name='forwardfile',
+ name='connecteur',
+ field=models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, related_name='forward_files', related_query_name='forward_file', to='atreal_openads.AtrealOpenads'),
+ preserve_default=False,
+ ),
+ migrations.AddField(
+ model_name='forwardfile',
+ name='size',
+ field=models.PositiveIntegerField(default=0, verbose_name='Size'),
+ ),
+ migrations.AddField(
+ model_name='forwardfile',
+ name='upload_attempt',
+ field=models.PositiveIntegerField(blank=True, default=0, verbose_name='Upload attempt'),
+ ),
+ migrations.AlterField(
+ model_name='atrealopenads',
+ name='users',
+ field=models.ManyToManyField(blank=True, related_name='_atrealopenads_users_+', related_query_name='+', to='base.ApiUser'),
+ ),
+ migrations.AlterField(
+ model_name='forwardfile',
+ name='content_type',
+ field=models.CharField(blank=True, default='', max_length=100, verbose_name='Content type'),
+ ),
+ migrations.AlterField(
+ model_name='forwardfile',
+ name='file_hash',
+ field=models.CharField(blank=True, default='', max_length=100, verbose_name='Hash'),
+ ),
+ migrations.AlterField(
+ model_name='forwardfile',
+ name='last_update_datetime',
+ field=models.DateTimeField(auto_now=True, verbose_name='Last update'),
+ ),
+ migrations.AlterField(
+ model_name='forwardfile',
+ name='numero_demande',
+ field=models.CharField(max_length=20, verbose_name='Tracking code'),
+ ),
+ migrations.AlterField(
+ model_name='forwardfile',
+ name='numero_dossier',
+ field=models.CharField(max_length=20, verbose_name='Numero dossier'),
+ ),
+ migrations.AlterField(
+ model_name='forwardfile',
+ name='orig_filename',
+ field=models.CharField(blank=True, default='', max_length=100, verbose_name='Filename'),
+ ),
+ migrations.AlterField(
+ model_name='forwardfile',
+ name='type_fichier',
+ field=models.CharField(max_length=10, verbose_name='Type'),
+ ),
+ migrations.AlterField(
+ model_name='forwardfile',
+ name='upload_file',
+ field=models.FileField(blank=True, null=True, upload_to=atreal_openads.utils.get_upload_path, verbose_name='File'),
+ ),
+ migrations.AlterField(
+ model_name='forwardfile',
+ name='upload_msg',
+ field=models.CharField(blank=True, default='', max_length=255, verbose_name='Upload message'),
+ ),
+ migrations.AlterField(
+ model_name='forwardfile',
+ name='upload_status',
+ field=models.CharField(choices=[('pending', 'Pending'), ('uploading', 'Uploading'), ('failed', 'Failed'), ('success', 'Success')], default='pending', max_length=10, verbose_name='Upload status'),
+ ),
+ migrations.AddIndex(
+ model_name='forwardfile',
+ index=models.Index(fields=['connecteur'], name='ff_connecteur_idx'),
+ ),
+ migrations.AddIndex(
+ model_name='forwardfile',
+ index=models.Index(fields=['collectivite'], name='ff_collectivite_idx'),
+ ),
+ migrations.AddIndex(
+ model_name='forwardfile',
+ index=models.Index(fields=['numero_demande', 'numero_dossier'], name='ff_deman_doss_idx'),
+ ),
+ migrations.AddIndex(
+ model_name='forwardfile',
+ index=models.Index(fields=['numero_demande'], name='ff_demande_idx'),
+ ),
+ migrations.AddIndex(
+ model_name='forwardfile',
+ index=models.Index(fields=['numero_dossier'], name='ff_dossier_idx'),
+ ),
+ migrations.AddIndex(
+ model_name='forwardfile',
+ index=models.Index(fields=['orig_filename'], name='ff_filename_idx'),
+ ),
+ migrations.AddIndex(
+ model_name='forwardfile',
+ index=models.Index(fields=['upload_status'], name='ff_status_idx'),
+ ),
+ migrations.AddIndex(
+ model_name='forwardfile',
+ index=models.Index(fields=['last_update_datetime'], name='ff_last_up_dt_idx'),
+ ),
+ migrations.AddField(
+ model_name='guichet',
+ name='collectivite',
+ field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='guichet', to='atreal_openads.Collectivite'),
+ ),
+ migrations.AddField(
+ model_name='collectivite',
+ name='connecteur',
+ field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='collectivites', related_query_name='collectivite', to='atreal_openads.AtrealOpenads'),
+ ),
+ migrations.AddField(
+ model_name='forwardfile',
+ name='collectivite',
+ field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='forward_files', related_query_name='forward_file', to='atreal_openads.Collectivite'),
+ ),
+ migrations.AddIndex(
+ model_name='guichet',
+ index=models.Index(fields=['collectivite'], name='su_collectivite_idx'),
+ ),
+ migrations.AddIndex(
+ model_name='collectivite',
+ index=models.Index(fields=['connecteur', 'openADS_id'], name='col_conn_openADSid_idx'),
+ ),
+ migrations.AddIndex(
+ model_name='collectivite',
+ index=models.Index(fields=['connecteur'], name='col_connecteur_idx'),
+ ),
+ migrations.AddIndex(
+ model_name='collectivite',
+ index=models.Index(fields=['openADS_id'], name='col_openADS_id_idx'),
+ ),
+ migrations.AlterUniqueTogether(
+ name='collectivite',
+ unique_together=set([('connecteur', 'openADS_id')]),
+ ),
+ ]
diff --git a/manage.py b/manage.py
index 969754d..2c44049 100755
--- a/manage.py
+++ b/manage.py
@@ -25,7 +25,8 @@ if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "passerelle.settings")
from django.conf import settings
- settings.INSTALLED_APPS += ('atreal_openads',)
+ if 'atreal_openads' not in settings.INSTALLED_APPS:
+ settings.INSTALLED_APPS += ('atreal_openads',)
from django.core.management import execute_from_command_line