mirror of
https://github.com/ae-utbm/sith.git
synced 2026-09-01 18:19:21 +00:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b6347829c6 | ||
|
|
2099e1bd36 |
@@ -6,7 +6,7 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2026-08-21 14:10+0200\n"
|
||||
"POT-Creation-Date: 2026-09-01 18:32+0200\n"
|
||||
"PO-Revision-Date: 2016-07-18\n"
|
||||
"Last-Translator: Maréchal <thomas.girod@utbm.fr\n"
|
||||
"Language-Team: AE info <ae.info@utbm.fr>\n"
|
||||
@@ -5089,6 +5089,10 @@ msgstr "signalant"
|
||||
msgid "A guide of courses available at UTBM."
|
||||
msgstr "Un guide de tous les cours disponibles à l'UTBM."
|
||||
|
||||
#: pedagogy/templates/pedagogy/guide.jinja
|
||||
msgid "Search UE"
|
||||
msgstr "Recherche d'UE"
|
||||
|
||||
#: pedagogy/templates/pedagogy/guide.jinja
|
||||
#, python-format
|
||||
msgid "%(display_name)s"
|
||||
@@ -5758,6 +5762,18 @@ msgstr "fin de la cotisation"
|
||||
msgid "location"
|
||||
msgstr "lieu"
|
||||
|
||||
#: subscription/models.py
|
||||
msgid "created_at"
|
||||
msgstr "créé le"
|
||||
|
||||
#: subscription/models.py
|
||||
msgid ""
|
||||
"When this subscription was created. This date may differ from the start of "
|
||||
"the subscription."
|
||||
msgstr ""
|
||||
"Quand la cotisation a été créée. Cette date peut différer du début effectif de "
|
||||
"la cotisation."
|
||||
|
||||
#: subscription/models.py
|
||||
msgid "You can not subscribe many time for the same period"
|
||||
msgstr "Vous ne pouvez pas cotiser plusieurs fois pour la même période"
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
# Generated by Django 5.2.17 on 2026-09-01 08:44
|
||||
|
||||
import django.utils.timezone
|
||||
from django.db import migrations, models
|
||||
from django.db.migrations.state import StateApps
|
||||
from django.db.models import F, Value
|
||||
from django.db.models.functions import Least
|
||||
from django.utils.timezone import now
|
||||
|
||||
|
||||
def make_default_creation_date(apps: StateApps, schema_editor):
|
||||
Subscription = apps.get_model("subscription", "Subscription")
|
||||
Subscription.objects.update(
|
||||
created_at=Least(
|
||||
F("subscription_start"), Value(now()), output_field=models.DateTimeField()
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
dependencies = [("subscription", "0016_alter_subscription_subscription_type")]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name="subscription",
|
||||
name="created_at",
|
||||
field=models.DateTimeField(
|
||||
auto_now_add=True,
|
||||
default=django.utils.timezone.now,
|
||||
help_text=(
|
||||
"When this subscription was created. "
|
||||
"This date may differ from the start of the subscription."
|
||||
),
|
||||
verbose_name="created_at",
|
||||
),
|
||||
preserve_default=False,
|
||||
),
|
||||
migrations.RunPython(
|
||||
make_default_creation_date,
|
||||
reverse_code=migrations.RunPython.noop,
|
||||
elidable=True,
|
||||
),
|
||||
]
|
||||
@@ -64,6 +64,14 @@ class Subscription(models.Model):
|
||||
max_length=20,
|
||||
verbose_name=_("location"),
|
||||
)
|
||||
created_at = models.DateTimeField(
|
||||
_("created_at"),
|
||||
help_text=_(
|
||||
"When this subscription was created. "
|
||||
"This date may differ from the start of the subscription."
|
||||
),
|
||||
auto_now_add=True,
|
||||
)
|
||||
|
||||
class Meta:
|
||||
ordering = ["subscription_start"]
|
||||
|
||||
Reference in New Issue
Block a user