Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/major/4' into feature/attachment…
Browse files Browse the repository at this point in the history
…_filename_generator
  • Loading branch information
miggol committed Jan 6, 2025
2 parents f11758f + 303c3e1 commit 24b9194
Show file tree
Hide file tree
Showing 50 changed files with 2,461 additions and 1,966 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 4.2.11 on 2024-12-05 11:27
# Generated by Django 4.2.11 on 2024-12-18 16:13

from django.db import migrations, models

Expand All @@ -18,6 +18,17 @@ class Migration(migrations.Migration):
default="",
help_text="Geef hier optioneel je motivatie om dit bestand toe te voegen en waar je het voor gaat gebruiken tijdens je onderzoek. Eventuele opmerkingen voor de FETC kun je hier ook kwijt.",
max_length=2000,
verbose_name="Opmerkingen",
),
),
migrations.AlterField(
model_name="attachment",
name="name",
field=models.CharField(
default="",
help_text="Geef je bestand een omschrijvende naam, het liefst maar enkele woorden.",
max_length=50,
verbose_name="Bestandsnaam",
),
),
]
23 changes: 23 additions & 0 deletions attachments/migrations/0007_alter_attachment_name.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 4.2.11 on 2024-12-19 12:38

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("attachments", "0006_alter_attachment_comments_alter_attachment_name"),
]

operations = [
migrations.AlterField(
model_name="attachment",
name="name",
field=models.CharField(
default="",
help_text="Geef je bestand een omschrijvende naam, het liefst maar enkele woorden.",
max_length=50,
verbose_name="Omschrijving",
),
),
]
2 changes: 2 additions & 0 deletions attachments/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,15 @@ class Attachment(models.Model, renderable):
verbose_name=_("Type bestand"),
)
name = models.CharField(
verbose_name=_("Omschrijving"),
max_length=50,
default="",
help_text=_(
"Geef je bestand een omschrijvende naam, het liefst " "maar enkele woorden."
),
)
comments = models.TextField(
verbose_name=_("Opmerkingen"),
max_length=2000,
default="",
help_text=_(
Expand Down
19 changes: 0 additions & 19 deletions interventions/utils.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,3 @@
from django.urls import reverse
from django.utils.translation import gettext as _

from main.utils import AvailableURL


def intervention_url(study):
"""
Returns the available URLs for an Intervention
"""
result = AvailableURL(title=_("Interventieonderzoek"), margin=2)
if study.has_intervention:
if hasattr(study, "intervention"):
result.url = reverse("interventions:update", args=(study.intervention.pk,))
else:
result.url = reverse("interventions:create", args=(study.pk,))
return result


def copy_intervention_to_study(study, original_intervention):
"""
Copies the given Intervention to the given Study
Expand Down
Loading

0 comments on commit 24b9194

Please sign in to comment.