Reusable Django document template system — create, edit, fill templates with PDF extraction and LLM prefill
Project description
iil-doc-templates
Reusable Django document template system — create, edit, fill templates with PDF extraction and LLM prefill.
Installation
pip install iil-doc-templates
With optional dependencies:
pip install iil-doc-templates[pdf] # pdfplumber for PDF extraction
pip install iil-doc-templates[llm] # iil-aifw for LLM prefill
pip install iil-doc-templates[all] # everything
Quick Start
# settings.py
INSTALLED_APPS = [
...
"doc_templates",
]
# urls.py
path("doc-templates/", include("doc_templates.urls")),
Then run migrations:
python manage.py migrate doc_templates
Features
- DocumentTemplate — Reusable document templates with JSON structure (sections + fields)
- DocumentInstance — Filled-out documents based on templates
- PDF Upload — Extract structure from PDF using
iil-concept-templates - Interactive Editor — Drag & drop sections, CRUD fields, table columns
- LLM Prefill — AI-powered field completion via
iil-aifw - PDF Export — Generate PDF from filled documents via
concept_templates.document_renderer - Multi-Tenant — All queries filter by
tenant_id
Architecture
iil-concept-templates (Pure Python) iil-doc-templates (Django)
├── Pydantic Schemas ├── Django Models
├── PDF Structure Extraction ──► ├── CRUD Views + URLs
├── Analysis, Prefill, Export ├── HTML Templates (6)
└── No Django dependency ├── Admin Integration
└── Uses concept_templates internally
Field Types
| Type | Description |
|---|---|
textarea |
Multi-line text (default) |
text |
Single-line text |
number |
Numeric input |
date |
Date picker |
boolean |
Yes/No toggle |
table |
Table with configurable columns |
URL Patterns
| URL | View | Description |
|---|---|---|
/ |
template-list |
List all templates + instances |
/create/ |
template-create |
Create empty template |
/upload/ |
template-upload |
Create template from PDF |
/<pk>/edit/ |
template-edit |
Interactive template editor |
/<pk>/delete/ |
template-delete |
Delete template |
/<pk>/instance/create/ |
instance-create |
Create document from template |
/instance/<pk>/edit/ |
instance-edit |
Edit document fields |
/instance/<pk>/delete/ |
instance-delete |
Delete document |
/instance/<pk>/prefill/ |
instance-prefill |
LLM prefill endpoint |
/instance/<pk>/pdf/ |
instance-pdf |
PDF export |
Dependencies
- Required: Django ≥ 4.2, iil-concept-templates ≥ 0.4.0
- Optional: pdfplumber (PDF extraction), iil-aifw (LLM prefill)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
iil_doc_templates-0.3.0.tar.gz
(28.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file iil_doc_templates-0.3.0.tar.gz.
File metadata
- Download URL: iil_doc_templates-0.3.0.tar.gz
- Upload date:
- Size: 28.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f6b70f455748c305799e4930bc558321ca9e686b8ccea05be73336290cee9426
|
|
| MD5 |
031ea7622ae616b8ab86b7ce46b45ed7
|
|
| BLAKE2b-256 |
91bc0328c9387d032d0cbf9ad9c5e9a9ca3e67a1ed93e24a4183b604c21363a3
|
File details
Details for the file iil_doc_templates-0.3.0-py3-none-any.whl.
File metadata
- Download URL: iil_doc_templates-0.3.0-py3-none-any.whl
- Upload date:
- Size: 34.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
52d9f23961f9bbd2412b7d8b9e1efc3ea3789be62f9278b58c1df528a1906b8f
|
|
| MD5 |
40ed33806088d02620b1821718a04bfb
|
|
| BLAKE2b-256 |
f7757b39c7beef2e609a4232f20c9c8367b24df639cb3124a20ae7d8690e5a11
|