From 1e485998c190671084c009fd91af521ed3992064 Mon Sep 17 00:00:00 2001 From: Jean-Marie Favreau Date: Wed, 15 Nov 2023 16:00:08 +0100 Subject: [PATCH] Tentative de rendre fonctionnel le code en version prod --- deployment/scripts/backend/start.sh | 1 + deployment/scripts/wait-db.sh | 1 + docker-compose.prod.yml | 6 +-- .../migrations/0001_initial.py | 51 +++++++++++++++++-- .../migrations/0002_alter_event_category.py | 19 +++++++ ...bmissionform_alter_event_reference_urls.py | 31 ----------- .../migrations/0003_category.py | 23 --------- .../migrations/0004_alter_category_color.py | 19 ------- .../migrations/0005_alter_category_options.py | 17 ------- .../migrations/0006_alter_category_color.py | 19 ------- .../0007_event_category_event_tags.py | 25 --------- ...r_event_reference_urls_alter_event_tags.py | 24 --------- .../migrations/0009_category_plural.py | 19 ------- ...emove_category_plural_category_alt_name.py | 23 --------- .../migrations/0011_alter_event_category.py | 19 ------- .../migrations/0012_staticcontent.py | 22 -------- .../migrations/0013_staticcontent_url_path.py | 19 ------- ...alter_event_image_alter_event_image_alt.py | 23 --------- .../migrations/0015_event_local_image.py | 18 ------- .../0016_alter_event_local_image.py | 18 ------- src/agenda_culturel/models.py | 5 +- src/manage.py | 1 + src/requirements.txt | 36 ++++++------- src/test_app/migrations/0001_initial.py | 23 --------- 24 files changed, 93 insertions(+), 369 deletions(-) create mode 100644 src/agenda_culturel/migrations/0002_alter_event_category.py delete mode 100644 src/agenda_culturel/migrations/0002_eventsubmissionform_alter_event_reference_urls.py delete mode 100644 src/agenda_culturel/migrations/0003_category.py delete mode 100644 src/agenda_culturel/migrations/0004_alter_category_color.py delete mode 100644 src/agenda_culturel/migrations/0005_alter_category_options.py delete mode 100644 src/agenda_culturel/migrations/0006_alter_category_color.py delete mode 100644 src/agenda_culturel/migrations/0007_event_category_event_tags.py delete mode 100644 src/agenda_culturel/migrations/0008_alter_event_reference_urls_alter_event_tags.py delete mode 100644 src/agenda_culturel/migrations/0009_category_plural.py delete mode 100644 src/agenda_culturel/migrations/0010_remove_category_plural_category_alt_name.py delete mode 100644 src/agenda_culturel/migrations/0011_alter_event_category.py delete mode 100644 src/agenda_culturel/migrations/0012_staticcontent.py delete mode 100644 src/agenda_culturel/migrations/0013_staticcontent_url_path.py delete mode 100644 src/agenda_culturel/migrations/0014_alter_event_image_alter_event_image_alt.py delete mode 100644 src/agenda_culturel/migrations/0015_event_local_image.py delete mode 100644 src/agenda_culturel/migrations/0016_alter_event_local_image.py delete mode 100644 src/test_app/migrations/0001_initial.py diff --git a/deployment/scripts/backend/start.sh b/deployment/scripts/backend/start.sh index 5256b42..2797011 100755 --- a/deployment/scripts/backend/start.sh +++ b/deployment/scripts/backend/start.sh @@ -1,5 +1,6 @@ #!/bin/bash + # Run migrations, collect static files and start server if [ "$APP_ENV" != "prod" ]; then python manage.py makemigrations --noinput diff --git a/deployment/scripts/wait-db.sh b/deployment/scripts/wait-db.sh index f75caba..57445ca 100644 --- a/deployment/scripts/wait-db.sh +++ b/deployment/scripts/wait-db.sh @@ -1,3 +1,4 @@ +#!/usr/bin/env bash wait_for_it=$(dirname "$0")/wait-for-it.sh diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 05d7d9b..aa20586 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -20,7 +20,7 @@ services: - "${APP_PORT:-8000}" depends_on: - db - command: [ "/bin/sh", "/app/deployment/scripts/wait-db.sh", "/app/deployment/scripts/backend/start.sh" ] + command: [ "/bin/bash", "/app/deployment/scripts/wait-db.sh", "/app/deployment/scripts/backend/start.sh" ] db: image: postgres:15.2-alpine @@ -60,12 +60,12 @@ services: - db - redis - backend - command: [ "/bin/sh", "/app/deployment/scripts/wait-db.sh", "/app/deployment/scripts/celery/start-worker.sh" ] + command: [ "/bin/bash", "/app/deployment/scripts/wait-db.sh", "/app/deployment/scripts/celery/start-worker.sh" ] celery-beat: <<: *celery-worker container_name: "${APP_NAME}-celery-beat" - command: [ "/bin/sh", "/app/deployment/scripts/wait-db.sh", "/app/deployment/scripts/celery/start-beat.sh" ] + command: [ "/bin/bash", "/app/deployment/scripts/wait-db.sh", "/app/deployment/scripts/celery/start-beat.sh" ] nginx: image: nginx:latest diff --git a/src/agenda_culturel/migrations/0001_initial.py b/src/agenda_culturel/migrations/0001_initial.py index 88e987d..9886636 100644 --- a/src/agenda_culturel/migrations/0001_initial.py +++ b/src/agenda_culturel/migrations/0001_initial.py @@ -1,7 +1,10 @@ -# Generated by Django 4.2.1 on 2023-10-14 16:33 +# Generated by Django 4.2.7 on 2023-11-15 14:57 -import django.contrib.postgres.fields +import ckeditor.fields +import colorfield.fields from django.db import migrations, models +import django.db.models.deletion +import django_better_admin_arrayfield.models.fields class Migration(migrations.Migration): @@ -12,6 +15,41 @@ class Migration(migrations.Migration): ] operations = [ + migrations.CreateModel( + name='Category', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(help_text='Category name', max_length=512, verbose_name='Name')), + ('alt_name', models.CharField(help_text='Alternative name used with a time period', max_length=512, verbose_name='Alternative Name')), + ('codename', models.CharField(help_text='Short name of the category', max_length=3, verbose_name='Short name')), + ('color', colorfield.fields.ColorField(blank=True, default=None, help_text='Color used as background for the category', image_field=None, max_length=25, null=True, samples=None, verbose_name='Color')), + ], + options={ + 'verbose_name': 'Category', + 'verbose_name_plural': 'Categories', + }, + ), + migrations.CreateModel( + name='EventSubmissionForm', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('url', models.URLField(help_text='URL where this event can be found.', max_length=512, verbose_name='URL')), + ], + options={ + 'verbose_name': 'Event submission form', + 'verbose_name_plural': 'Event submissions forms', + 'db_table': 'eventsubmissionform', + }, + ), + migrations.CreateModel( + name='StaticContent', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(help_text='Category name', max_length=512, unique=True, verbose_name='Name')), + ('text', ckeditor.fields.RichTextField(help_text='Text as shown to the visitors', verbose_name='Content')), + ('url_path', models.CharField(help_text='URL path where the content is included.', verbose_name='URL path')), + ], + ), migrations.CreateModel( name='Event', fields=[ @@ -26,9 +64,12 @@ class Migration(migrations.Migration): ('end_time', models.TimeField(blank=True, help_text='Final time', null=True, verbose_name='Final time')), ('location', models.CharField(help_text='Address of the event', max_length=512, verbose_name='Location')), ('description', models.TextField(blank=True, help_text='General description of the event', null=True, verbose_name='Description')), - ('image', models.URLField(blank=True, help_text='URL of the illustration image', null=True, verbose_name='Illustration')), - ('image_alt', models.CharField(blank=True, help_text='Alternative text used by screen readers for the image', max_length=512, null=True, verbose_name='Illustration description')), - ('reference_urls', django.contrib.postgres.fields.ArrayField(base_field=models.URLField(), blank=True, help_text='List of all the urls where this event can be found.', null=True, size=None, verbose_name='URLs')), + ('local_image', models.ImageField(blank=True, help_text='Illustration image stored in the agenda server', max_length=1024, null=True, upload_to='', verbose_name='Illustration (local image)')), + ('image', models.URLField(blank=True, help_text='URL of the illustration image', max_length=1024, null=True, verbose_name='Illustration')), + ('image_alt', models.CharField(blank=True, help_text='Alternative text used by screen readers for the image', max_length=1024, null=True, verbose_name='Illustration description')), + ('reference_urls', django_better_admin_arrayfield.models.fields.ArrayField(base_field=models.URLField(max_length=512), blank=True, help_text='List of all the urls where this event can be found.', null=True, size=None, verbose_name='URLs')), + ('tags', django_better_admin_arrayfield.models.fields.ArrayField(base_field=models.CharField(max_length=64), blank=True, help_text='A list of tags that describe the event.', null=True, size=None, verbose_name='Tags')), + ('category', models.ForeignKey(default=None, help_text='Category of the event', null=True, on_delete=django.db.models.deletion.SET_DEFAULT, to='agenda_culturel.category', verbose_name='Category')), ], options={ 'verbose_name': 'Event', diff --git a/src/agenda_culturel/migrations/0002_alter_event_category.py b/src/agenda_culturel/migrations/0002_alter_event_category.py new file mode 100644 index 0000000..a16dd34 --- /dev/null +++ b/src/agenda_culturel/migrations/0002_alter_event_category.py @@ -0,0 +1,19 @@ +# Generated by Django 4.2.7 on 2023-11-15 14:59 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('agenda_culturel', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='event', + name='category', + field=models.ForeignKey(default=1, help_text='Category of the event', on_delete=django.db.models.deletion.SET_DEFAULT, to='agenda_culturel.category', verbose_name='Category'), + ), + ] diff --git a/src/agenda_culturel/migrations/0002_eventsubmissionform_alter_event_reference_urls.py b/src/agenda_culturel/migrations/0002_eventsubmissionform_alter_event_reference_urls.py deleted file mode 100644 index 8bf1127..0000000 --- a/src/agenda_culturel/migrations/0002_eventsubmissionform_alter_event_reference_urls.py +++ /dev/null @@ -1,31 +0,0 @@ -# Generated by Django 4.2.1 on 2023-10-15 08:51 - -import django.contrib.postgres.fields -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('agenda_culturel', '0001_initial'), - ] - - operations = [ - migrations.CreateModel( - name='EventSubmissionForm', - fields=[ - ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('url', models.URLField(help_text='URL where this event can be found.', max_length=512, verbose_name='URL')), - ], - options={ - 'verbose_name': 'Event submission form', - 'verbose_name_plural': 'Event submissions forms', - 'db_table': 'eventsubmissionform', - }, - ), - migrations.AlterField( - model_name='event', - name='reference_urls', - field=django.contrib.postgres.fields.ArrayField(base_field=models.URLField(max_length=512), blank=True, help_text='List of all the urls where this event can be found.', null=True, size=None, verbose_name='URLs'), - ), - ] diff --git a/src/agenda_culturel/migrations/0003_category.py b/src/agenda_culturel/migrations/0003_category.py deleted file mode 100644 index 1764d3f..0000000 --- a/src/agenda_culturel/migrations/0003_category.py +++ /dev/null @@ -1,23 +0,0 @@ -# Generated by Django 4.2.1 on 2023-10-21 14:59 - -import colorfield.fields -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('agenda_culturel', '0002_eventsubmissionform_alter_event_reference_urls'), - ] - - operations = [ - migrations.CreateModel( - name='Category', - fields=[ - ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(help_text='Category name', max_length=512, verbose_name='Name')), - ('codename', models.CharField(help_text='Short name of the category', max_length=3, verbose_name='Short name')), - ('color', colorfield.fields.ColorField(default='#CCCCCCC', help_text='Color used as background for the category', image_field=None, max_length=25, samples=None, verbose_name='Color')), - ], - ), - ] diff --git a/src/agenda_culturel/migrations/0004_alter_category_color.py b/src/agenda_culturel/migrations/0004_alter_category_color.py deleted file mode 100644 index ce8afc6..0000000 --- a/src/agenda_culturel/migrations/0004_alter_category_color.py +++ /dev/null @@ -1,19 +0,0 @@ -# Generated by Django 4.2.1 on 2023-10-21 19:18 - -import colorfield.fields -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('agenda_culturel', '0003_category'), - ] - - operations = [ - migrations.AlterField( - model_name='category', - name='color', - field=colorfield.fields.ColorField(default='#FFFFFF', help_text='Color used as background for the category', image_field=None, max_length=25, samples=None, verbose_name='Color'), - ), - ] diff --git a/src/agenda_culturel/migrations/0005_alter_category_options.py b/src/agenda_culturel/migrations/0005_alter_category_options.py deleted file mode 100644 index bc0c5b1..0000000 --- a/src/agenda_culturel/migrations/0005_alter_category_options.py +++ /dev/null @@ -1,17 +0,0 @@ -# Generated by Django 4.2.1 on 2023-10-21 19:30 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('agenda_culturel', '0004_alter_category_color'), - ] - - operations = [ - migrations.AlterModelOptions( - name='category', - options={'verbose_name': 'Category', 'verbose_name_plural': 'Categories'}, - ), - ] diff --git a/src/agenda_culturel/migrations/0006_alter_category_color.py b/src/agenda_culturel/migrations/0006_alter_category_color.py deleted file mode 100644 index 5d8048b..0000000 --- a/src/agenda_culturel/migrations/0006_alter_category_color.py +++ /dev/null @@ -1,19 +0,0 @@ -# Generated by Django 4.2.1 on 2023-10-22 16:54 - -import colorfield.fields -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('agenda_culturel', '0005_alter_category_options'), - ] - - operations = [ - migrations.AlterField( - model_name='category', - name='color', - field=colorfield.fields.ColorField(blank=True, default=None, help_text='Color used as background for the category', image_field=None, max_length=25, null=True, samples=None, verbose_name='Color'), - ), - ] diff --git a/src/agenda_culturel/migrations/0007_event_category_event_tags.py b/src/agenda_culturel/migrations/0007_event_category_event_tags.py deleted file mode 100644 index f1b130b..0000000 --- a/src/agenda_culturel/migrations/0007_event_category_event_tags.py +++ /dev/null @@ -1,25 +0,0 @@ -# Generated by Django 4.2.1 on 2023-10-28 19:50 - -import django.contrib.postgres.fields -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('agenda_culturel', '0006_alter_category_color'), - ] - - operations = [ - migrations.AddField( - model_name='event', - name='category', - field=models.ForeignKey(help_text='Category of the event', null=True, on_delete=django.db.models.deletion.SET_NULL, to='agenda_culturel.category', verbose_name='Category'), - ), - migrations.AddField( - model_name='event', - name='tags', - field=django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=64), blank=True, help_text='A list of tags that describe the event.', null=True, size=None, verbose_name='Tags'), - ), - ] diff --git a/src/agenda_culturel/migrations/0008_alter_event_reference_urls_alter_event_tags.py b/src/agenda_culturel/migrations/0008_alter_event_reference_urls_alter_event_tags.py deleted file mode 100644 index d5979dc..0000000 --- a/src/agenda_culturel/migrations/0008_alter_event_reference_urls_alter_event_tags.py +++ /dev/null @@ -1,24 +0,0 @@ -# Generated by Django 4.2.1 on 2023-10-29 13:51 - -from django.db import migrations, models -import django_better_admin_arrayfield.models.fields - - -class Migration(migrations.Migration): - - dependencies = [ - ('agenda_culturel', '0007_event_category_event_tags'), - ] - - operations = [ - migrations.AlterField( - model_name='event', - name='reference_urls', - field=django_better_admin_arrayfield.models.fields.ArrayField(base_field=models.URLField(max_length=512), blank=True, help_text='List of all the urls where this event can be found.', null=True, size=None, verbose_name='URLs'), - ), - migrations.AlterField( - model_name='event', - name='tags', - field=django_better_admin_arrayfield.models.fields.ArrayField(base_field=models.CharField(max_length=64), blank=True, help_text='A list of tags that describe the event.', null=True, size=None, verbose_name='Tags'), - ), - ] diff --git a/src/agenda_culturel/migrations/0009_category_plural.py b/src/agenda_culturel/migrations/0009_category_plural.py deleted file mode 100644 index ceba810..0000000 --- a/src/agenda_culturel/migrations/0009_category_plural.py +++ /dev/null @@ -1,19 +0,0 @@ -# Generated by Django 4.2.1 on 2023-10-29 21:14 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('agenda_culturel', '0008_alter_event_reference_urls_alter_event_tags'), - ] - - operations = [ - migrations.AddField( - model_name='category', - name='plural', - field=models.CharField(default='1', help_text='Category name (plural)', max_length=512, verbose_name='Plural nName'), - preserve_default=False, - ), - ] diff --git a/src/agenda_culturel/migrations/0010_remove_category_plural_category_alt_name.py b/src/agenda_culturel/migrations/0010_remove_category_plural_category_alt_name.py deleted file mode 100644 index 812b55a..0000000 --- a/src/agenda_culturel/migrations/0010_remove_category_plural_category_alt_name.py +++ /dev/null @@ -1,23 +0,0 @@ -# Generated by Django 4.2.1 on 2023-10-29 21:22 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('agenda_culturel', '0009_category_plural'), - ] - - operations = [ - migrations.RemoveField( - model_name='category', - name='plural', - ), - migrations.AddField( - model_name='category', - name='alt_name', - field=models.CharField(default='1', help_text='Alternative name used with a time period', max_length=512, verbose_name='Alternative Name'), - preserve_default=False, - ), - ] diff --git a/src/agenda_culturel/migrations/0011_alter_event_category.py b/src/agenda_culturel/migrations/0011_alter_event_category.py deleted file mode 100644 index ec340b9..0000000 --- a/src/agenda_culturel/migrations/0011_alter_event_category.py +++ /dev/null @@ -1,19 +0,0 @@ -# Generated by Django 4.2.1 on 2023-11-08 11:24 - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('agenda_culturel', '0010_remove_category_plural_category_alt_name'), - ] - - operations = [ - migrations.AlterField( - model_name='event', - name='category', - field=models.ForeignKey(default=47, help_text='Category of the event', on_delete=django.db.models.deletion.SET_DEFAULT, to='agenda_culturel.category', verbose_name='Category'), - ), - ] diff --git a/src/agenda_culturel/migrations/0012_staticcontent.py b/src/agenda_culturel/migrations/0012_staticcontent.py deleted file mode 100644 index 247f7ed..0000000 --- a/src/agenda_culturel/migrations/0012_staticcontent.py +++ /dev/null @@ -1,22 +0,0 @@ -# Generated by Django 4.2.1 on 2023-11-09 21:35 - -import ckeditor.fields -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('agenda_culturel', '0011_alter_event_category'), - ] - - operations = [ - migrations.CreateModel( - name='StaticContent', - fields=[ - ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(help_text='Category name', max_length=512, unique=True, verbose_name='Name')), - ('text', ckeditor.fields.RichTextField(help_text='Text as shown to the visitors', verbose_name='Content')), - ], - ), - ] diff --git a/src/agenda_culturel/migrations/0013_staticcontent_url_path.py b/src/agenda_culturel/migrations/0013_staticcontent_url_path.py deleted file mode 100644 index db02d84..0000000 --- a/src/agenda_culturel/migrations/0013_staticcontent_url_path.py +++ /dev/null @@ -1,19 +0,0 @@ -# Generated by Django 4.2.1 on 2023-11-09 22:05 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('agenda_culturel', '0012_staticcontent'), - ] - - operations = [ - migrations.AddField( - model_name='staticcontent', - name='url_path', - field=models.CharField(default='', help_text='URL path where the content is included.', verbose_name='URL path'), - preserve_default=False, - ), - ] diff --git a/src/agenda_culturel/migrations/0014_alter_event_image_alter_event_image_alt.py b/src/agenda_culturel/migrations/0014_alter_event_image_alter_event_image_alt.py deleted file mode 100644 index 327c1cf..0000000 --- a/src/agenda_culturel/migrations/0014_alter_event_image_alter_event_image_alt.py +++ /dev/null @@ -1,23 +0,0 @@ -# Generated by Django 4.2.1 on 2023-11-11 17:42 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('agenda_culturel', '0013_staticcontent_url_path'), - ] - - operations = [ - migrations.AlterField( - model_name='event', - name='image', - field=models.URLField(blank=True, help_text='URL of the illustration image', max_length=1024, null=True, verbose_name='Illustration'), - ), - migrations.AlterField( - model_name='event', - name='image_alt', - field=models.CharField(blank=True, help_text='Alternative text used by screen readers for the image', max_length=1024, null=True, verbose_name='Illustration description'), - ), - ] diff --git a/src/agenda_culturel/migrations/0015_event_local_image.py b/src/agenda_culturel/migrations/0015_event_local_image.py deleted file mode 100644 index 9c19e0d..0000000 --- a/src/agenda_culturel/migrations/0015_event_local_image.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 4.2.1 on 2023-11-11 20:08 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('agenda_culturel', '0014_alter_event_image_alter_event_image_alt'), - ] - - operations = [ - migrations.AddField( - model_name='event', - name='local_image', - field=models.URLField(blank=True, help_text='Illustration image stored in the agenda server', max_length=1024, null=True, verbose_name='Illustration (local image)'), - ), - ] diff --git a/src/agenda_culturel/migrations/0016_alter_event_local_image.py b/src/agenda_culturel/migrations/0016_alter_event_local_image.py deleted file mode 100644 index 67a357b..0000000 --- a/src/agenda_culturel/migrations/0016_alter_event_local_image.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 4.2.1 on 2023-11-11 20:15 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('agenda_culturel', '0015_event_local_image'), - ] - - operations = [ - migrations.AlterField( - model_name='event', - name='local_image', - field=models.ImageField(blank=True, help_text='Illustration image stored in the agenda server', max_length=1024, null=True, upload_to='', verbose_name='Illustration (local image)'), - ), - ] diff --git a/src/agenda_culturel/models.py b/src/agenda_culturel/models.py index 059eae5..9d64cf7 100644 --- a/src/agenda_culturel/models.py +++ b/src/agenda_culturel/models.py @@ -130,7 +130,10 @@ class Event(models.Model): verbose_name_plural = _('Events') def get_all_tags(): - tags = list(Event.objects.values_list('tags', flat = True)) + try: + tags = list(Event.objects.values_list('tags', flat = True)) + except: + tags = [] uniq_tags = set() for t in tags: if t is not None: diff --git a/src/manage.py b/src/manage.py index 0a2ded9..defbb4f 100755 --- a/src/manage.py +++ b/src/manage.py @@ -16,6 +16,7 @@ def main(): "available on your PYTHONPATH environment variable? Did you " "forget to activate a virtual environment?" ) from exc + print("commande: " + str(sys.argv)) execute_from_command_line(sys.argv) diff --git a/src/requirements.txt b/src/requirements.txt index 39b2a19..f6f6888 100644 --- a/src/requirements.txt +++ b/src/requirements.txt @@ -1,26 +1,26 @@ -amqp==5.1.1 -asgiref==3.6.0 -billiard==3.6.4.0 -celery==5.2.7 -click==8.1.3 +amqp==5.2.0 +asgiref==3.7.2 +billiard==4.2.0 +celery==5.3.5 +click==8.1.7 click-didyoumean==0.3.0 click-plugins==1.1.1 click-repl==0.2.0 -Django==4.2.1 -django-cors-headers==3.14.0 -gunicorn==20.1.0 -kombu==5.2.4 -prompt-toolkit==3.0.38 -psycopg==3.1.9 -pytz==2023.3 +Django==4.2.7 +django-cors-headers==4.3.1 +gunicorn==21.2.0 +kombu==5.3.3 +prompt-toolkit==3.0.41 +psycopg==3.1.12 +pytz==2023.3.post1 six==1.16.0 sqlparse==0.4.4 -typing_extensions==4.5.0 -vine==5.0.0 -wcwidth==0.2.6 -redis==4.5.5 -whitenoise==6.4.0 -selenium==4.14.0 +typing_extensions==4.8.0 +vine==5.1.0 +wcwidth==0.2.10 +redis==5.0.1 +whitenoise==6.6.0 +selenium==4.15.2 BeautifulSoup4==4.12.2 watchdog==3.0.0 django-colorfield==0.10.1 diff --git a/src/test_app/migrations/0001_initial.py b/src/test_app/migrations/0001_initial.py deleted file mode 100644 index 0ae6606..0000000 --- a/src/test_app/migrations/0001_initial.py +++ /dev/null @@ -1,23 +0,0 @@ -# Generated by Django 4.2.1 on 2023-05-10 11:29 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ] - - operations = [ - migrations.CreateModel( - name='TestModel', - fields=[ - ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=255)), - ('description', models.TextField()), - ('file', models.FileField(upload_to='test_app/files/')), - ], - ), - ]