Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions kiosk/migrations/0008_kioskitem_updated_at.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 4.1.13 on 2025-09-03 11:26

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("kiosk", "0007_auto_20230823_1138"),
]

operations = [
migrations.AddField(
model_name="kioskitem",
name="updated_at",
field=models.DateTimeField(auto_now=True),
),
]
1 change: 1 addition & 0 deletions kiosk/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class KioskItem(models.Model):
name = models.CharField(max_length=100, blank=True, null=True, unique=False)
notes = models.CharField(max_length=2000, blank=True, null=True)
uploaded_date = models.DateField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)
active = models.BooleanField(default=True)
media = models.FileField(upload_to='kiosk', null=False, validators=[validate_file_extension])
ordering = models.IntegerField(null=False, default=random_ordering, blank=False)
Expand Down
27 changes: 27 additions & 0 deletions razzia/migrations/0003_razzia_created_at_razzia_updated_at.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Generated by Django 4.1.13 on 2025-09-03 11:26

from django.db import migrations, models
import django.utils.timezone


class Migration(migrations.Migration):

dependencies = [
("razzia", "0002_alter_razzia_options"),
]

operations = [
migrations.AddField(
model_name="razzia",
name="created_at",
field=models.DateTimeField(
auto_now_add=True, default=django.utils.timezone.now
),
preserve_default=False,
),
migrations.AddField(
model_name="razzia",
name="updated_at",
field=models.DateTimeField(auto_now=True),
),
]
2 changes: 2 additions & 0 deletions razzia/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ class Meta:

members = models.ManyToManyField(Member, through='RazziaEntry')
start_date = models.DateTimeField(auto_now_add=True)
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)


class RazziaEntry(models.Model):
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# Generated by Django 4.1.13 on 2025-09-03 11:26

from django.db import migrations, models
import django.utils.timezone


class Migration(migrations.Migration):

dependencies = [
("stregsystem", "0022_productnote"),
]

operations = [
migrations.AddField(
model_name="member",
name="created_at",
field=models.DateTimeField(
auto_now_add=True, default=django.utils.timezone.now
),
preserve_default=False,
),
migrations.AddField(
model_name="member",
name="updated_at",
field=models.DateTimeField(auto_now=True),
),
migrations.AddField(
model_name="news",
name="created_at",
field=models.DateTimeField(
auto_now_add=True, default=django.utils.timezone.now
),
preserve_default=False,
),
migrations.AddField(
model_name="news",
name="updated_at",
field=models.DateTimeField(auto_now=True),
),
migrations.AddField(
model_name="payment",
name="created_at",
field=models.DateTimeField(
auto_now_add=True, default=django.utils.timezone.now
),
preserve_default=False,
),
migrations.AddField(
model_name="payment",
name="updated_at",
field=models.DateTimeField(auto_now=True),
),
migrations.AddField(
model_name="pendingsignup",
name="created_at",
field=models.DateTimeField(
auto_now_add=True, default=django.utils.timezone.now
),
preserve_default=False,
),
migrations.AddField(
model_name="pendingsignup",
name="updated_at",
field=models.DateTimeField(auto_now=True),
),
migrations.AddField(
model_name="product",
name="created_at",
field=models.DateTimeField(
auto_now_add=True, default=django.utils.timezone.now
),
preserve_default=False,
),
migrations.AddField(
model_name="product",
name="updated_at",
field=models.DateTimeField(auto_now=True),
),
migrations.AddField(
model_name="productnote",
name="created_at",
field=models.DateTimeField(
auto_now_add=True, default=django.utils.timezone.now
),
preserve_default=False,
),
migrations.AddField(
model_name="productnote",
name="updated_at",
field=models.DateTimeField(auto_now=True),
),
migrations.AddField(
model_name="sale",
name="created_at",
field=models.DateTimeField(
auto_now_add=True, default=django.utils.timezone.now
),
preserve_default=False,
),
migrations.AddField(
model_name="sale",
name="updated_at",
field=models.DateTimeField(auto_now=True),
),
migrations.AddField(
model_name="theme",
name="created_at",
field=models.DateTimeField(
auto_now_add=True, default=django.utils.timezone.now
),
preserve_default=False,
),
migrations.AddField(
model_name="theme",
name="updated_at",
field=models.DateTimeField(auto_now=True),
),
]
16 changes: 16 additions & 0 deletions stregsystem/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ class Member(models.Model): # id automatisk...
undo_count = models.IntegerField(default=0) # for 'undos' i alt
notes = models.TextField(blank=True)
signup_due_paid = models.BooleanField(default=True)
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)

stregforbud_override = False

Expand Down Expand Up @@ -347,6 +349,8 @@ class Meta:
timestamp = models.DateTimeField(auto_now_add=True)
amount = models.IntegerField() # penge, oere...
notes = models.TextField(blank=True)
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)

@deprecated
def amount_display(self):
Expand Down Expand Up @@ -586,6 +590,8 @@ class Product(models.Model): # id automatisk...
rooms = models.ManyToManyField(Room, blank=True)
alcohol_content_ml = models.FloatField(default=0.0, null=True)
caffeine_content_mg = models.IntegerField(default=0)
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)

@deprecated
def __unicode__(self):
Expand Down Expand Up @@ -646,6 +652,8 @@ class ProductNote(models.Model):
start_date = models.DateField()
end_date = models.DateField()
comment = models.TextField(blank=True)
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)

def __str__(self):
return self.text + " (" + " | ".join(str(x.name) for x in self.products.all()) + ")"
Expand Down Expand Up @@ -681,6 +689,8 @@ class Sale(models.Model):
room = models.ForeignKey(Room, on_delete=models.CASCADE, null=True)
timestamp = models.DateTimeField(auto_now_add=True)
price = models.IntegerField()
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)

class Meta:
index_together = [
Expand Down Expand Up @@ -721,6 +731,8 @@ class News(models.Model):
text = models.TextField()
pub_date = models.DateTimeField()
stop_date = models.DateTimeField()
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)

class Meta:
verbose_name_plural = "News"
Expand All @@ -739,6 +751,8 @@ class Meta:

member = models.ForeignKey(Member, on_delete=models.CASCADE, null=False)
due = models.IntegerField(default=200 * 100)
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)

def generate_mobilepay_url(self):
comment = self.member.username
Expand Down Expand Up @@ -847,6 +861,8 @@ class Theme(models.Model):
begin_day = models.PositiveSmallIntegerField("Begin day", default=1)
end_month = models.PositiveSmallIntegerField("End month")
end_day = models.PositiveSmallIntegerField("End day", default=31)
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)

NONE = "N"
SHOW = "S"
Expand Down
Loading