5 | Demande erronée
6 |
7 | Le serveur ne peut pas comprendre la requête reçue.
8 |
9 | Le mieux que nous puissions faire est de vous
10 | renvoyer vers la page d’accueil.
11 |
12 | Si vous pensez qu’il s’agit d’une erreur de notre part, vous pouvez aussi nous contacter .
14 |
15 | {% endblock content %}
16 |
--------------------------------------------------------------------------------
/src/templates/admin/admin_lite/change_form.html:
--------------------------------------------------------------------------------
1 | {% extends 'fieldsets_with_inlines/change_form.html' %}
2 |
3 | {% block nav-global %}{% endblock %}
4 |
5 | {% block object-tools-items %}
6 | {% if has_absolute_url %}
9 | Afin de finaliser votre inscription, il vous reste à cliquer sur le lien de confirmation présent dans l’e-mail que vous allez recevoir.
10 |
11 |
12 |
5 |
Action interdite
6 |
7 |
Il semble que vous essayiez d’accéder à un contenu sans la bonne
8 | autorisation.
9 |
10 |
Le mieux que nous puissions faire est de vous
11 | renvoyer vers la page d’accueil.
12 |
13 |
Si vous pensez qu’il s’agit d’une erreur de notre part, vous pouvez aussi nous contacter .
15 |
16 | {% endblock content %}
--------------------------------------------------------------------------------
/src/geofr/management/commands/populate_pnr.py:
--------------------------------------------------------------------------------
1 | import logging
2 |
3 | from django.core.management.base import BaseCommand
4 |
5 | from geofr.services.populate_pnr import populate_pnr
6 |
7 |
8 | class Command(BaseCommand):
9 | """Import the list of Parcs naturels régionaux (PNR)."""
10 |
11 | def handle(self, *args, **options):
12 | logger = logging.getLogger("console_log")
13 | verbosity = int(options["verbosity"])
14 | if verbosity > 1:
15 | logger.setLevel(logging.DEBUG)
16 | else:
17 | logger.setLevel(logging.INFO)
18 |
19 | populate_pnr()
20 |
--------------------------------------------------------------------------------
/src/geofr/migrations/0029_perimeter_is_visible_to_users.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.2.17 on 2021-01-20 19:15
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ("geofr", "0028_auto_20200616_1117"),
10 | ]
11 |
12 | operations = [
13 | migrations.AddField(
14 | model_name="perimeter",
15 | name="is_visible_to_users",
16 | field=models.BooleanField(
17 | default=True, verbose_name="The perimeter is visible to users"
18 | ),
19 | ),
20 | ]
21 |
--------------------------------------------------------------------------------
/src/search/migrations/0036_searchpage_show_text_field.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 3.2.6 on 2021-11-22 14:10
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ("search", "0035_add_tab_title"),
10 | ]
11 |
12 | operations = [
13 | migrations.AddField(
14 | model_name="searchpage",
15 | name="show_text_field",
16 | field=models.BooleanField(
17 | default=False, verbose_name="Montrer le champ « recherche textuelle » ?"
18 | ),
19 | ),
20 | ]
21 |
--------------------------------------------------------------------------------
/src/accounts/migrations/0009_update_emails_to_lowercase.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.2.13 on 2020-09-07 14:34
2 |
3 | from django.db import migrations
4 |
5 |
6 | def update_emails_to_lowercase(apps, schema_editor):
7 | User = apps.get_model("accounts", "User")
8 | users = User.objects.all()
9 | for user in users:
10 | user.email = user.email.lower()
11 | user.save()
12 |
13 |
14 | class Migration(migrations.Migration):
15 |
16 | dependencies = [
17 | ("accounts", "0008_auto_20190115_1127"),
18 | ]
19 |
20 | operations = [migrations.RunPython(update_emails_to_lowercase)]
21 |
--------------------------------------------------------------------------------
/src/aids/migrations/0028_aid_backers.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.1.1 on 2018-09-20 12:34
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ("backers", "0001_initial"),
10 | ("aids", "0027_auto_20180918_1047"),
11 | ]
12 |
13 | operations = [
14 | migrations.AddField(
15 | model_name="aid",
16 | name="backers",
17 | field=models.ManyToManyField(
18 | related_name="aids", to="backers.Backer", verbose_name="Backers"
19 | ),
20 | ),
21 | ]
22 |
--------------------------------------------------------------------------------
/src/static/js/aids/programs_autocomplete.js:
--------------------------------------------------------------------------------
1 | $(document).ready(function () {
2 | $('select#id_programs').select2({
3 | placeholder: "Tous les programmes",
4 | theme: "select2-dsfr select2-dsfr-checkboxes",
5 | dropdownAutoWidth: true,
6 | width: "auto",
7 | closeOnSelect: false,
8 | selectionAdapter: $.fn.select2.amd.require("NumberOfSelectedSelectionAdapter"),
9 | templateSelection: (data) => {
10 | return format_number_of_selected(data)
11 | },
12 | dropdownAdapter: $.fn.select2.amd.require("DropdownWithSearchAdapter")
13 | })
14 | });
15 |
--------------------------------------------------------------------------------
/src/keywords/factories.py:
--------------------------------------------------------------------------------
1 | import factory
2 | from factory.django import DjangoModelFactory
3 |
4 | from keywords.models import SynonymList
5 |
6 |
7 | class SynonymListFactory(DjangoModelFactory):
8 | """Factory for synonym-lists."""
9 |
10 | class Meta:
11 | model = SynonymList
12 |
13 | name = factory.Faker("name")
14 | keywords_list = factory.Faker("text")
15 |
16 | @classmethod
17 | def _create(cls, model_class, *args, **kwargs):
18 | obj = super()._create(model_class, *args, **kwargs)
19 | obj.set_search_vector_keywords_list()
20 | obj.save()
21 | return obj
22 |
--------------------------------------------------------------------------------
/src/organizations/migrations/0003_alter_organization_siren_code.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 3.2.6 on 2021-11-16 15:17
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ("organizations", "0002_alter_organization_ape_code"),
10 | ]
11 |
12 | operations = [
13 | migrations.AlterField(
14 | model_name="organization",
15 | name="siren_code",
16 | field=models.BigIntegerField(
17 | blank=True, null=True, verbose_name="Code SIREN"
18 | ),
19 | ),
20 | ]
21 |
--------------------------------------------------------------------------------
/src/organizations/migrations/0004_alter_organization_siret_code.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 3.2.6 on 2021-11-18 10:09
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ("organizations", "0003_alter_organization_siren_code"),
10 | ]
11 |
12 | operations = [
13 | migrations.AlterField(
14 | model_name="organization",
15 | name="siret_code",
16 | field=models.BigIntegerField(
17 | blank=True, null=True, verbose_name="Code SIRET"
18 | ),
19 | ),
20 | ]
21 |
--------------------------------------------------------------------------------
/src/templates/django/forms/widgets/checkbox_option.html:
--------------------------------------------------------------------------------
1 | {% if widget.attrs.class == "fr-input" %}{% endif %}
2 | {% include "django/forms/widgets/input.html" %}
3 | {% if widget.wrap_label %}
4 |
5 | {% if widget.label.label %}
6 | {{ widget.label.label }}
7 | {{ widget.label.help_text }}
8 | {% else %}
9 | {{ widget.label }}
10 | {% endif %}
11 |
12 | {% endif %}
13 | {% if widget.attrs.class == "fr-input" %}
{% endif %}
--------------------------------------------------------------------------------
/src/accounts/migrations/0027_user_join_organization_date.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 3.2.13 on 2022-06-27 17:39
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ("accounts", "0026_user_invitation_date"),
10 | ]
11 |
12 | operations = [
13 | migrations.AddField(
14 | model_name="user",
15 | name="join_organization_date",
16 | field=models.DateTimeField(
17 | blank=True, null=True, verbose_name="Date d'acceptation de l'invitation"
18 | ),
19 | ),
20 | ]
21 |
--------------------------------------------------------------------------------
/src/aids/migrations/0045_aid_search_vector.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.1.2 on 2018-11-06 14:20
2 |
3 | import django.contrib.postgres.search
4 | from django.db import migrations
5 |
6 |
7 | class Migration(migrations.Migration):
8 |
9 | dependencies = [
10 | ("aids", "0044_auto_20181029_1516"),
11 | ]
12 |
13 | operations = [
14 | migrations.AddField(
15 | model_name="aid",
16 | name="search_vector",
17 | field=django.contrib.postgres.search.SearchVectorField(
18 | null=True, verbose_name="Search vector"
19 | ),
20 | ),
21 | ]
22 |
--------------------------------------------------------------------------------
/src/geofr/migrations/0021_perimeter_contained_in.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.2.1 on 2019-09-19 07:43
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ("geofr", "0020_update_mainland_overseas_perimeters_migration"),
10 | ]
11 |
12 | operations = [
13 | migrations.AddField(
14 | model_name="perimeter",
15 | name="contained_in",
16 | field=models.ManyToManyField(
17 | blank=True, to="geofr.Perimeter", verbose_name="Contained in"
18 | ),
19 | ),
20 | ]
21 |
--------------------------------------------------------------------------------
/src/programs/migrations/0008_program_date_created.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 3.1.7 on 2021-03-05 13:09
2 |
3 | from django.db import migrations, models
4 | import django.utils.timezone
5 |
6 |
7 | class Migration(migrations.Migration):
8 |
9 | dependencies = [
10 | ("programs", "0007_reupload_files"),
11 | ]
12 |
13 | operations = [
14 | migrations.AddField(
15 | model_name="program",
16 | name="date_created",
17 | field=models.DateTimeField(
18 | default=django.utils.timezone.now, verbose_name="Date created"
19 | ),
20 | ),
21 | ]
22 |
--------------------------------------------------------------------------------
/src/static/js/aids/aid_types_autocomplete.js:
--------------------------------------------------------------------------------
1 | $(document).ready(function () {
2 | $('select#id_aid_type').select2({
3 | placeholder: "Toutes les natures d’aide",
4 | theme: "select2-dsfr select2-dsfr-checkboxes",
5 | dropdownAutoWidth: true,
6 | width: "100%",
7 | closeOnSelect: false,
8 | selectionAdapter: $.fn.select2.amd.require("NumberOfSelectedSelectionAdapter"),
9 | templateSelection: (data) => {
10 | return format_number_of_selected(data)
11 | },
12 | dropdownAdapter: $.fn.select2.amd.require("DropdownWithSearchAdapter")
13 | })
14 | });
15 |
--------------------------------------------------------------------------------
/src/aids/migrations/0098_auto_20191220_1103.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.2.8 on 2019-12-20 10:03
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ("aids", "0097_merge_20191220_1103"),
10 | ]
11 |
12 | operations = [
13 | migrations.AlterField(
14 | model_name="aid",
15 | name="is_call_for_project",
16 | field=models.BooleanField(
17 | null=True,
18 | verbose_name="Call for project / Call for expressions of interest",
19 | ),
20 | ),
21 | ]
22 |
--------------------------------------------------------------------------------
/src/search/migrations/0013_searchpage_show_mobilization_steps_field.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.2.13 on 2020-09-10 07:44
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ("search", "0012_auto_20200907_0933"),
10 | ]
11 |
12 | operations = [
13 | migrations.AddField(
14 | model_name="searchpage",
15 | name="show_mobilization_steps_field",
16 | field=models.BooleanField(
17 | default=False, verbose_name="Show mobilization steps filter?"
18 | ),
19 | ),
20 | ]
21 |
--------------------------------------------------------------------------------
/src/static/js/aids/categories_autocomplete.js:
--------------------------------------------------------------------------------
1 | $(document).ready(function () {
2 | $("#id_categories").select2({
3 | placeholder: "Toutes les sous-thématiques",
4 | theme: "select2-dsfr select2-dsfr-checkboxes",
5 | dropdownAutoWidth: true,
6 | width: "auto",
7 |
8 | closeOnSelect: false,
9 | selectionAdapter: $.fn.select2.amd.require("NumberOfSelectedSelectionAdapter"),
10 | templateSelection: (data) => {
11 | return format_number_of_selected(data)
12 | },
13 | dropdownAdapter: $.fn.select2.amd.require("DropdownWithSearchAdapter")
14 | })
15 | });
16 |
--------------------------------------------------------------------------------
/src/aids/migrations/0114_aid_programs.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.2.16 on 2020-09-28 14:43
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ("programs", "0005_remove_program_aids"),
10 | ("aids", "0113_merge_20200923_0900"),
11 | ]
12 |
13 | operations = [
14 | migrations.AddField(
15 | model_name="aid",
16 | name="programs",
17 | field=models.ManyToManyField(
18 | related_name="aids", to="programs.Program", verbose_name="Programs"
19 | ),
20 | ),
21 | ]
22 |
--------------------------------------------------------------------------------
/src/geofr/migrations/0046_alter_perimeterdata_options.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 4.2.4 on 2023-08-07 17:57
2 |
3 | from django.db import migrations
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ("geofr", "0045_financialdata"),
10 | ]
11 |
12 | operations = [
13 | migrations.AlterModelOptions(
14 | name="perimeterdata",
15 | options={
16 | "ordering": ["-date_created"],
17 | "verbose_name": "donnée de périmètre",
18 | "verbose_name_plural": "données de périmètre",
19 | },
20 | ),
21 | ]
22 |
--------------------------------------------------------------------------------
/src/search/migrations/0020_searchpage_date_created.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.2.17 on 2020-12-10 11:14
2 |
3 | from django.db import migrations, models
4 | import django.utils.timezone
5 |
6 |
7 | class Migration(migrations.Migration):
8 |
9 | dependencies = [
10 | ("search", "0019_auto_20201028_1600"),
11 | ]
12 |
13 | operations = [
14 | migrations.AddField(
15 | model_name="searchpage",
16 | name="date_created",
17 | field=models.DateTimeField(
18 | default=django.utils.timezone.now, verbose_name="Date created"
19 | ),
20 | ),
21 | ]
22 |
--------------------------------------------------------------------------------
/src/stats/migrations/0030_alter_aidoriginurlclickevent_options.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 4.1.5 on 2023-02-07 09:00
2 |
3 | from django.db import migrations
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ("stats", "0029_auto_20221202_1053"),
10 | ]
11 |
12 | operations = [
13 | migrations.AlterModelOptions(
14 | name="aidoriginurlclickevent",
15 | options={
16 | "verbose_name": "Événement aide plus d’informations",
17 | "verbose_name_plural": "Événements aide plus d’informations",
18 | },
19 | ),
20 | ]
21 |
--------------------------------------------------------------------------------
/src/aids/migrations/0086_auto_20191119_1517.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.2.7 on 2019-11-19 14:17
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ("aids", "0085_auto_20191118_1129"),
10 | ]
11 |
12 | operations = [
13 | migrations.AlterField(
14 | model_name="aid",
15 | name="start_date",
16 | field=models.DateField(
17 | help_text="When is the application opening?",
18 | null=True,
19 | verbose_name="Start date",
20 | ),
21 | ),
22 | ]
23 |
--------------------------------------------------------------------------------
/src/aids/migrations/0154_alter_aid_date_updated.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 3.2.12 on 2022-03-24 18:49
2 |
3 | from django.db import migrations, models
4 | import django.utils.timezone
5 |
6 |
7 | class Migration(migrations.Migration):
8 |
9 | dependencies = [
10 | ("aids", "0153_alter_aid_targeted_audiences"),
11 | ]
12 |
13 | operations = [
14 | migrations.AlterField(
15 | model_name="aid",
16 | name="date_updated",
17 | field=models.DateTimeField(
18 | default=django.utils.timezone.now, verbose_name="Date de mise à jour"
19 | ),
20 | ),
21 | ]
22 |
--------------------------------------------------------------------------------
/src/projects/migrations/0004_project_key_words.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 3.1.8 on 2021-04-27 13:19
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ("projects", "0003_auto_20210318_1456"),
10 | ]
11 |
12 | operations = [
13 | migrations.AddField(
14 | model_name="project",
15 | name="key_words",
16 | field=models.TextField(
17 | blank=True,
18 | default="",
19 | verbose_name="key words associated to the project",
20 | ),
21 | ),
22 | ]
23 |
--------------------------------------------------------------------------------
/src/static/js/aids/targeted_audiences_autocomplete.js:
--------------------------------------------------------------------------------
1 | $(document).ready(function () {
2 | $('select#id_targeted_audiences').select2({
3 | placeholder: "Toutes les structures",
4 | theme: "select2-dsfr select2-dsfr-checkboxes",
5 | dropdownAutoWidth: true,
6 | width: "100%",
7 | closeOnSelect: false,
8 | selectionAdapter: $.fn.select2.amd.require("NumberOfSelectedSelectionAdapter"),
9 | templateSelection: (data) => {
10 | return format_number_of_selected(data)
11 | },
12 | dropdownAdapter: $.fn.select2.amd.require("DropdownWithSearchAdapter")
13 | })
14 | });
15 |
--------------------------------------------------------------------------------
/src/accounts/migrations/0006_user_similar_aids_alert.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.1.4 on 2018-12-20 09:27
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ("accounts", "0005_user_ml_consent"),
10 | ]
11 |
12 | operations = [
13 | migrations.AddField(
14 | model_name="user",
15 | name="similar_aids_alert",
16 | field=models.BooleanField(
17 | default=False,
18 | verbose_name="Wants to receive alerts when similar aids are published",
19 | ),
20 | ),
21 | ]
22 |
--------------------------------------------------------------------------------
/src/aids/migrations/0078_copy_subvention_rates.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.2.5 on 2019-10-31 10:59
2 |
3 | from django.db import migrations
4 |
5 |
6 | def copy_subvention_rate(apps, schema_editor):
7 | Aid = apps.get_model("aids", "Aid")
8 | aids = Aid.objects.filter(subvention_rate__isnull=False)
9 | for aid in aids:
10 | aid.subvention_rate_range = (None, int(aid.subvention_rate))
11 | aid.save()
12 |
13 |
14 | class Migration(migrations.Migration):
15 |
16 | dependencies = [
17 | ("aids", "0077_aid_subvention_rate_range"),
18 | ]
19 |
20 | operations = [migrations.RunPython(copy_subvention_rate)]
21 |
--------------------------------------------------------------------------------
/src/aids/migrations/0117_auto_20201211_1520.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.2.17 on 2020-12-11 14:20
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ("aids", "0116_auto_20201105_0929"),
10 | ]
11 |
12 | operations = [
13 | migrations.AlterField(
14 | model_name="aid",
15 | name="subvention_comment",
16 | field=models.CharField(
17 | blank=True,
18 | max_length=100,
19 | verbose_name="Subvention rate, optional comment",
20 | ),
21 | ),
22 | ]
23 |
--------------------------------------------------------------------------------
/src/backers/migrations/0006_add_slug_help_text.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.2.16 on 2020-10-06 13:00
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ("backers", "0005_set_backers_slug"),
10 | ]
11 |
12 | operations = [
13 | migrations.AlterField(
14 | model_name="backer",
15 | name="slug",
16 | field=models.SlugField(
17 | help_text="Slug field is set when creating the backer and can not be changed after.",
18 | verbose_name="Slug",
19 | ),
20 | ),
21 | ]
22 |
--------------------------------------------------------------------------------
/src/geofr/management/commands/import_emails_of_municipalities.py:
--------------------------------------------------------------------------------
1 | from django.core.management.base import BaseCommand
2 | from geofr.services.import_mayors import import_emails_of_municipalities
3 |
4 |
5 | class Command(BaseCommand):
6 | """Import extra municipality data."""
7 |
8 | def handle(self, *args, **options):
9 | result = import_emails_of_municipalities()
10 | self.stdout.write(
11 | self.style.SUCCESS(
12 | f"""
13 | {result['nb_treated']} created or updated,
14 | {result['nb_not_treated']} not treated.
15 | """
16 | )
17 | )
18 |
--------------------------------------------------------------------------------
/src/aids/migrations/0083_auto_20191105_1047.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.2.5 on 2019-11-05 09:47
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ("aids", "0082_aid_subvention_comment"),
10 | ]
11 |
12 | operations = [
13 | migrations.AlterField(
14 | model_name="aid",
15 | name="subvention_comment",
16 | field=models.CharField(
17 | blank=True,
18 | max_length=256,
19 | verbose_name="Subvention rate, optional comment",
20 | ),
21 | ),
22 | ]
23 |
--------------------------------------------------------------------------------
/src/backers/migrations/0009_edit_slug_field.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.2.17 on 2020-12-18 09:28
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ("backers", "0008_add_description_field"),
10 | ]
11 |
12 | operations = [
13 | migrations.AlterField(
14 | model_name="backer",
15 | name="slug",
16 | field=models.SlugField(
17 | blank=True,
18 | help_text="Let it empty so it will be autopopulated.",
19 | verbose_name="Slug",
20 | ),
21 | ),
22 | ]
23 |
--------------------------------------------------------------------------------
/src/aids/migrations/0141_aid_search_vector_unaccented.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 3.2.4 on 2021-06-25 14:29
2 |
3 | import django.contrib.postgres.search
4 | from django.db import migrations
5 |
6 |
7 | class Migration(migrations.Migration):
8 |
9 | dependencies = [
10 | ("aids", "0140_auto_20210625_1453"),
11 | ]
12 |
13 | operations = [
14 | migrations.AddField(
15 | model_name="aid",
16 | name="search_vector_unaccented",
17 | field=django.contrib.postgres.search.SearchVectorField(
18 | null=True, verbose_name="Search vector unaccented"
19 | ),
20 | ),
21 | ]
22 |
--------------------------------------------------------------------------------
/src/alerts/factories.py:
--------------------------------------------------------------------------------
1 | from datetime import timedelta
2 |
3 | import factory
4 | from factory.django import DjangoModelFactory
5 | from django.utils import timezone
6 |
7 | from alerts.models import Alert
8 |
9 |
10 | def two_weeks_ago():
11 | return timezone.now() - timedelta(days=14)
12 |
13 |
14 | class AlertFactory(DjangoModelFactory):
15 | class Meta:
16 | model = Alert
17 |
18 | email = factory.Faker("email")
19 | querystring = "text=ademe"
20 | alert_frequency = "weekly"
21 | validated = True
22 | date_validated = factory.LazyFunction(two_weeks_ago)
23 | latest_alert_date = factory.LazyFunction(two_weeks_ago)
24 |
--------------------------------------------------------------------------------
/src/projects/migrations/0008_project_organizations.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 3.2.6 on 2021-09-30 17:19
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ("organizations", "0001_initial"),
10 | ("projects", "0007_project_due_date"),
11 | ]
12 |
13 | operations = [
14 | migrations.AddField(
15 | model_name="project",
16 | name="organizations",
17 | field=models.ManyToManyField(
18 | blank=True, to="organizations.Organization", verbose_name="Structures"
19 | ),
20 | ),
21 | ]
22 |
--------------------------------------------------------------------------------
/src/templates/_form_header.html:
--------------------------------------------------------------------------------
1 | {% if form.errors %}
2 |
3 |
4 | Nous n’avons pas pu traiter votre formulaire car les données
5 | saisies sont invalides et / ou incomplètes. Merci de bien vouloir vérifier
6 | votre saisie et corriger les erreurs avant de réessayer.
7 |
8 |
9 | {% endif %}
10 |
11 | {% if form.non_field_errors %}
12 |