mirror of
https://github.com/lemeow125/DocManagerBackend.git
synced 2025-01-18 17:13:00 +08:00
Add in new document fields for upload and update operations
This commit is contained in:
parent
6357899b70
commit
d227535383
3 changed files with 12 additions and 4 deletions
|
@ -23,8 +23,8 @@ ADMIN_PASSWORD = ''
|
||||||
TEST_DATA = "True"
|
TEST_DATA = "True"
|
||||||
|
|
||||||
# Ollama for Categorization
|
# Ollama for Categorization
|
||||||
OLLAMA_URL = "localhost:11434"
|
OLLAMA_URL = "http://localhost:11434"
|
||||||
OLLAMA_USE_AUTH = "False"
|
OLLAMA_USE_AUTH = "False"
|
||||||
OLLAMA_MODEL = "knoopx/mobile-vlm:3b-fp16"
|
OLLAMA_MODEL = "llama3.2-vision"
|
||||||
OLLAMA_USERNAME = ""
|
OLLAMA_USERNAME = ""
|
||||||
OLLAMA_PASSWORD = ""
|
OLLAMA_PASSWORD = ""
|
|
@ -267,7 +267,7 @@ AUTH_USER_MODEL = "accounts.CustomUser"
|
||||||
DATA_UPLOAD_MAX_NUMBER_FIELDS = 20480
|
DATA_UPLOAD_MAX_NUMBER_FIELDS = 20480
|
||||||
|
|
||||||
GRAPH_MODELS = {
|
GRAPH_MODELS = {
|
||||||
"app_labels": ["accounts", "documents", "document_requests", "questionnaires"]
|
"app_labels": ["accounts", "documents", "document_requests", "questionnaires", "authorization_requests"]
|
||||||
}
|
}
|
||||||
|
|
||||||
CORS_ORIGIN_ALLOW_ALL = True
|
CORS_ORIGIN_ALLOW_ALL = True
|
||||||
|
|
|
@ -10,6 +10,10 @@ class DocumentUpdateSerializer(serializers.ModelSerializer):
|
||||||
"name",
|
"name",
|
||||||
"document_type",
|
"document_type",
|
||||||
"number_pages",
|
"number_pages",
|
||||||
|
"sent_from",
|
||||||
|
"document_month",
|
||||||
|
"document_year",
|
||||||
|
"subject"
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
@ -28,9 +32,13 @@ class DocumentUploadSerializer(serializers.ModelSerializer):
|
||||||
"file",
|
"file",
|
||||||
"document_type",
|
"document_type",
|
||||||
"number_pages",
|
"number_pages",
|
||||||
|
"sent_from",
|
||||||
|
"document_month",
|
||||||
|
"document_year",
|
||||||
|
"subject",
|
||||||
"date_uploaded",
|
"date_uploaded",
|
||||||
]
|
]
|
||||||
read_only_fields = ["id", "date-uploaded"]
|
read_only_fields = ["id", "date_uploaded"]
|
||||||
|
|
||||||
|
|
||||||
class DocumentDeleteSerializer(serializers.ModelSerializer):
|
class DocumentDeleteSerializer(serializers.ModelSerializer):
|
||||||
|
|
Loading…
Reference in a new issue