diff --git a/lot/migrations/0008_rename_closed_lot_archived.py b/lot/migrations/0008_rename_closed_lot_archived.py
new file mode 100644
index 0000000..d7e8b70
--- /dev/null
+++ b/lot/migrations/0008_rename_closed_lot_archived.py
@@ -0,0 +1,18 @@
+# Generated by Django 5.0.6 on 2025-02-25 12:32
+
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('lot', '0007_lottag_inbox'),
+ ]
+
+ operations = [
+ migrations.RenameField(
+ model_name='lot',
+ old_name='closed',
+ new_name='archived',
+ ),
+ ]
diff --git a/lot/models.py b/lot/models.py
index 7ab5ae5..d196ae7 100644
--- a/lot/models.py
+++ b/lot/models.py
@@ -32,7 +32,7 @@ class Lot(models.Model):
name = models.CharField(max_length=STR_SIZE, blank=True, null=True)
code = models.CharField(max_length=STR_SIZE, blank=True, null=True)
description = models.CharField(max_length=STR_SIZE, blank=True, null=True)
- closed = models.BooleanField(default=False)
+ archived = models.BooleanField(default=False)
owner = models.ForeignKey(Institution, on_delete=models.CASCADE)
user = models.ForeignKey(User, on_delete=models.SET_NULL, null=True, blank=True)
type = models.ForeignKey(LotTag, on_delete=models.CASCADE)
diff --git a/lot/templates/lots.html b/lot/templates/lots.html
index 2aa866d..acb9561 100644
--- a/lot/templates/lots.html
+++ b/lot/templates/lots.html
@@ -7,13 +7,13 @@
- {% if show_closed %}
-
- {% trans 'Hide closed lots' %}
+ {% if show_archived %}
+
+ {% trans 'Hide archived lots' %}
{% else %}
-
- {% trans 'Show closed lots' %}
+
+ {% trans 'Show archived lots' %}
{% endif %}
diff --git a/lot/views.py b/lot/views.py
index 341f15b..8049935 100644
--- a/lot/views.py
+++ b/lot/views.py
@@ -25,7 +25,7 @@ class NewLotView(DashboardView, CreateView):
"name",
"code",
"description",
- "closed",
+ "archived",
)
def get_form(self):
@@ -54,7 +54,7 @@ class DeleteLotView(DashboardView, DeleteView):
"name",
"code",
"description",
- "closed",
+ "archived",
)
def form_valid(self, form):
@@ -73,7 +73,7 @@ class EditLotView(DashboardView, UpdateView):
"name",
"code",
"description",
- "closed",
+ "archived",
)
def get_form_kwargs(self):
@@ -149,15 +149,15 @@ class LotsTagsView(DashboardView, TemplateView):
tag = get_object_or_404(LotTag, owner=self.request.user.institution, id=self.pk)
self.title += " {}".format(tag.name)
self.breadcrumb += " {}".format(tag.name)
- show_closed = self.request.GET.get('show_closed', 'false') == 'true'
+ show_archived = self.request.GET.get('show_archived', 'false') == 'true'
lots = Lot.objects.filter(owner=self.request.user.institution).filter(
- type=tag, closed=show_closed
+ type=tag, archived=show_archived
)
context.update({
'lots': lots,
'title': self.title,
'breadcrumb': self.breadcrumb,
- 'show_closed': show_closed
+ 'show_archived': show_archived
})
return context