django-availfiles
A minimal, frontend-agnostic file library for Django. AvailFile is a
flat model — upload a file, get a URL back — deliberately not related
to any other model via a foreign key. The point is a place to put a file
once and link to it from anywhere (a blog post body, a product
description, an email), not a structured per-model attachment relation.
What this package does, and doesn't, do
AvailFile:file,original_filename(captured automatically on save), an optionallabel,uploaded_by,uploaded_at.- Registers with Django admin.
- It does not ship any views, URLs, upload endpoint, or picker UI — that's genuinely framework/host-specific (a dashboard page, a rich-text editor's file-picker, a plain form), and belongs in an integration layer. For an Oscar dashboard + TinyMCE integration, see django-oscar-availfiles.
- No opinion on which file types are allowed. A deployment might restrict this library to non-image files (if images already have their own upload flow elsewhere) — that's a policy decision for whichever upload view is actually used, not something this model enforces.
Installation
uv add django-availfiles
INSTALLED_APPS = [
...,
"availfiles",
]
Run manage.py migrate.
Translations
The package ships a Spanish translation (src/availfiles/locale/es/). Both
the .po source and the compiled .mo are committed, so the wheel includes
the .mo and nothing needs compiling on install. After editing a .po,
recompile before releasing:
msgfmt -o src/availfiles/locale/es/LC_MESSAGES/django.mo \
src/availfiles/locale/es/LC_MESSAGES/django.po
New strings are extracted with django-admin makemessages -l es run from
src/availfiles/. A project can override any single string in its own
LOCALE_PATHS without copying the whole catalogue.
Development
uv sync
uv run pytest
Metadata
Release files for django-availfiles 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django_availfiles-0.3.0.tar.gz | 46.6 kB | Without provenance | Details for django_availfiles-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_availfiles-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for django_availfiles-0.3.0-py3-none-any.whl |
Total release size: 53.9 kB
Release files / django_availfiles-0.3.0.tar.gz
| Download URL | django_availfiles-0.3.0.tar.gz |
|---|---|
| Size | 46.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
56e22d6a92a46b804e03378f0812f27dd7ca13e6c5f8340466a67290d34d898d
|
|
BLAKE2b-256 checksum How to use checksums |
b839469c9480d2983ff0c7871a582c0568490b59b69de859bd35f0ebeb7fbd8e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / django_availfiles-0.3.0-py3-none-any.whl
| Download URL | django_availfiles-0.3.0-py3-none-any.whl |
|---|---|
| Size | 7.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e7db2c58c7b125ebf9a9e660f7d63c5799974070a971cfc37c7a6dbbeb5e2a4a
|
|
BLAKE2b-256 checksum How to use checksums |
096fa1a169360df42714891ceae6e6fd1930c38cc02167020d0efdcfcaa7263d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for django-availfiles 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.