django-rubble
Description
Extend django-model-utils and django-extensions.
Version 0.4.0 code got deleted but still exists on PyPI.
Features
- Serialized Number Generation (e.g. PN-0001, PN-0001; MY1, MY2)
- Useful Model and Form fields
- Several Useful Utility Functions
is_number: checks if number could be coerced to afloatratio_to_whole: .1 to 10; useful for percentages to "human"whole_to_ratio: 10 to .1; useful for "human" to "percentages"- perhaps others, see docs when they're published
Installation
From PyPI
pip install django-rubble
From GitHub (for development)
- Clone the repository:
git clone https://github.com/WoosterTech/django-rubble.git - Install the dependencies:
poetry install
Usage
Simply use the functions, fields, models.
The biggest "gotcha" is that NamedSerialNumber needs to be imported in your urls.py file; not actually sure why, perhaps someone can help me with that?
To use the automatic numbering, subclass NumberedModel and make sure to include a number_config = SerialNumberConfig(...) attribute. It will set defaults, but just as a standard integer starting at "1" with no prefix.
class PartNumber(NumberedModel):
name = models.CharField("Part Description", max_length=100)
number_config = SerialNumberConfig(
initial_value=10, prefix="PN-", width=4
)
Numbers will be generated starting with "PN-0010" (note the padding to make a width of 4) and increment by the default step of "1."
Contributions are welcome! Please follow the guidelines in contributing
This project is licensed under the MIT License.
Contact
- Author: Karl Wooster
- Email: karl@woostertech.com
- Website: woostertech.com
License
MIT (see License)
Contributing
See contributing
Metadata
Release files for django-rubble 0.8.2
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_rubble-0.8.2.tar.gz | 101.6 kB | Without provenance | Details for django_rubble-0.8.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_rubble-0.8.2-py3-none-any.whl | Python 3 | none | any | Details for django_rubble-0.8.2-py3-none-any.whl |
Total release size: 132.6 kB
Release files / django_rubble-0.8.2.tar.gz
| Download URL | django_rubble-0.8.2.tar.gz |
|---|---|
| Size | 101.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7fa86783c1a2323696155e75da729aeb1f6da7ec02e2fd2b9017ad65f2f54f6f
|
|
BLAKE2b-256 checksum How to use checksums |
6bc91078646340345ceebc99548ea00976ff53ecdfcdd4bed076b9bd525abbdb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.11 {"installer":{"name":"uv","version":"0.11.11","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":true}
|
Release files / django_rubble-0.8.2-py3-none-any.whl
| Download URL | django_rubble-0.8.2-py3-none-any.whl |
|---|---|
| Size | 31.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a26ff69045a890e31683c913b063e4c2ac79d5e9f93d53a5b6fb4086803987b5
|
|
BLAKE2b-256 checksum How to use checksums |
f9e7369533ef41fdc6e6158fd6ee17b96044f2f2d08efd56cab3c728dcc30582
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.11 {"installer":{"name":"uv","version":"0.11.11","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":true}
|
Security for django-rubble 0.8.2
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.