mirror of
https://github.com/daniviga/django-ram.git
synced 2025-08-04 13:17:50 +02:00
Add the possbility to provide descriptions (#32)
to class, rolling stock, book
This commit is contained in:
@@ -142,6 +142,7 @@ class RollingStockAdmin(SortableAdminBase, admin.ModelAdmin):
|
||||
"manufacturer",
|
||||
"item_number",
|
||||
"era",
|
||||
"description",
|
||||
"production_year",
|
||||
"purchase_date",
|
||||
"notes",
|
||||
|
19
ram/roster/migrations/0023_alter_rollingclass_description.py
Normal file
19
ram/roster/migrations/0023_alter_rollingclass_description.py
Normal file
@@ -0,0 +1,19 @@
|
||||
# Generated by Django 5.0.2 on 2024-03-02 13:30
|
||||
|
||||
import tinymce.models
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("roster", "0022_alter_rollingstock_notes_and_more"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name="rollingclass",
|
||||
name="description",
|
||||
field=tinymce.models.HTMLField(blank=True),
|
||||
),
|
||||
]
|
19
ram/roster/migrations/0024_rollingstock_description.py
Normal file
19
ram/roster/migrations/0024_rollingstock_description.py
Normal file
@@ -0,0 +1,19 @@
|
||||
# Generated by Django 5.0.2 on 2024-03-02 14:30
|
||||
|
||||
import tinymce.models
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("roster", "0023_alter_rollingclass_description"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name="rollingstock",
|
||||
name="description",
|
||||
field=tinymce.models.HTMLField(blank=True),
|
||||
),
|
||||
]
|
@@ -25,7 +25,7 @@ class RollingClass(models.Model):
|
||||
identifier = models.CharField(max_length=128, unique=False)
|
||||
type = models.ForeignKey(RollingStockType, on_delete=models.CASCADE)
|
||||
company = models.ForeignKey(Company, on_delete=models.CASCADE)
|
||||
description = models.CharField(max_length=256, blank=True)
|
||||
description = tinymce.HTMLField(blank=True)
|
||||
manufacturer = models.ForeignKey(
|
||||
Manufacturer,
|
||||
on_delete=models.CASCADE,
|
||||
@@ -85,10 +85,11 @@ class RollingStock(models.Model):
|
||||
era = models.CharField(max_length=32, blank=True)
|
||||
production_year = models.SmallIntegerField(null=True, blank=True)
|
||||
purchase_date = models.DateField(null=True, blank=True)
|
||||
notes = tinymce.HTMLField(blank=True)
|
||||
description = tinymce.HTMLField(blank=True)
|
||||
tags = models.ManyToManyField(
|
||||
Tag, related_name="rolling_stock", blank=True
|
||||
)
|
||||
notes = tinymce.HTMLField(blank=True)
|
||||
creation_time = models.DateTimeField(auto_now_add=True)
|
||||
updated_time = models.DateTimeField(auto_now=True)
|
||||
|
||||
|
Reference in New Issue
Block a user