Add in new document fields for upload and update operations

This commit is contained in:
Keannu Bernasol 2025-01-11 20:03:43 +08:00
parent 6357899b70
commit d227535383
3 changed files with 12 additions and 4 deletions

View file

@ -23,8 +23,8 @@ ADMIN_PASSWORD = ''
TEST_DATA = "True"
# Ollama for Categorization
OLLAMA_URL = "localhost:11434"
OLLAMA_URL = "http://localhost:11434"
OLLAMA_USE_AUTH = "False"
OLLAMA_MODEL = "knoopx/mobile-vlm:3b-fp16"
OLLAMA_MODEL = "llama3.2-vision"
OLLAMA_USERNAME = ""
OLLAMA_PASSWORD = ""

View file

@ -267,7 +267,7 @@ AUTH_USER_MODEL = "accounts.CustomUser"
DATA_UPLOAD_MAX_NUMBER_FIELDS = 20480
GRAPH_MODELS = {
"app_labels": ["accounts", "documents", "document_requests", "questionnaires"]
"app_labels": ["accounts", "documents", "document_requests", "questionnaires", "authorization_requests"]
}
CORS_ORIGIN_ALLOW_ALL = True

View file

@ -10,6 +10,10 @@ class DocumentUpdateSerializer(serializers.ModelSerializer):
"name",
"document_type",
"number_pages",
"sent_from",
"document_month",
"document_year",
"subject"
]
@ -28,9 +32,13 @@ class DocumentUploadSerializer(serializers.ModelSerializer):
"file",
"document_type",
"number_pages",
"sent_from",
"document_month",
"document_year",
"subject",
"date_uploaded",
]
read_only_fields = ["id", "date-uploaded"]
read_only_fields = ["id", "date_uploaded"]
class DocumentDeleteSerializer(serializers.ModelSerializer):