mirror of
https://github.com/daniviga/django-ram.git
synced 2025-08-04 21:27:49 +02:00
Implement support for sets and other improvements (#34)
* Add a boolean to define item as part of a set * Add contextual help in admin * Introduce support to sets and to item code lookup Also review the url path for pagination
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
# Generated by Django 5.0.4 on 2024-04-20 12:49
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("consist", "0010_alter_consist_notes"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name="consist",
|
||||
name="consist_address",
|
||||
field=models.SmallIntegerField(
|
||||
blank=True,
|
||||
default=None,
|
||||
help_text="DCC consist address if enabled",
|
||||
null=True,
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="consist",
|
||||
name="era",
|
||||
field=models.CharField(
|
||||
blank=True, help_text="Era or epoch of the consist", max_length=32
|
||||
),
|
||||
),
|
||||
]
|
@@ -16,10 +16,17 @@ class Consist(models.Model):
|
||||
identifier = models.CharField(max_length=128, unique=False)
|
||||
tags = models.ManyToManyField(Tag, related_name="consist", blank=True)
|
||||
consist_address = models.SmallIntegerField(
|
||||
default=None, null=True, blank=True
|
||||
default=None,
|
||||
null=True,
|
||||
blank=True,
|
||||
help_text="DCC consist address if enabled",
|
||||
)
|
||||
company = models.ForeignKey(Company, on_delete=models.CASCADE)
|
||||
era = models.CharField(max_length=32, blank=True)
|
||||
era = models.CharField(
|
||||
max_length=32,
|
||||
blank=True,
|
||||
help_text="Era or epoch of the consist",
|
||||
)
|
||||
image = models.ImageField(
|
||||
upload_to=os.path.join("images", "consists"),
|
||||
storage=DeduplicatedStorage,
|
||||
|
Reference in New Issue
Block a user