Armanc Toolkit
A comprehensive toolkit containing various utilities for Django and Python development, with enhanced Inertia.js integration.
Features
Django Inertia Integration
Enhanced Inertia.js support for Django applications with:
- InertiaResponse: Advanced response handling with message support
- View Mixins: Complete set of class-based views for Inertia.js
InertiaResponseMixin: Base mixin for Inertia responsesGenericView: Base view with form handlingTemplateView: Simple template renderingFormView: Form handling with validationListView: Model list views with paginationDetailView: Single object detail viewsCreateView: Object creation with formsUpdateView: Object editing with formsDeleteView: Object deletion with confirmation
Installation
pip install armanc-toolkit
Usage
Django Settings
Add the Inertia app to your Django settings:
INSTALLED_APPS = [
# ... your other apps
'armanc.django.inertia',
]
Views
from armanc.django.inertia.views import TemplateView, ListView, CreateView
from django.contrib.auth.models import User
class DashboardView(TemplateView):
template_name = 'Dashboard'
class UserListView(ListView):
model = User
template_name = 'Users/Index'
paginate_by = 10
class UserCreateView(CreateView):
model = User
template_name = 'Users/Create'
fields = ['username', 'email', 'first_name', 'last_name']
Response Handling
from armanc.django.inertia.response import InertiaResponse
def my_view(request):
return InertiaResponse(
request,
component='MyComponent',
props={'data': 'example'}
)
Requirements
- Python >=3.13
- Django >=4.2,<6.0
- djantic2 >=1.0.5
- inertia-django >=1.2.0
- telepath >=0.3.1
License
MIT License
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
armanc_toolkit-0.1.2.tar.gz
(10.2 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 armanc_toolkit-0.1.2.tar.gz.
File metadata
- Download URL: armanc_toolkit-0.1.2.tar.gz
- Upload date:
- Size: 10.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cffb9001bc2845f716fcf50d3c67c27091617f47a3017b512cf15f85a32f3d88
|
|
| MD5 |
9f1f4a6a4d4341a00aee61d4ed05eeda
|
|
| BLAKE2b-256 |
ba3b4d920509219f2ad86ed576145761c47fab55caed9e409fe2c0b8ff40c1c5
|
File details
Details for the file armanc_toolkit-0.1.2-py3-none-any.whl.
File metadata
- Download URL: armanc_toolkit-0.1.2-py3-none-any.whl
- Upload date:
- Size: 11.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
12203baf112bd3b9de46cfc88987fc806a7dfb5151de9b40a10363aa58f8bde2
|
|
| MD5 |
7bf342a4800d43c60f82fc9cb7028603
|
|
| BLAKE2b-256 |
19d1c16201330e055c524b6e548710a138c76d46fd7ae63d094ba30afda8eefb
|