autocomplete_fields = []
prepopulated_fields = {"slug": ("name",)}
search_fields = ["name"]
- fields = ['name', 'slug', 'category', 'estimated_costs']
+ fields = ['name', 'slug', 'category', 'notes', 'estimated_costs']
readonly_fields = ['estimated_costs']
inlines = [AuthorInline, BookInline]
--- /dev/null
+# Generated by Django 3.1.13 on 2021-07-06 14:08
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('catalogue', '0029_auto_20201102_1315'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='collection',
+ name='notes',
+ field=models.TextField(blank=True, verbose_name='notes'),
+ ),
+ migrations.AddField(
+ model_name='collectioncategory',
+ name='notes',
+ field=models.TextField(blank=True, verbose_name='notes'),
+ ),
+ ]
class CollectionCategory(models.Model):
name = models.CharField(_("name"), max_length=255)
parent = models.ForeignKey('self', models.SET_NULL, related_name='children', null=True, blank=True, verbose_name=_("parent"))
+ notes = models.TextField(_("notes"), blank=True)
class Meta:
ordering = ('parent__name', 'name')
name = models.CharField(_("name"), max_length=255)
slug = models.SlugField(max_length=255, unique=True)
category = models.ForeignKey(CollectionCategory, models.SET_NULL, null=True, blank=True, verbose_name=_("category"))
+ notes = models.TextField(_("notes"), blank=True)
class Meta:
ordering = ('category', 'name')