mirror of
https://github.com/daniviga/django-ram.git
synced 2025-08-04 13:17:50 +02:00
Add support for generic documents (admin only) (#44)
* Add support for generic documents * Add publish / unpublish actions * Minor improvements to models properties
This commit is contained in:
40
ram/metadata/migrations/0021_genericdocument.py
Normal file
40
ram/metadata/migrations/0021_genericdocument.py
Normal file
@@ -0,0 +1,40 @@
|
||||
# Generated by Django 5.1.4 on 2025-01-17 09:31
|
||||
|
||||
import ram.utils
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("metadata", "0020_alter_decoderdocument_unique_together_and_more"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name="GenericDocument",
|
||||
fields=[
|
||||
(
|
||||
"id",
|
||||
models.BigAutoField(
|
||||
auto_created=True,
|
||||
primary_key=True,
|
||||
serialize=False,
|
||||
verbose_name="ID",
|
||||
),
|
||||
),
|
||||
("description", models.CharField(blank=True, max_length=128)),
|
||||
(
|
||||
"file",
|
||||
models.FileField(
|
||||
storage=ram.utils.DeduplicatedStorage(), upload_to="files/"
|
||||
),
|
||||
),
|
||||
("private", models.BooleanField(default=False)),
|
||||
("tags", models.ManyToManyField(blank=True, to="metadata.tag")),
|
||||
],
|
||||
options={
|
||||
"verbose_name_plural": "Generic Documents",
|
||||
},
|
||||
),
|
||||
]
|
Reference in New Issue
Block a user