(models/api) add document model and API

We do this by making copies of existing Template and TemplateAccess
models and API. A little refactoring is done to try to limit duplicate
code.
This commit is contained in:
Samuel Paccoud - DINUM
2024-04-03 18:50:28 +02:00
committed by Anthony LC
parent 7c6e48975d
commit 397b9efbce
2 changed files with 2 additions and 2 deletions

View File

@@ -136,7 +136,7 @@ class DocumentSerializer(BaseResourceSerializer):
class Meta:
model = models.Document
fields = ["id", "title", "accesses", "abilities", "is_public"]
fields = ["id", "content", "title", "accesses", "abilities", "is_public"]
read_only_fields = ["id", "accesses", "abilities"]

View File

@@ -1,4 +1,4 @@
# Generated by Django 5.0.3 on 2024-05-02 12:12
# Generated by Django 5.0.3 on 2024-04-19 11:38
import django.contrib.auth.models
import django.core.validators