Skip to content

Commit 720c833

Browse files
authored
Add SLA printers (#18)
1 parent b799117 commit 720c833

File tree

4 files changed

+31
-3
lines changed

4 files changed

+31
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
.coverage
55
.mypy_cache/
66
venv/
7+
.env

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Ultimaker Reservation API
1+
# 3D Printer Reservation API
22

33
[![Build Status](https://github.com/coredump-ch/reservation-api/workflows/CI/badge.svg)](https://github.com/coredump-ch/reservation-api/actions?query=branch%3Amain)
44

5-
A small Python 3 / Django 4.2 LTS project to manage reservations for our 3D printer.
5+
A small Python / Django project to manage reservations for our 3D printer.
66

77
## API Tokens
88

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Generated by Django 4.2.20 on 2025-03-29 23:12
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('reservations', '0003_reservation_printer'),
10+
]
11+
12+
operations = [
13+
migrations.AlterField(
14+
model_name='reservation',
15+
name='printer',
16+
field=models.CharField(choices=[('prusaxl', 'Prusa XL'), ('ultimaker2+', 'Ultimaker 2+'), ('elegoo-mars', 'Elegoo Mars'), ('elegoo-saturn-4ultra', 'Elegoo Saturn 4 Ultra')], help_text='The printer for which a reservation should be added', max_length=255),
17+
),
18+
]

reservations/models.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,14 @@ class Reservation(models.Model):
99

1010
PRINTER_PRUSA = "prusaxl"
1111
PRINTER_ULTIMAKER = "ultimaker2+"
12-
PRINTER_CHOICES = {PRINTER_PRUSA: "Prusa XL", PRINTER_ULTIMAKER: "Ultimaker 2+"}
12+
PRINTER_ELEGOO_MARS = "elegoo-mars"
13+
PRINTER_ELEGOO_SATURN4ULTRA = "elegoo-saturn-4ultra"
14+
PRINTER_CHOICES = {
15+
PRINTER_PRUSA: "Prusa XL",
16+
PRINTER_ULTIMAKER: "Ultimaker 2+",
17+
PRINTER_ELEGOO_MARS: "Elegoo Mars",
18+
PRINTER_ELEGOO_SATURN4ULTRA: "Elegoo Saturn 4 Ultra",
19+
}
1320

1421
owner = models.CharField(
1522
max_length=255, help_text="The name of the person doing the reservation"
@@ -20,6 +27,8 @@ class Reservation(models.Model):
2027
choices=[
2128
(PRINTER_PRUSA, PRINTER_CHOICES[PRINTER_PRUSA]),
2229
(PRINTER_ULTIMAKER, PRINTER_CHOICES[PRINTER_ULTIMAKER]),
30+
(PRINTER_ELEGOO_MARS, PRINTER_CHOICES[PRINTER_ELEGOO_MARS]),
31+
(PRINTER_ELEGOO_SATURN4ULTRA, PRINTER_CHOICES[PRINTER_ELEGOO_SATURN4ULTRA]),
2332
],
2433
)
2534
start = models.DateTimeField(help_text="When the reservation starts")

0 commit comments

Comments
 (0)