Skip to content

Latest commit

 

History

History
31 lines (17 loc) · 928 Bytes

File metadata and controls

31 lines (17 loc) · 928 Bytes

Interaction with Django

.. module:: semantic_version.django_fields

The python-semanticversion package provides two custom fields for Django:

Those fields are :class:`django.db.models.CharField` subclasses, with their :attr:`~django.db.models.CharField.max_length` defaulting to 200.

Stores a :class:`semantic_version.Version` as its string representation.

.. attribute:: partial

    Boolean; whether :attr:`~semantic_version.Version.partial` versions are allowed.

.. attribute:: coerce

    Boolean; whether passed in values should be coerced into a semver string
    before storing.

Stores a :class:`semantic_version.Spec` as its comma-separated string representation.