Skip to main content

CircleCI codecov Code style: black

version: 0.2.0

What's an stdnum?

See python-stdnum

Usage:

from stdnumfield.models import StdNumField


class SomeMode(models.Model):
    field = StdNumField(
        'hr.oib',  # stdnum format
    )


class SampleModelForm(ModelForm):
    class Meta:
        model = SomeModel
        fields = ('field',)
        error_messages = {
            'field': {
                'stdnum_format':_("Not maching format %(format_list)s"),  # you can override exception message
            },
        }

Local development and testing

There is a gazillion ways of managing Python versions these days. I prefer pip and pyenv:

pyenv install --skip-existing 3.7.4
pyenv install --skip-existing 3.6.9
pyenv install --skip-existing 3.5.7
pyenv install --skip-existing 2.7.16
pyenv virtualenv 3.7.4 django-stdnumfield
echo 'django-stdnumfield:2.7.16:3.6.9:3.5.7' > .python-version
pip install -e .[dev]

Run the test project with:

cd testproject
./manage.py migrate
./manage.py runserver

Then navigate to:

  • http://localhost:8000/sample_form/
  • http://localhost:8000/model_form/

A valid number to test with: 12345678903

Metadata

Release files for django-stdnumfield 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-stdnumfield 0.2.0
File Size Uploaded Provenance Actions
django-stdnumfield-0.2.0.tar.gz 8.9 kB Without provenance Details for django-stdnumfield-0.2.0.tar.gz

Release files / django-stdnumfield-0.2.0.tar.gz

Download URL django-stdnumfield-0.2.0.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ff878aa93ff0360c52e50fafe9307c66c550d11c92ba10784ed2dda6aa608767
BLAKE2b-256 checksum
How to use checksums
21d959851f18cecc7a716777343e10c5c22c79f61199aded1ed35032f4334c8d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.7.4

Security for django-stdnumfield 0.2.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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page