✨(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:
committed by
Anthony LC
parent
7c6e48975d
commit
397b9efbce
@@ -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"]
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user